multicast for v2.6.29
Subsystems (3)
include/linux/mroute.h +10 -9
@@ -33,7 +33,7 @@#define SIOCGETSGCNT (SIOCPROTOPRIVATE+1)#define SIOCGETRPF (SIOCPROTOPRIVATE+2) -#define MAXVIFS 32 +#define MAXVIFS 256typedef unsigned long vifbitmap_t ;/* User mode code depends on this lot */ typedef unsigned short vifi_t ;#define ALL_VIFS ((vifi_t)(-1))
@@ -41,7 +41,7 @@ typedef unsigned short vifi_t;/* * Same idea as select */ - +#define VIFM_SET (n,m) ((m)|=(1<<(n)))#define VIFM_CLR (n,m) ((m)&=~(1<<(n)))#define VIFM_ISSET (n,m) ((m)&(1<<(n)))
@@ -53,7 +53,7 @@ typedef unsigned short vifi_t;* Passed by mrouted for an MRT_ADD_VIF - again we use the * mrouted 3.6 structures for compatibility */ - +struct vifctl {vifi_t vifc_vifi;/* Index of VIF */ unsigned char vifc_flags;/* VIFF_ flags */
@@ -66,11 +66,12 @@ struct vifctl {#define VIFF_TUNNEL 0x1/* IPIP tunnel */ #define VIFF_SRCRT 0x2/* NI */ #define VIFF_REGISTER 0x4/* register vif */ +#define VIFF_NBMA 0x10/* * Cache manipulation structures for mrouted and PIMd */ - +struct mfcctl {struct in_addr mfcc_origin;/* Origin of mcast */
@@ -83,10 +84,10 @@ struct mfcctlint mfcc_expire; }; -/* +/* * Group count retrieval for mrouted */ - +struct sioc_sg_req {struct in_addr src;
@@ -113,7 +114,7 @@ struct sioc_vif_req* This is the format the mroute daemon expects to see IGMP control * data. Magically happens to be like an IP packet as per the original */ - +struct igmpmsg {__u32 unused1,unused2;
@@ -190,7 +191,7 @@ struct vif_device#define VIFF_STATIC 0x8000 -struct mfc_cache +struct mfc_cache {struct mfc_cache *next;/* Next entry on cache line */ __be32 mfc_mcastgrp;/* Group the entry belongs to */
@@ -224,7 +225,7 @@ struct mfc_cache#define MFC_HASH (a,b) (((((__force u32)(__be32)a)>>24)^(((__force u32)(__be32)b)>>26))&(MFC_LINES-1))#else #define MFC_HASH (a,b) ((((__force u32)(__be32)a)^(((__force u32)(__be32)b)>>2))&(MFC_LINES-1)) -#endif +#endif #endif
net/ipv4/ipmr.c +87 -26
219 lines not on this page · raw message
Whoops. This was not supposed be sent on the list as-is.
This is more of an RFC, for what I want to do in future. Multicast routing for NBMA destinations.
The patch is quick hack, and breaks ABI, and not intended for inclusion. I suppose the multicast routing would need to be updated to Netlink era before doing this kind of thing. And remove the hard coded limits such as amount of MFC destinations and that you can have only one multicast router user space process.
If you have any comments on the patch, they are appreciated.
Thanks,
Timo