diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-13 13:03:22 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:20 -0400 |
commit | cc70ab261c9f997589546100ddec5da6bfd89c4e (patch) | |
tree | 0be6a4f0dc81131747f3d3726dba77d922c6bee9 /include | |
parent | 2c0fd387b00a6758550b5ca1aae4408374483fe7 (diff) |
[ICMP6]: Introduce icmp6_hdr()
For consistency with all the other skb->h.raw accessors.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/icmpv6.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index 68d3526c3a05..0b5ba5eb7ed2 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h | |||
@@ -75,6 +75,15 @@ struct icmp6hdr { | |||
75 | #define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref | 75 | #define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref |
76 | }; | 76 | }; |
77 | 77 | ||
78 | #ifdef __KERNEL__ | ||
79 | #include <linux/skbuff.h> | ||
80 | |||
81 | static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb) | ||
82 | { | ||
83 | return (struct icmp6hdr *)skb->h.raw; | ||
84 | } | ||
85 | #endif | ||
86 | |||
78 | #define ICMPV6_ROUTER_PREF_LOW 0x3 | 87 | #define ICMPV6_ROUTER_PREF_LOW 0x3 |
79 | #define ICMPV6_ROUTER_PREF_MEDIUM 0x0 | 88 | #define ICMPV6_ROUTER_PREF_MEDIUM 0x0 |
80 | #define ICMPV6_ROUTER_PREF_HIGH 0x1 | 89 | #define ICMPV6_ROUTER_PREF_HIGH 0x1 |