• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _IP_VS_H
20 #define _IP_VS_H
21 #include <linux/types.h>
22 #define IP_VS_VERSION_CODE 0x010201
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define NVERSION(version)   (version >> 16) & 0xFF,   (version >> 8) & 0xFF,   version & 0xFF
25 #define IP_VS_SVC_F_PERSISTENT 0x0001
26 #define IP_VS_SVC_F_HASHED 0x0002
27 #define IP_VS_SVC_F_ONEPACKET 0x0004
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define IP_VS_DEST_F_AVAILABLE 0x0001
30 #define IP_VS_DEST_F_OVERLOAD 0x0002
31 #define IP_VS_STATE_NONE 0x0000
32 #define IP_VS_STATE_MASTER 0x0001
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define IP_VS_STATE_BACKUP 0x0002
35 #define IP_VS_BASE_CTL (64+1024+64)
36 #define IP_VS_SO_SET_NONE IP_VS_BASE_CTL
37 #define IP_VS_SO_SET_INSERT (IP_VS_BASE_CTL+1)
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define IP_VS_SO_SET_ADD (IP_VS_BASE_CTL+2)
40 #define IP_VS_SO_SET_EDIT (IP_VS_BASE_CTL+3)
41 #define IP_VS_SO_SET_DEL (IP_VS_BASE_CTL+4)
42 #define IP_VS_SO_SET_FLUSH (IP_VS_BASE_CTL+5)
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define IP_VS_SO_SET_LIST (IP_VS_BASE_CTL+6)
45 #define IP_VS_SO_SET_ADDDEST (IP_VS_BASE_CTL+7)
46 #define IP_VS_SO_SET_DELDEST (IP_VS_BASE_CTL+8)
47 #define IP_VS_SO_SET_EDITDEST (IP_VS_BASE_CTL+9)
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define IP_VS_SO_SET_TIMEOUT (IP_VS_BASE_CTL+10)
50 #define IP_VS_SO_SET_STARTDAEMON (IP_VS_BASE_CTL+11)
51 #define IP_VS_SO_SET_STOPDAEMON (IP_VS_BASE_CTL+12)
52 #define IP_VS_SO_SET_RESTORE (IP_VS_BASE_CTL+13)
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define IP_VS_SO_SET_SAVE (IP_VS_BASE_CTL+14)
55 #define IP_VS_SO_SET_ZERO (IP_VS_BASE_CTL+15)
56 #define IP_VS_SO_SET_MAX IP_VS_SO_SET_ZERO
57 #define IP_VS_SO_GET_VERSION IP_VS_BASE_CTL
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #define IP_VS_SO_GET_INFO (IP_VS_BASE_CTL+1)
60 #define IP_VS_SO_GET_SERVICES (IP_VS_BASE_CTL+2)
61 #define IP_VS_SO_GET_SERVICE (IP_VS_BASE_CTL+3)
62 #define IP_VS_SO_GET_DESTS (IP_VS_BASE_CTL+4)
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define IP_VS_SO_GET_DEST (IP_VS_BASE_CTL+5)
65 #define IP_VS_SO_GET_TIMEOUT (IP_VS_BASE_CTL+6)
66 #define IP_VS_SO_GET_DAEMON (IP_VS_BASE_CTL+7)
67 #define IP_VS_SO_GET_MAX IP_VS_SO_GET_DAEMON
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 #define IP_VS_CONN_F_FWD_MASK 0x0007
70 #define IP_VS_CONN_F_MASQ 0x0000
71 #define IP_VS_CONN_F_LOCALNODE 0x0001
72 #define IP_VS_CONN_F_TUNNEL 0x0002
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 #define IP_VS_CONN_F_DROUTE 0x0003
75 #define IP_VS_CONN_F_BYPASS 0x0004
76 #define IP_VS_CONN_F_SYNC 0x0020
77 #define IP_VS_CONN_F_HASHED 0x0040
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define IP_VS_CONN_F_NOOUTPUT 0x0080
80 #define IP_VS_CONN_F_INACTIVE 0x0100
81 #define IP_VS_CONN_F_OUT_SEQ 0x0200
82 #define IP_VS_CONN_F_IN_SEQ 0x0400
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #define IP_VS_CONN_F_SEQ_MASK 0x0600
85 #define IP_VS_CONN_F_NO_CPORT 0x0800
86 #define IP_VS_CONN_F_TEMPLATE 0x1000
87 #define IP_VS_CONN_F_ONE_PACKET 0x2000
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define IP_VS_CONN_F_BACKUP_MASK (IP_VS_CONN_F_FWD_MASK |   IP_VS_CONN_F_NOOUTPUT |   IP_VS_CONN_F_INACTIVE |   IP_VS_CONN_F_SEQ_MASK |   IP_VS_CONN_F_NO_CPORT |   IP_VS_CONN_F_TEMPLATE   )
90 #define IP_VS_CONN_F_BACKUP_UPD_MASK (IP_VS_CONN_F_INACTIVE |   IP_VS_CONN_F_SEQ_MASK)
91 #define IP_VS_CONN_F_NFCT (1 << 16)
92 #define IP_VS_CONN_F_DEST_MASK (IP_VS_CONN_F_FWD_MASK |   IP_VS_CONN_F_ONE_PACKET |   IP_VS_CONN_F_NFCT |   0)
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define IP_VS_SCHEDNAME_MAXLEN 16
95 #define IP_VS_PENAME_MAXLEN 16
96 #define IP_VS_IFNAME_MAXLEN 16
97 #define IP_VS_PEDATA_MAXLEN 255
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 struct ip_vs_service_user {
100  __u16 protocol;
101  __be32 addr;
102  __be16 port;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104  __u32 fwmark;
105  char sched_name[IP_VS_SCHEDNAME_MAXLEN];
106  unsigned int flags;
107  unsigned int timeout;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  __be32 netmask;
110 };
111 struct ip_vs_dest_user {
112  __be32 addr;
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  __be16 port;
115  unsigned int conn_flags;
116  int weight;
117  __u32 u_threshold;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  __u32 l_threshold;
120 };
121 struct ip_vs_stats_user {
122  __u32 conns;
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  __u32 inpkts;
125  __u32 outpkts;
126  __u64 inbytes;
127  __u64 outbytes;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  __u32 cps;
130  __u32 inpps;
131  __u32 outpps;
132  __u32 inbps;
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  __u32 outbps;
135 };
136 struct ip_vs_getinfo {
137  unsigned int version;
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  unsigned int size;
140  unsigned int num_services;
141 };
142 struct ip_vs_service_entry {
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  __u16 protocol;
145  __be32 addr;
146  __be16 port;
147  __u32 fwmark;
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  char sched_name[IP_VS_SCHEDNAME_MAXLEN];
150  unsigned int flags;
151  unsigned int timeout;
152  __be32 netmask;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154  unsigned int num_dests;
155  struct ip_vs_stats_user stats;
156 };
157 struct ip_vs_dest_entry {
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  __be32 addr;
160  __be16 port;
161  unsigned int conn_flags;
162  int weight;
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  __u32 u_threshold;
165  __u32 l_threshold;
166  __u32 activeconns;
167  __u32 inactconns;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  __u32 persistconns;
170  struct ip_vs_stats_user stats;
171 };
172 struct ip_vs_get_dests {
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  __u16 protocol;
175  __be32 addr;
176  __be16 port;
177  __u32 fwmark;
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  unsigned int num_dests;
180  struct ip_vs_dest_entry entrytable[0];
181 };
182 struct ip_vs_get_services {
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184  unsigned int num_services;
185  struct ip_vs_service_entry entrytable[0];
186 };
187 struct ip_vs_timeout_user {
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189  int tcp_timeout;
190  int tcp_fin_timeout;
191  int udp_timeout;
192 };
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 struct ip_vs_daemon_user {
195  int state;
196  char mcast_ifn[IP_VS_IFNAME_MAXLEN];
197  int syncid;
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 };
200 #define IPVS_GENL_NAME "IPVS"
201 #define IPVS_GENL_VERSION 0x1
202 struct ip_vs_flags {
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204  __u32 flags;
205  __u32 mask;
206 };
207 enum {
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209  IPVS_CMD_UNSPEC = 0,
210  IPVS_CMD_NEW_SERVICE,
211  IPVS_CMD_SET_SERVICE,
212  IPVS_CMD_DEL_SERVICE,
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214  IPVS_CMD_GET_SERVICE,
215  IPVS_CMD_NEW_DEST,
216  IPVS_CMD_SET_DEST,
217  IPVS_CMD_DEL_DEST,
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219  IPVS_CMD_GET_DEST,
220  IPVS_CMD_NEW_DAEMON,
221  IPVS_CMD_DEL_DAEMON,
222  IPVS_CMD_GET_DAEMON,
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224  IPVS_CMD_SET_CONFIG,
225  IPVS_CMD_GET_CONFIG,
226  IPVS_CMD_SET_INFO,
227  IPVS_CMD_GET_INFO,
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229  IPVS_CMD_ZERO,
230  IPVS_CMD_FLUSH,
231  __IPVS_CMD_MAX,
232 };
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 #define IPVS_CMD_MAX (__IPVS_CMD_MAX - 1)
235 enum {
236  IPVS_CMD_ATTR_UNSPEC = 0,
237  IPVS_CMD_ATTR_SERVICE,
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239  IPVS_CMD_ATTR_DEST,
240  IPVS_CMD_ATTR_DAEMON,
241  IPVS_CMD_ATTR_TIMEOUT_TCP,
242  IPVS_CMD_ATTR_TIMEOUT_TCP_FIN,
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244  IPVS_CMD_ATTR_TIMEOUT_UDP,
245  __IPVS_CMD_ATTR_MAX,
246 };
247 #define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1)
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 enum {
250  IPVS_SVC_ATTR_UNSPEC = 0,
251  IPVS_SVC_ATTR_AF,
252  IPVS_SVC_ATTR_PROTOCOL,
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254  IPVS_SVC_ATTR_ADDR,
255  IPVS_SVC_ATTR_PORT,
256  IPVS_SVC_ATTR_FWMARK,
257  IPVS_SVC_ATTR_SCHED_NAME,
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259  IPVS_SVC_ATTR_FLAGS,
260  IPVS_SVC_ATTR_TIMEOUT,
261  IPVS_SVC_ATTR_NETMASK,
262  IPVS_SVC_ATTR_STATS,
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264  IPVS_SVC_ATTR_PE_NAME,
265  __IPVS_SVC_ATTR_MAX,
266 };
267 #define IPVS_SVC_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1)
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 enum {
270  IPVS_DEST_ATTR_UNSPEC = 0,
271  IPVS_DEST_ATTR_ADDR,
272  IPVS_DEST_ATTR_PORT,
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274  IPVS_DEST_ATTR_FWD_METHOD,
275  IPVS_DEST_ATTR_WEIGHT,
276  IPVS_DEST_ATTR_U_THRESH,
277  IPVS_DEST_ATTR_L_THRESH,
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279  IPVS_DEST_ATTR_ACTIVE_CONNS,
280  IPVS_DEST_ATTR_INACT_CONNS,
281  IPVS_DEST_ATTR_PERSIST_CONNS,
282  IPVS_DEST_ATTR_STATS,
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284  __IPVS_DEST_ATTR_MAX,
285 };
286 #define IPVS_DEST_ATTR_MAX (__IPVS_DEST_ATTR_MAX - 1)
287 enum {
288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289  IPVS_DAEMON_ATTR_UNSPEC = 0,
290  IPVS_DAEMON_ATTR_STATE,
291  IPVS_DAEMON_ATTR_MCAST_IFN,
292  IPVS_DAEMON_ATTR_SYNC_ID,
293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294  __IPVS_DAEMON_ATTR_MAX,
295 };
296 #define IPVS_DAEMON_ATTR_MAX (__IPVS_DAEMON_ATTR_MAX - 1)
297 enum {
298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299  IPVS_STATS_ATTR_UNSPEC = 0,
300  IPVS_STATS_ATTR_CONNS,
301  IPVS_STATS_ATTR_INPKTS,
302  IPVS_STATS_ATTR_OUTPKTS,
303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304  IPVS_STATS_ATTR_INBYTES,
305  IPVS_STATS_ATTR_OUTBYTES,
306  IPVS_STATS_ATTR_CPS,
307  IPVS_STATS_ATTR_INPPS,
308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309  IPVS_STATS_ATTR_OUTPPS,
310  IPVS_STATS_ATTR_INBPS,
311  IPVS_STATS_ATTR_OUTBPS,
312  __IPVS_STATS_ATTR_MAX,
313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314 };
315 #define IPVS_STATS_ATTR_MAX (__IPVS_STATS_ATTR_MAX - 1)
316 enum {
317  IPVS_INFO_ATTR_UNSPEC = 0,
318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319  IPVS_INFO_ATTR_VERSION,
320  IPVS_INFO_ATTR_CONN_TAB_SIZE,
321  __IPVS_INFO_ATTR_MAX,
322 };
323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324 #define IPVS_INFO_ATTR_MAX (__IPVS_INFO_ATTR_MAX - 1)
325 #endif
326