31 if (PacketIsIPv4(p)) {
38 }
else if (PacketIsUDP(p)) {
46 }
else if (PacketIsIPv6(p)) {
52 }
else if (PacketIsUDP(p)) {
70 uint64_t iface_count, uint64_t iface_fail)
73 if (iface_fail != 0) {
75 SCLogInfo(
"More than 1/%dth of packets have an invalid "
76 "checksum, assuming checksum offloading is used "
77 "(%"PRIu64
"/%"PRIu64
")",
81 SCLogInfo(
"Less than 1/%dth of packets have an invalid "
82 "checksum, assuming checksum offloading is NOT used "
84 iface_fail, iface_count);
87 SCLogInfo(
"No packets with invalid checksum, assuming "
88 "checksum offloading is NOT used");
#define IPV4_GET_RAW_HLEN(ip4h)
#define TCP_GET_RAW_HLEN(tcph)
union PacketL3::Hdrs hdrs
union PacketL4::L4Hdrs hdrs
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.
int ReCalculateChecksum(Packet *p)
#define CHECKSUM_INVALID_RATIO
#define CHECKSUM_SAMPLE_COUNT
#define SCLogInfo(...)
Macro used to log INFORMATIONAL messages.