suricata
util-checksum.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CHECKSUM_SAMPLE_COUNT   1000ULL
 
#define CHECKSUM_INVALID_RATIO   10
 

Functions

int ReCalculateChecksum (Packet *p)
 
int ChecksumAutoModeCheck (uint64_t thread_count, uint64_t iface_count, uint64_t iface_fail)
 Check if the number of invalid checksums indicate checksum offloading in place. More...
 

Detailed Description

Author
Eric Leblond eric@.nosp@m.regi.nosp@m.t.org

Definition in file util-checksum.h.

Macro Definition Documentation

◆ CHECKSUM_INVALID_RATIO

#define CHECKSUM_INVALID_RATIO   10

Definition at line 35 of file util-checksum.h.

◆ CHECKSUM_SAMPLE_COUNT

#define CHECKSUM_SAMPLE_COUNT   1000ULL

Definition at line 34 of file util-checksum.h.

Function Documentation

◆ ChecksumAutoModeCheck()

int ChecksumAutoModeCheck ( uint64_t  thread_count,
uint64_t  iface_count,
uint64_t  iface_fail 
)

Check if the number of invalid checksums indicate checksum offloading in place.

Return values
1yes, offloading in place
0no, no offloading used

Definition at line 70 of file util-checksum.c.

References CHECKSUM_INVALID_RATIO, CHECKSUM_SAMPLE_COUNT, and SCLogInfo.

◆ ReCalculateChecksum()

int ReCalculateChecksum ( Packet p)

Definition at line 30 of file util-checksum.c.

References PKT_IS_IPV4, PKT_IS_TCP, and Packet_::tcph.

Referenced by DetectReplaceExecuteInternal().

Here is the caller graph for this function: