Add ability for packet sources to flag a packet's l2 or l3 checksum as valid.

This lets packet source plugins implement handling of hardware checksum offloading, if available. Setting the flags will skip the internal checksumming for either layer 2 and/or layer 3.
This commit is contained in:
Tim Wojtulewicz 2020-03-06 15:36:35 -07:00
parent da5fca7163
commit c6f7665953
6 changed files with 19 additions and 5 deletions

View file

@ -199,6 +199,18 @@ public:
*/
uint32_t inner_vlan;
/**
* Indicates whether the layer 2 checksum was validated by the
* hardware/kernel before being received by zeek.
*/
bool l2_checksummed;
/**
* Indicates whether the layer 3 checksum was validated by the
* hardware/kernel before being received by zeek.
*/
bool l3_checksummed;
private:
// Calculate layer 2 attributes. Sets
void ProcessLayer2();