Add test for dump_current_packet bif.

This commit is contained in:
Johanna Amann 2018-05-08 11:23:28 -07:00
parent 0f9ff2879d
commit bb20026267
5 changed files with 21 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View 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();
}