6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
#ifndef _UAPI__LINUX_MROUTE_H
#define _UAPI__LINUX_MROUTE_H
#include <linux/sockios.h>
#include <linux/types.h>
#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_MAX (MRT_BASE+11)
#define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */
#define SIOCGETSGCNT (SIOCPROTOPRIVATE+1)
#define SIOCGETRPF (SIOCPROTOPRIVATE+2)
#define MAXVIFS 32
typedef unsigned long vifbitmap_t;
typedef unsigned short vifi_t;
#define ALL_VIFS ((vifi_t)(-1))
#define VIFM_SET(n,m) ((m)|=(1<<(n)))
#define VIFM_CLR(n,m) ((m)&=~(1<<(n)))
#define VIFM_ISSET(n,m) ((m)&(1<<(n)))
#define VIFM_CLRALL(m) ((m)=0)
#define VIFM_COPY(mfrom,mto) ((mto)=(mfrom))
#define VIFM_SAME(m1,m2) ((m1)==(m2))
struct vifctl {
vifi_t vifc_vifi;
unsigned char vifc_flags;
unsigned char vifc_threshold;
unsigned int vifc_rate_limit;
union {
struct in_addr vifc_lcl_addr;
int vifc_lcl_ifindex;
};
struct in_addr vifc_rmt_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 */
struct mfcctl {
struct in_addr mfcc_origin;
struct in_addr mfcc_mcastgrp;
vifi_t mfcc_parent;
unsigned char mfcc_ttls[MAXVIFS];
unsigned int mfcc_pkt_cnt;
unsigned int mfcc_byte_cnt;
unsigned int mfcc_wrong_if;
int mfcc_expire;
};
struct sioc_sg_req {
struct in_addr src;
struct in_addr grp;
unsigned long pktcnt;
unsigned long bytecnt;
unsigned long wrong_if;
};
struct sioc_vif_req {
vifi_t vifi;
unsigned long icount;
unsigned long ocount;
unsigned long ibytes;
unsigned long obytes;
};
struct igmpmsg {
__u32 unused1,unused2;
unsigned char im_msgtype;
unsigned char im_mbz;
unsigned char im_vif;
unsigned char unused3;
struct in_addr im_src,im_dst;
};
#define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */
#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 /* _UAPI__LINUX_MROUTE_H */
|