mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00

The signatures of script-layer functions 'discarder_check_ip', 'discarder_check_tcp', 'discarder_check_udp', and 'discarder_check_icmp' were changed to use the more general 'pkt_hdr' type as a parameter instead of individual header types.
39 lines
636 B
C++
39 lines
636 B
C++
// See the file "COPYING" in the main distribution directory for copyright.
|
|
|
|
#ifndef discard_h
|
|
#define discard_h
|
|
|
|
#include "IP.h"
|
|
#include "Func.h"
|
|
|
|
struct ip;
|
|
struct tcphdr;
|
|
struct udphdr;
|
|
struct icmp;
|
|
|
|
class Val;
|
|
class RecordType;
|
|
class Func;
|
|
|
|
class Discarder {
|
|
public:
|
|
Discarder();
|
|
~Discarder();
|
|
|
|
int IsActive();
|
|
|
|
int NextPacket(const IP_Hdr* ip, int len, int caplen);
|
|
|
|
protected:
|
|
Val* BuildData(const u_char* data, int hdrlen, int len, int caplen);
|
|
|
|
Func* check_ip;
|
|
Func* check_tcp;
|
|
Func* check_udp;
|
|
Func* check_icmp;
|
|
|
|
// Maximum amount of application data passed to filtering functions.
|
|
int discarder_maxlen;
|
|
};
|
|
|
|
#endif
|