| @@ -4,15 +4,13 @@ · 3 unmodified lines |
| 4 | #include <linux/sockios.h> | 4 | #include <linux/sockios.h> |
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | | 6 | |
| 7 | /* | 7 | /* Based on the MROUTING 3.5 defines primarily to keep |
| 8 | * Based on the MROUTING 3.5 defines primarily to keep | 8 | * source compatibility with BSD. |
| 9 | * source compatibility with BSD. | | |
| 10 | * | 9 | * |
| 11 | * See the mrouted code for the original history. | 10 | * See the mrouted code for the original history. |
| 12 | * | | |
| 13 | * Protocol Independent Multicast (PIM) data structures included | | |
| 14 | * Carlos Picoto (cap@di.fc.ul.pt) | | |
| 15 | * | 11 | * |
| | 12 | * Protocol Independent Multicast (PIM) data structures included |
| | 13 | * Carlos Picoto (cap@di.fc.ul.pt) |
| 16 | */ | 14 | */ |
| 17 | | 15 | |
| 18 | #define MRT_BASE 200 | 16 | #define MRT_BASE 200 |
| @@ -34,15 +32,13 @@ · 15 unmodified lines |
| 34 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) | 32 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) |
| 35 | #define SIOCGETRPF (SIOCPROTOPRIVATE+2) | 33 | #define SIOCGETRPF (SIOCPROTOPRIVATE+2) |
| 36 | | 34 | |
| 37 | #define MAXVIFS 32 | 35 | #define MAXVIFS 32 |
| 38 | typedef unsigned long vifbitmap_t; /* User mode code depends on this lot */ | 36 | typedef unsigned long vifbitmap_t; /* User mode code depends on this lot */ |
| 39 | typedef unsigned short vifi_t; | 37 | typedef unsigned short vifi_t; |
| 40 | #define ALL_VIFS ((vifi_t)(-1)) | 38 | #define ALL_VIFS ((vifi_t)(-1)) |
| 41 | | 39 | |
| 42 | /* | 40 | /* Same idea as select */ |
| 43 | * Same idea as select | 41 | |
| 44 | */ | | |
| 45 | | | |
| 46 | #define VIFM_SET(n,m) ((m)|=(1<<(n))) | 42 | #define VIFM_SET(n,m) ((m)|=(1<<(n))) |
| 47 | #define VIFM_CLR(n,m) ((m)&=~(1<<(n))) | 43 | #define VIFM_CLR(n,m) ((m)&=~(1<<(n))) |
| 48 | #define VIFM_ISSET(n,m) ((m)&(1<<(n))) | 44 | #define VIFM_ISSET(n,m) ((m)&(1<<(n))) |
| @@ -50,11 +46,9 @@ typedef unsigned short vifi_t; · 1 unmodified line |
| 50 | #define VIFM_COPY(mfrom,mto) ((mto)=(mfrom)) | 46 | #define VIFM_COPY(mfrom,mto) ((mto)=(mfrom)) |
| 51 | #define VIFM_SAME(m1,m2) ((m1)==(m2)) | 47 | #define VIFM_SAME(m1,m2) ((m1)==(m2)) |
| 52 | | 48 | |
| 53 | /* | 49 | /* Passed by mrouted for an MRT_ADD_VIF - again we use the |
| 54 | * Passed by mrouted for an MRT_ADD_VIF - again we use the | 50 | * mrouted 3.6 structures for compatibility |
| 55 | * mrouted 3.6 structures for compatibility | | |
| 56 | */ | 51 | */ |
| 57 | | | |
| 58 | struct vifctl { | 52 | struct vifctl { |
| 59 | vifi_t vifc_vifi; /* Index of VIF */ | 53 | vifi_t vifc_vifi; /* Index of VIF */ |
| 60 | unsigned char vifc_flags; /* VIFF_ flags */ | 54 | unsigned char vifc_flags; /* VIFF_ flags */ |
| @@ -73,10 +67,7 @@ struct vifctl { · 12 unmodified lines |
| 73 | #define VIFF_USE_IFINDEX 0x8 /* use vifc_lcl_ifindex instead of | 67 | #define VIFF_USE_IFINDEX 0x8 /* use vifc_lcl_ifindex instead of |
| 74 | vifc_lcl_addr to find an interface */ | 68 | vifc_lcl_addr to find an interface */ |
| 75 | | 69 | |
| 76 | /* | 70 | /* Cache manipulation structures for mrouted and PIMd */ |
| 77 | * Cache manipulation structures for mrouted and PIMd | | |
| 78 | */ | | |
| 79 | | | |
| 80 | struct mfcctl { | 71 | struct mfcctl { |
| 81 | struct in_addr mfcc_origin; /* Origin of mcast */ | 72 | struct in_addr mfcc_origin; /* Origin of mcast */ |
| 82 | struct in_addr mfcc_mcastgrp; /* Group in question */ | 73 | struct in_addr mfcc_mcastgrp; /* Group in question */ |
| @@ -88,10 +79,7 @@ struct mfcctl { · 5 unmodified lines |
| 88 | int mfcc_expire; | 79 | int mfcc_expire; |
| 89 | }; | 80 | }; |
| 90 | | 81 | |
| 91 | /* | 82 | /* Group count retrieval for mrouted */ |
| 92 | * Group count retrieval for mrouted | | |
| 93 | */ | | |
| 94 | | | |
| 95 | struct sioc_sg_req { | 83 | struct sioc_sg_req { |
| 96 | struct in_addr src; | 84 | struct in_addr src; |
| 97 | struct in_addr grp; | 85 | struct in_addr grp; |
| @@ -100,10 +88,7 @@ struct sioc_sg_req { · 2 unmodified lines |
| 100 | unsigned long wrong_if; | 88 | unsigned long wrong_if; |
| 101 | }; | 89 | }; |
| 102 | | 90 | |
| 103 | /* | 91 | /* To get vif packet counts */ |
| 104 | * To get vif packet counts | | |
| 105 | */ | | |
| 106 | | | |
| 107 | struct sioc_vif_req { | 92 | struct sioc_vif_req { |
| 108 | vifi_t vifi; /* Which iface */ | 93 | vifi_t vifi; /* Which iface */ |
| 109 | unsigned long icount; /* In packets */ | 94 | unsigned long icount; /* In packets */ |
| @@ -112,11 +97,9 @@ struct sioc_vif_req { · 2 unmodified lines |
| 112 | unsigned long obytes; /* Out bytes */ | 97 | unsigned long obytes; /* Out bytes */ |
| 113 | }; | 98 | }; |
| 114 | | 99 | |
| 115 | /* | 100 | /* This is the format the mroute daemon expects to see IGMP control |
| 116 | * This is the format the mroute daemon expects to see IGMP control | 101 | * data. Magically happens to be like an IP packet as per the original |
| 117 | * data. Magically happens to be like an IP packet as per the original | | |
| 118 | */ | 102 | */ |
| 119 | | | |
| 120 | struct igmpmsg { | 103 | struct igmpmsg { |
| 121 | __u32 unused1,unused2; | 104 | __u32 unused1,unused2; |
| 122 | unsigned char im_msgtype; /* What is this */ | 105 | unsigned char im_msgtype; /* What is this */ |
| @@ -126,21 +109,13 @@ struct igmpmsg { · 3 unmodified lines |
| 126 | struct in_addr im_src,im_dst; | 109 | struct in_addr im_src,im_dst; |
| 127 | }; | 110 | }; |
| 128 | | 111 | |
| 129 | /* | 112 | /* That's all usermode folks */ |
| 130 | * That's all usermode folks | | |
| 131 | */ | | |
| 132 | | | |
| 133 | | | |
| 134 | | 113 | |
| 135 | #define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */ | 114 | #define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */ |
| 136 | | 115 | |
| 137 | /* | 116 | /* Pseudo messages used by mrouted */ |
| 138 | * Pseudo messages used by mrouted | | |
| 139 | */ | | |
| 140 | | | |
| 141 | #define IGMPMSG_NOCACHE 1 /* Kern cache fill request to mrouted */ | 117 | #define IGMPMSG_NOCACHE 1 /* Kern cache fill request to mrouted */ |
| 142 | #define IGMPMSG_WRONGVIF 2 /* For PIM assert processing (unused) */ | 118 | #define IGMPMSG_WRONGVIF 2 /* For PIM assert processing (unused) */ |
| 143 | #define IGMPMSG_WHOLEPKT 3 /* For PIM Register processing */ | 119 | #define IGMPMSG_WHOLEPKT 3 /* For PIM Register processing */ |
| 144 | | 120 | |
| 145 | | | |
| 146 | #endif /* _UAPI__LINUX_MROUTE_H */ | 121 | #endif /* _UAPI__LINUX_MROUTE_H */ |