mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Add Pcap::file_done event
It signals when a pcap file is done being processed.
This commit is contained in:
parent
4fbcca04e8
commit
7c124881cd
4 changed files with 18 additions and 0 deletions
|
@ -851,3 +851,8 @@ event new_event%(name: string, params: call_argument_vector%);
|
|||
|
||||
## Shows an IP address anonymization mapping.
|
||||
event anonymization_mapping%(orig: addr, mapped: addr%);
|
||||
|
||||
## An event that signals a pcap file is done being processed.
|
||||
##
|
||||
## path: the filesystem path of the pcap file
|
||||
event Pcap::file_done%(path: string%);
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include "iosource/Packet.h"
|
||||
#include "iosource/BPF_Program.h"
|
||||
|
||||
#include "Event.h"
|
||||
|
||||
#include "pcap.bif.h"
|
||||
|
||||
#ifdef HAVE_PCAP_INT_H
|
||||
|
@ -47,6 +49,9 @@ void PcapSource::Close()
|
|||
last_data = nullptr;
|
||||
|
||||
Closed();
|
||||
|
||||
if ( Pcap::file_done )
|
||||
mgr.QueueEventFast(Pcap::file_done, {new StringVal(props.path)});
|
||||
}
|
||||
|
||||
void PcapSource::OpenLive()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue