mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
IOSource reorg.
A bunch of infrastructure work to move IOSource, IOSourceRegistry (now iosource::Manager) and PktSrc/PktDumper code into iosource/, and over to a plugin structure. Other IOSources aren't touched yet, they are still in src/*. It compiles and does something with a small trace, but that's all I've tested so far. There are quite certainly a number of problems left, as well as various TODOs and cleanup; and nothing's cast in stone yet. Will continue to work on this.
This commit is contained in:
parent
6c20df11cc
commit
93d9dde969
52 changed files with 2223 additions and 1306 deletions
22
src/Net.h
22
src/Net.h
|
@ -4,13 +4,18 @@
|
|||
#define net_h
|
||||
|
||||
#include "net_util.h"
|
||||
<<<<<<< HEAD
|
||||
#include "util.h"
|
||||
#include "BPF_Program.h"
|
||||
=======
|
||||
>>>>>>> 5493253... Checkpoint.
|
||||
#include "List.h"
|
||||
#include "PktSrc.h"
|
||||
#include "FlowSrc.h"
|
||||
#include "Func.h"
|
||||
#include "RemoteSerializer.h"
|
||||
#include "iosource/IOSource.h"
|
||||
#include "iosource/pktsrc/PktSrc.h"
|
||||
#include "iosource/pktsrc/PktDumper.h"
|
||||
|
||||
extern void net_init(name_list& interfaces, name_list& readfiles,
|
||||
name_list& netflows, name_list& flowfiles,
|
||||
|
@ -22,10 +27,8 @@ extern void net_finish(int drain_events);
|
|||
extern void net_delete(); // Reclaim all memory, etc.
|
||||
extern void net_packet_arrival(double t, const struct pcap_pkthdr* hdr,
|
||||
const u_char* pkt, int hdr_size,
|
||||
PktSrc* src_ps);
|
||||
extern int net_packet_match(BPF_Program* fp, const u_char* pkt,
|
||||
u_int len, u_int caplen);
|
||||
extern void expire_timers(PktSrc* src_ps = 0);
|
||||
iosource::PktSrc* src_ps);
|
||||
extern void expire_timers(iosource::PktSrc* src_ps = 0);
|
||||
extern void termination_signal();
|
||||
|
||||
// Functions to temporarily suspend processing of live input (network packets
|
||||
|
@ -82,13 +85,10 @@ extern const u_char* current_pkt;
|
|||
extern int current_dispatched;
|
||||
extern int current_hdr_size;
|
||||
extern double current_timestamp;
|
||||
extern PktSrc* current_pktsrc;
|
||||
extern IOSource* current_iosrc;
|
||||
extern iosource::PktSrc* current_pktsrc;
|
||||
extern iosource::IOSource* current_iosrc;
|
||||
|
||||
declare(PList,PktSrc);
|
||||
extern PList(PktSrc) pkt_srcs;
|
||||
|
||||
extern PktDumper* pkt_dumper; // where to save packets
|
||||
extern iosource::PktDumper* pkt_dumper; // where to save packets
|
||||
|
||||
extern char* writefile;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue