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

View file

@ -1,4 +1,11 @@
2.5-559 | 2018-05-08 11:23:28 -0700
* Add test for dump_current_packet bif. (Johanna Amann)
* Fix dump_packet & dump_current_packet to work with several filenames.
(Assaf Morami)
2.5-553 | 2018-05-03 14:59:53 -0500
* Make BinPAC exception handling more consistent (Vlad Grigorescu)

View file

@ -1 +1 @@
2.5-553
2.5-559

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