GH-2183: Rework Packet checksummed variable naming

This commit is contained in:
Tim Wojtulewicz 2022-06-24 09:50:10 -07:00
parent 1af3039ca3
commit 1b5741d905
7 changed files with 25 additions and 8 deletions

View file

@ -61,6 +61,8 @@ void Packet::Init(int arg_link_type, pkt_timeval* arg_ts, uint32_t arg_caplen, u
l3_proto = L3_UNKNOWN;
l3_checksummed = false;
l4_checksummed = false;
encap.reset();
ip_hdr.reset();

View file

@ -186,18 +186,28 @@ public:
*/
bool is_orig = false;
// Note: The following checksummed variables only apply to packets
// received via a packet source, and not to packets contained inside
// tunnels, etc.
/**
* Indicates whether the layer 2 checksum was validated by the
* hardware/kernel before being received by zeek.
* Indicates whether the data link layer/layer 2 checksum was validated
* the hardware/kernel before being received by zeek.
*/
bool l2_checksummed = false;
/**
* Indicates whether the layer 3 checksum was validated by the
* hardware/kernel before being received by zeek.
* Indicates whether the network layer/layer 3 checksum was validated by
* the hardware/kernel before being received by zeek.
*/
bool l3_checksummed = false;
/**
* Indicates whether the transport layer/layer 4 checksum was validated
* by the hardware/kernel before being received by zeek.
*/
bool l4_checksummed = false;
/**
* Indicates whether this packet should be recorded.
*/