diff options
Diffstat (limited to 'include/linux/mroute.h')
-rw-r--r-- | include/linux/mroute.h | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 6772a60f8..c0dc052b2 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h @@ -21,9 +21,11 @@ #define MRT_DEL_MFC (MRT_BASE+5) /* Delete a multicast forwarding entry */ #define MRT_VERSION (MRT_BASE+6) /* Get the kernel multicast version */ #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ +#define MRT_PIM (MRT_BASE+8) /* enable PIM code */ #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) +#define SIOCGETRPF (SIOCPROTOPRIVATE+2) #define MAXVIFS 32 typedef unsigned long vifbitmap_t; /* User mode code depends on this lot */ @@ -56,10 +58,18 @@ struct vifctl { }; #define VIFF_TUNNEL 0x1 /* IPIP tunnel */ -#define VIFF_SRCRT 0x02 /* NI */ +#define VIFF_SRCRT 0x2 /* NI */ + + +/* PIM Vif Flags */ +#define VIFF_DR 0x0010 /* designated router */ +#define VIFF_NOMRT 0x0020 /* no neighbor on vif */ +#define VIFF_DOWN 0x0040 /* interface is down */ +#define VIFF_DISABLED 0x0080 /* disabled interafce */ +#define VIFF_REGISTER 0x00A0 /* MIssing cap@di.fc.ul.pt */ /* - * Cache manipulation structures for mrouted + * Cache manipulation structures for mrouted and PIMd */ struct mfcctl @@ -68,6 +78,10 @@ struct mfcctl struct in_addr mfcc_mcastgrp; /* Group in question */ vifi_t mfcc_parent; /* Where it arrived */ unsigned char mfcc_ttls[MAXVIFS]; /* Where it is going */ + unsigned int mfcc_pkt_cnt; /* pkt count for src-grp */ + unsigned int mfcc_byte_cnt; + unsigned int mfcc_wrong_if; + int mfcc_expire; }; /* @@ -97,6 +111,16 @@ struct sioc_vif_req }; /* + * To get RPF from unicast routing table (PIM: cap@di.fc.ul.pt) + */ +struct sioc_rpf_req +{ + unsigned long source; /* Source address */ + unsigned long rpfneighbor; /* RPF */ + vifi_t iif; /* Incoming Interface */ +}; + +/* * 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 */ @@ -122,18 +146,23 @@ extern int ip_mroute_getsockopt(struct sock *, int, char *, int *); extern int ipmr_ioctl(struct sock *sk, int cmd, unsigned long arg); extern void mroute_close(struct sock *sk); extern void ipmr_forward(struct sk_buff *skb, int is_frag); +extern int ip_mr_find_tunnel(__u32, __u32); struct vif_device { - struct device *dev; /* Device we are using */ - struct route *rt_cache; /* Tunnel route cache */ + union + { + struct device *dev; /* Device we are using */ + struct rtable *rt; /* Route for tunnel */ + } u; unsigned long bytes_in,bytes_out; unsigned long pkt_in,pkt_out; /* Statistics */ unsigned long rate_limit; /* Traffic shaping (NI) */ unsigned char threshold; /* TTL threshold */ unsigned short flags; /* Control flags */ unsigned long local,remote; /* Addresses(remote for tunnels)*/ + unsigned long uptime; }; struct mfc_cache @@ -146,6 +175,14 @@ struct mfc_cache int mfc_flags; /* Flags on line */ struct sk_buff_head mfc_unresolved; /* Unresolved buffers */ int mfc_queuelen; /* Unresolved buffer counter */ + unsigned mfc_last_assert; + int mfc_minvif; + int mfc_maxvif; + unsigned long uptime; + unsigned long expire; + unsigned long mfc_bytes; + unsigned long mfc_pkt; + unsigned long mfc_wrong_if; unsigned char mfc_ttls[MAXVIFS]; /* TTL thresholds */ }; @@ -163,11 +200,15 @@ struct mfc_cache #endif + +#define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */ + /* * Pseudo messages used by mrouted */ -#define IGMPMSG_NOCACHE 1 /* Kernel cache fill request to mrouted */ +#define IGMPMSG_NOCACHE 1 /* Kern cache fill request to mrouted */ #define IGMPMSG_WRONGVIF 2 /* For PIM assert processing (unused) */ +#define IGMPMSG_WHOLEPKT 3 /* For PIM Register processing */ #endif |