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