mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08: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
9
src/IP.h
9
src/IP.h
|
@ -249,7 +249,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
//TODO: audit usages of this for correct IPv6 support or IPv4 assumptions
|
||||
const struct ip* IP4_Hdr() const { return ip4; }
|
||||
|
||||
const struct ip6_hdr* IP6_Hdr() const { return ip6; }
|
||||
|
@ -355,7 +354,13 @@ public:
|
|||
/**
|
||||
* Returns an ip_hdr or ip6_hdr_chain RecordVal.
|
||||
*/
|
||||
RecordVal* BuildRecordVal() const;
|
||||
RecordVal* BuildIPHdrVal() const;
|
||||
|
||||
/**
|
||||
* Returns a pkt_hdr RecordVal, which includes not only the IP header, but
|
||||
* also upper-layer (tcp/udp/icmp) headers.
|
||||
*/
|
||||
RecordVal* BuildPktHdrVal() const;
|
||||
|
||||
private:
|
||||
const struct ip* ip4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue