[IPV4] MROUTE: Move PIM definitions to <linux/pim.h>.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Thu, 3 Apr 2008 00:22:09 +0000 (09:22 +0900)
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Fri, 4 Apr 2008 01:44:42 +0000 (10:44 +0900)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
include/linux/Kbuild
include/linux/mroute.h
include/linux/pim.h [new file with mode: 0644]

index 9cdd12a..84736ac 100644 (file)
@@ -289,6 +289,7 @@ unifdef-y += parport.h
 unifdef-y += patchkey.h
 unifdef-y += pci.h
 unifdef-y += personality.h
+unifdef-y += pim.h
 unifdef-y += pktcdvd.h
 unifdef-y += pmu.h
 unifdef-y += poll.h
index 35a8277..c41b421 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <linux/sockios.h>
 #include <linux/in.h>
+#include <linux/pim.h>
 
 /*
  *     Based on the MROUTING 3.5 defines primarily to keep
@@ -210,27 +211,6 @@ struct mfc_cache
 #define IGMPMSG_WHOLEPKT       3               /* For PIM Register processing */
 
 #ifdef __KERNEL__
-
-#define PIM_V1_VERSION         __constant_htonl(0x10000000)
-#define PIM_V1_REGISTER                1
-
-#define PIM_VERSION            2
-#define PIM_REGISTER           1
-
-#define PIM_NULL_REGISTER      __constant_htonl(0x40000000)
-
-/* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
-
-struct pimreghdr
-{
-       __u8    type;
-       __u8    reserved;
-       __be16  csum;
-       __be32  flags;
-};
-
-extern int pim_rcv_v1(struct sk_buff *);
-
 struct rtmsg;
 extern int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait);
 #endif
diff --git a/include/linux/pim.h b/include/linux/pim.h
new file mode 100644 (file)
index 0000000..6f689dc
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __LINUX_PIM_H
+#define __LINUX_PIM_H
+
+#include <asm/byteorder.h>
+
+/* Message types - V1 */
+#define PIM_V1_VERSION         __constant_htonl(0x10000000)
+#define PIM_V1_REGISTER                1
+
+/* Message types - V2 */
+#define PIM_VERSION            2
+#define PIM_REGISTER           1
+
+#if defined(__KERNEL__)
+#define PIM_NULL_REGISTER      __constant_htonl(0x40000000)
+
+/* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
+struct pimreghdr
+{
+       __u8    type;
+       __u8    reserved;
+       __be16  csum;
+       __be32  flags;
+};
+
+struct sk_buff;
+extern int pim_rcv_v1(struct sk_buff *);
+#endif
+#endif