summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-13 20:19:23 +0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 09:25:21 +0400
commitd9edf9e2be0f7661558984c32bd53867a7037fd3 (patch)
tree603271a9d0756e229ad9ff13c628a33306c96bdf /include
parentcc70ab261c9f997589546100ddec5da6bfd89c4e (diff)
downloadlinux-d9edf9e2be0f7661558984c32bd53867a7037fd3.tar.xz
[SK_BUFF]: Introduce igmp_hdr() & friends, remove skb->h.igmph
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/igmp.h21
-rw-r--r--include/linux/skbuff.h1
2 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index a113fe68d8a1..ca285527b879 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -80,6 +80,27 @@ struct igmpv3_query {
__be32 srcs[0];
};
+#ifdef __KERNEL__
+#include <linux/skbuff.h>
+
+static inline struct igmphdr *igmp_hdr(const struct sk_buff *skb)
+{
+ return (struct igmphdr *)skb->h.raw;
+}
+
+static inline struct igmpv3_report *
+ igmpv3_report_hdr(const struct sk_buff *skb)
+{
+ return (struct igmpv3_report *)skb->h.raw;
+}
+
+static inline struct igmpv3_query *
+ igmpv3_query_hdr(const struct sk_buff *skb)
+{
+ return (struct igmpv3_query *)skb->h.raw;
+}
+#endif
+
#define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* From RFC1112 */
#define IGMP_HOST_MEMBERSHIP_REPORT 0x12 /* Ditto */
#define IGMP_DVMRP 0x13 /* DVMRP routing */
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 684292efa823..0a4a7ac034fa 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -240,7 +240,6 @@ struct sk_buff {
struct tcphdr *th;
struct udphdr *uh;
struct icmphdr *icmph;
- struct igmphdr *igmph;
struct iphdr *ipiph;
struct ipv6hdr *ipv6h;
unsigned char *raw;