Add macro's for access to ICMPv(4|6) type & code.

remotes/origin/master-1.0.x
Victor Julien 17 years ago
parent 00821489d7
commit 03d084858c

@ -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_
{

@ -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_
{

Loading…
Cancel
Save