/* Based on the MROUTING 3.5 defines primarily to keep * source compatibility with BSD. * * See the mrouted code for the original history. * * Protocol Independent Multicast (PIM) data structures included * Carlos Picoto (cap@di.fc.ul.pt)
*/
#define MRT_BASE 200 #define MRT_INIT (MRT_BASE) /* Activate the kernel mroute code */ #define MRT_DONE (MRT_BASE+1) /* Shutdown the kernel mroute */ #define MRT_ADD_VIF (MRT_BASE+2) /* Add a virtual interface */ #define MRT_DEL_VIF (MRT_BASE+3) /* Delete a virtual interface */ #define MRT_ADD_MFC (MRT_BASE+4) /* Add a multicast forwarding entry */ #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 MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */ #define MRT_ADD_MFC_PROXY (MRT_BASE+10) /* Add a (*,*|G) mfc entry */ #define MRT_DEL_MFC_PROXY (MRT_BASE+11) /* Del a (*,*|G) mfc entry */ #define MRT_FLUSH (MRT_BASE+12) /* Flush all mfc entries and/or vifs */ #define MRT_MAX (MRT_BASE+12)
#define MAXVIFS 32 typedefunsignedlong vifbitmap_t; /* User mode code depends on this lot */ typedefunsignedshort vifi_t; #define ALL_VIFS ((vifi_t)(-1))
/* 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 */ unsignedchar vifc_flags; /* VIFF_ flags */ unsignedchar vifc_threshold; /* ttl limit */ unsignedint vifc_rate_limit; /* Rate limiter values (NI) */ union { struct in_addr vifc_lcl_addr; /* Local interface address */ int vifc_lcl_ifindex; /* Local interface index */
}; struct in_addr vifc_rmt_addr; /* IPIP tunnel addr */
};
#define VIFF_TUNNEL 0x1 /* IPIP tunnel */ #define VIFF_SRCRT 0x2 /* NI */ #define VIFF_REGISTER 0x4 /* register vif */ #define VIFF_USE_IFINDEX 0x8 /* use vifc_lcl_ifindex instead of
vifc_lcl_addr to find an interface */
/* Cache manipulation structures for mrouted and PIMd */ struct mfcctl { struct in_addr mfcc_origin; /* Origin of mcast */ struct in_addr mfcc_mcastgrp; /* Group in question */
vifi_t mfcc_parent; /* Where it arrived */ unsignedchar mfcc_ttls[MAXVIFS]; /* Where it is going */ unsignedint mfcc_pkt_cnt; /* pkt count for src-grp */ unsignedint mfcc_byte_cnt; unsignedint mfcc_wrong_if; int mfcc_expire;
};
/* To get vif packet counts */ struct sioc_vif_req {
vifi_t vifi; /* Which iface */ unsignedlong icount; /* In packets */ unsignedlong ocount; /* Out packets */ unsignedlong ibytes; /* In bytes */ unsignedlong obytes; /* Out bytes */
};
/* 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; unsignedchar im_msgtype; /* What is this */ unsignedchar im_mbz; /* Must be zero */ unsignedchar im_vif; /* Low 8 bits of Interface */ unsignedchar im_vif_hi; /* High 8 bits of Interface */ struct in_addr im_src,im_dst;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.