]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/igmp.h
PM: introduce hibernation and suspend notifiers
[karo-tx-linux.git] / include / linux / igmp.h
index 21dd5690527118b1987c8e24234744c501ca926d..f510e7e382a89f59c68ddc4e306bb32d8749d2ad 100644 (file)
@@ -30,7 +30,7 @@ struct igmphdr
 {
        __u8 type;
        __u8 code;              /* For newer IGMP */
-       __be16 csum;
+       __sum16 csum;
        __be32 group;
 };
 
@@ -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_transport_header(skb);
+}
+
+static inline struct igmpv3_report *
+                       igmpv3_report_hdr(const struct sk_buff *skb)
+{
+       return (struct igmpv3_report *)skb_transport_header(skb);
+}
+
+static inline struct igmpv3_query *
+                       igmpv3_query_hdr(const struct sk_buff *skb)
+{
+       return (struct igmpv3_query *)skb_transport_header(skb);
+}
+#endif
+
 #define IGMP_HOST_MEMBERSHIP_QUERY     0x11    /* From RFC1112 */
 #define IGMP_HOST_MEMBERSHIP_REPORT    0x12    /* Ditto */
 #define IGMP_DVMRP                     0x13    /* DVMRP routing */
@@ -127,6 +148,7 @@ struct igmpv3_query {
 
 #ifdef __KERNEL__
 #include <linux/skbuff.h>
+#include <linux/timer.h>
 #include <linux/in.h>
 
 extern int sysctl_igmp_max_memberships;
@@ -217,5 +239,7 @@ extern void ip_mc_up(struct in_device *);
 extern void ip_mc_down(struct in_device *);
 extern void ip_mc_dec_group(struct in_device *in_dev, __be32 addr);
 extern void ip_mc_inc_group(struct in_device *in_dev, __be32 addr);
+extern void ip_mc_rejoin_group(struct ip_mc_list *im);
+
 #endif
 #endif