Already done in a generic way by PACKET_RESET_CHECKSUMS.
uint32_t tx_ts;
} __attribute__((__packed__)) ICMPV4Timestamp;
-#define CLEAR_ICMPV4_PACKET(p) do { \
- (p)->level4_comp_csum = -1; \
- PACKET_CLEAR_L4VARS((p)); \
- (p)->icmpv4h = NULL; \
-} while(0)
+#define CLEAR_ICMPV4_PACKET(p) \
+ do { \
+ PACKET_CLEAR_L4VARS((p)); \
+ (p)->icmpv4h = NULL; \
+ } while (0)
#define ICMPV4_HEADER_PKT_OFFSET 8
} ICMPV6Vars;
-
-#define CLEAR_ICMPV6_PACKET(p) do { \
- (p)->level4_comp_csum = -1; \
- PACKET_CLEAR_L4VARS((p)); \
- (p)->icmpv6h = NULL; \
-} while(0)
+#define CLEAR_ICMPV6_PACKET(p) \
+ do { \
+ PACKET_CLEAR_L4VARS((p)); \
+ (p)->icmpv6h = NULL; \
+ } while (0)
void DecodeICMPV6RegisterTests(void);
#define IPV4_GET_IPPROTO(p) \
IPV4_GET_RAW_IPPROTO((p)->ip4h)
-#define CLEAR_IPV4_PACKET(p) do { \
- (p)->ip4h = NULL; \
- (p)->level3_comp_csum = -1; \
- memset(&p->ip4vars, 0x00, sizeof(p->ip4vars)); \
-} while (0)
+#define CLEAR_IPV4_PACKET(p) \
+ do { \
+ (p)->ip4h = NULL; \
+ memset(&p->ip4vars, 0x00, sizeof(p->ip4vars)); \
+ } while (0)
enum IPV4OptionFlags {
IPV4_OPT_FLAG_EOL = 0,
TCPOpt tfo; /* tcp fast open */
} TCPVars;
-#define CLEAR_TCP_PACKET(p) { \
- (p)->level4_comp_csum = -1; \
- PACKET_CLEAR_L4VARS((p)); \
- (p)->tcph = NULL; \
-}
+#define CLEAR_TCP_PACKET(p) \
+ { \
+ PACKET_CLEAR_L4VARS((p)); \
+ (p)->tcph = NULL; \
+ }
void DecodeTCPRegisterTests(void);
uint16_t uh_sum; /* checksum */
} UDPHdr;
-#define CLEAR_UDP_PACKET(p) do { \
- (p)->level4_comp_csum = -1; \
- (p)->udph = NULL; \
-} while (0)
+#define CLEAR_UDP_PACKET(p) \
+ do { \
+ (p)->udph = NULL; \
+ } while (0)
void DecodeUDPV4RegisterTests(void);