mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Update PacketFilter/Discarder code for IP version independence.
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.
This commit is contained in:
parent
76ef36e048
commit
0b32c980bf
13 changed files with 251 additions and 194 deletions
|
@ -25,17 +25,8 @@ public:
|
|||
int NextPacket(const IP_Hdr* ip, int len, int caplen);
|
||||
|
||||
protected:
|
||||
Val* BuildHeader(const struct ip* ip);
|
||||
Val* BuildHeader(const struct tcphdr* tp, int tcp_len);
|
||||
Val* BuildHeader(const struct udphdr* up);
|
||||
Val* BuildHeader(const struct icmp* icmp);
|
||||
Val* BuildData(const u_char* data, int hdrlen, int len, int caplen);
|
||||
|
||||
RecordType* ip_hdr;
|
||||
RecordType* tcp_hdr;
|
||||
RecordType* udp_hdr;
|
||||
RecordType* icmp_hdr;
|
||||
|
||||
Func* check_ip;
|
||||
Func* check_tcp;
|
||||
Func* check_udp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue