diff --git a/src/decode-icmpv4.h b/src/decode-icmpv4.h index 2844694227..91a47c43eb 100644 --- a/src/decode-icmpv4.h +++ b/src/decode-icmpv4.h @@ -123,6 +123,11 @@ #define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ #endif +/** marco for icmpv4 type access */ +#define ICMPV4_GET_TYPE(p) (p)->icmpv4h->type +/** marco for icmpv4 code access */ +#define ICMPV4_GET_CODE(p) (p)->icmpv4h->code + /* ICMPv4 header structure */ typedef struct ICMPV4Hdr_ { diff --git a/src/decode-icmpv6.h b/src/decode-icmpv6.h index 07427654e0..4b2c018015 100644 --- a/src/decode-icmpv6.h +++ b/src/decode-icmpv6.h @@ -4,6 +4,7 @@ #define __DECODE_ICMPV6_H__ #define ICMPV6_HEADER_LEN 8 + #ifndef ICMP6_DST_UNREACH #define ICMP6_DST_UNREACH 1 #endif @@ -63,6 +64,10 @@ #define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */ #endif +/** marco for icmpv6 type access */ +#define ICMPV6_GET_TYPE(p) (p)->icmpv6h->type +/** marco for icmpv4 code access */ +#define ICMPV6_GET_CODE(p) (p)->icmpv6h->code typedef struct ICMPV6Hdr_ {