mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Add test for dump_current_packet bif.
This commit is contained in:
parent
0f9ff2879d
commit
bb20026267
5 changed files with 21 additions and 1 deletions
BIN
testing/btest/Baseline/bifs.dump_current_packet/1.pcap
Normal file
BIN
testing/btest/Baseline/bifs.dump_current_packet/1.pcap
Normal file
Binary file not shown.
BIN
testing/btest/Baseline/bifs.dump_current_packet/2.pcap
Normal file
BIN
testing/btest/Baseline/bifs.dump_current_packet/2.pcap
Normal file
Binary file not shown.
13
testing/btest/bifs/dump_current_packet.bro
Normal file
13
testing/btest/bifs/dump_current_packet.bro
Normal file
|
@ -0,0 +1,13 @@
|
|||
# @TEST-EXEC: bro -b -r $TRACES/wikipedia.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff 1.pcap
|
||||
# @TEST-EXEC: btest-diff 2.pcap
|
||||
|
||||
global i: count = 0;
|
||||
|
||||
event new_packet(c: connection, p: pkt_hdr)
|
||||
{
|
||||
++i;
|
||||
dump_current_packet(cat(i, ".pcap"));
|
||||
if ( i >= 3 )
|
||||
terminate();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue