• 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 _ROUTER_H
20 #define _ROUTER_H
21 #define ROUTER_NAME "wanrouter"
22 #define ROUTER_VERSION 1
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define ROUTER_RELEASE 1
25 #define ROUTER_IOCTL 'W'
26 #define ROUTER_MAGIC 0x524D4157L
27 enum router_ioctls
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 {
30  ROUTER_SETUP = ROUTER_IOCTL<<8,
31  ROUTER_DOWN,
32  ROUTER_STAT,
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  ROUTER_IFNEW,
35  ROUTER_IFDEL,
36  ROUTER_IFSTAT,
37  ROUTER_USER = (ROUTER_IOCTL<<8)+16,
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31
40 };
41 #define PROC_DATA_PORT_0 0x8000
42 #define PROC_DATA_PORT_1 0x8001
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define NLPID_IP 0xCC
45 #define NLPID_SNAP 0x80
46 #define NLPID_CLNP 0x81
47 #define NLPID_ESIS 0x82
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define NLPID_ISIS 0x83
50 #define NLPID_Q933 0x08
51 #define WAN_IFNAME_SZ 15
52 #define WAN_DRVNAME_SZ 15
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define WAN_ADDRESS_SZ 31
55 #define USED_BY_FIELD 8
56 #define UDP_PTPIPE_TYPE 0x01
57 #define UDP_FPIPE_TYPE 0x02
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #define UDP_CPIPE_TYPE 0x03
60 #define UDP_DRVSTATS_TYPE 0x04
61 #define UDP_INVALID_TYPE 0x05
62 #define CMD_OK 0
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define CMD_TIMEOUT 0xFF
65 #define UDP_PKT_FRM_STACK 0x00
66 #define UDP_PKT_FRM_NETWORK 0x01
67 #define MAX_INTR_TEST_COUNTER 100
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 #define CRITICAL_IN_ISR 0xA1
70 #define CRITICAL_INTR_HANDLED 0xB1
71 typedef struct wan_x25_conf
72 {
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  unsigned lo_pvc;
75  unsigned hi_pvc;
76  unsigned lo_svc;
77  unsigned hi_svc;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  unsigned hdlc_window;
80  unsigned pkt_window;
81  unsigned t1;
82  unsigned t2;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  unsigned t4;
85  unsigned n2;
86  unsigned t10_t20;
87  unsigned t11_t21;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  unsigned t12_t22;
90  unsigned t13_t23;
91  unsigned t16_t26;
92  unsigned t28;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  unsigned r10_r20;
95  unsigned r12_r22;
96  unsigned r13_r23;
97  unsigned ccitt_compat;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  unsigned x25_conf_opt;
100  unsigned char LAPB_hdlc_only;
101  unsigned char logging;
102  unsigned char oob_on_modem;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 } wan_x25_conf_t;
105 typedef struct wan_fr_conf
106 {
107  unsigned signalling;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  unsigned t391;
110  unsigned t392;
111  unsigned n391;
112  unsigned n392;
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  unsigned n393;
115  unsigned dlci_num;
116  unsigned dlci[100];
117 } wan_fr_conf_t;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 typedef struct wan_ppp_conf
120 {
121  unsigned restart_tmr;
122  unsigned auth_rsrt_tmr;
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  unsigned auth_wait_tmr;
125  unsigned mdm_fail_tmr;
126  unsigned dtr_drop_tmr;
127  unsigned connect_tmout;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  unsigned conf_retry;
130  unsigned term_retry;
131  unsigned fail_retry;
132  unsigned auth_retry;
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  unsigned auth_options;
135  unsigned ip_options;
136  char authenticator;
137  char ip_mode;
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 } wan_ppp_conf_t;
140 typedef struct wan_chdlc_conf
141 {
142  unsigned char ignore_dcd;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  unsigned char ignore_cts;
145  unsigned char ignore_keepalive;
146  unsigned char hdlc_streaming;
147  unsigned char receive_only;
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  unsigned keepalive_tx_tmr;
150  unsigned keepalive_rx_tmr;
151  unsigned keepalive_err_margin;
152  unsigned slarp_timer;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 } wan_chdlc_conf_t;
155 typedef struct wandev_conf
156 {
157  unsigned magic;
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  unsigned config_id;
160  unsigned ioport;
161  unsigned long maddr;
162  unsigned msize;
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  int irq;
165  int dma;
166  char S514_CPU_no[1];
167  unsigned PCI_slot_no;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  char auto_pci_cfg;
170  char comm_port;
171  unsigned bps;
172  unsigned mtu;
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  unsigned udp_port;
175  unsigned char ttl;
176  unsigned char ft1;
177  char interface;
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  char clocking;
180  char line_coding;
181  char station;
182  char connection;
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184  char read_mode;
185  char receive_only;
186  char tty;
187  unsigned tty_major;
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189  unsigned tty_minor;
190  unsigned tty_mode;
191  char backup;
192  unsigned hw_opt[4];
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  unsigned reserved[4];
195  unsigned data_size;
196  void* data;
197  union
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199  {
200  wan_x25_conf_t x25;
201  wan_ppp_conf_t ppp;
202  wan_fr_conf_t fr;
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204  wan_chdlc_conf_t chdlc;
205  } u;
206 } wandev_conf_t;
207 #define WANCONFIG_X25 101
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 #define WANCONFIG_FR 102
210 #define WANCONFIG_PPP 103
211 #define WANCONFIG_CHDLC 104
212 #define WANCONFIG_BSC 105
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define WANCONFIG_HDLC 106
215 #define WANCONFIG_MPPP 107
216 #define WANOPT_OFF 0
217 #define WANOPT_ON 1
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define WANOPT_NO 0
220 #define WANOPT_YES 1
221 #define WANOPT_RS232 0
222 #define WANOPT_V35 1
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #define WANOPT_NRZ 0
225 #define WANOPT_NRZI 1
226 #define WANOPT_FM0 2
227 #define WANOPT_FM1 3
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 #define WANOPT_POINTTOPOINT 0
230 #define WANOPT_MULTIDROP 1
231 #define WANOPT_EXTERNAL 0
232 #define WANOPT_INTERNAL 1
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 #define WANOPT_DTE 0
235 #define WANOPT_DCE 1
236 #define WANOPT_CPE 0
237 #define WANOPT_NODE 1
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 #define WANOPT_SECONDARY 0
240 #define WANOPT_PRIMARY 1
241 #define WANOPT_PERMANENT 0
242 #define WANOPT_SWITCHED 1
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 #define WANOPT_ONDEMAND 2
245 #define WANOPT_FR_ANSI 1
246 #define WANOPT_FR_Q933 2
247 #define WANOPT_FR_LMI 3
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 #define WANOPT_PPP_STATIC 0
250 #define WANOPT_PPP_HOST 1
251 #define WANOPT_PPP_PEER 2
252 #define WANOPT_ONE 1
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 #define WANOPT_TWO 2
255 #define WANOPT_ONE_AND_HALF 3
256 #define WANOPT_NONE 0
257 #define WANOPT_ODD 1
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 #define WANOPT_EVEN 2
260 #define WANOPT_PRI 0
261 #define WANOPT_SEC 1
262 #define WANOPT_INTR 0
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 #define WANOPT_POLL 1
265 #define WANOPT_TTY_SYNC 0
266 #define WANOPT_TTY_ASYNC 1
267 typedef struct wandev_stat
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 {
270  unsigned state;
271  unsigned ndev;
272  unsigned connection;
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274  unsigned media_type;
275  unsigned mtu;
276  unsigned modem_status;
277  unsigned rx_frames;
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279  unsigned rx_overruns;
280  unsigned rx_crc_err;
281  unsigned rx_aborts;
282  unsigned rx_bad_length;
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284  unsigned rx_dropped;
285  unsigned tx_frames;
286  unsigned tx_underruns;
287  unsigned tx_timeouts;
288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289  unsigned tx_rejects;
290  unsigned rx_bad_format;
291  unsigned rx_bad_addr;
292  unsigned tx_retries;
293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294  unsigned reserved[16];
295 } wandev_stat_t;
296 enum wan_states
297 {
298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299  WAN_UNCONFIGURED,
300  WAN_DISCONNECTED,
301  WAN_CONNECTING,
302  WAN_CONNECTED,
303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304  WAN_LIMIT,
305  WAN_DUALPORT,
306  WAN_DISCONNECTING,
307  WAN_FT1_READY
308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309 };
310 enum {
311  WAN_LOCAL_IP,
312  WAN_POINTOPOINT_IP,
313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314  WAN_NETMASK_IP,
315  WAN_BROADCAST_IP
316 };
317 #define WAN_MODEM_CTS 0x0001
318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319 #define WAN_MODEM_DCD 0x0002
320 #define WAN_MODEM_DTR 0x0010
321 #define WAN_MODEM_RTS 0x0020
322 typedef struct wanif_conf
323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324 {
325  unsigned magic;
326  unsigned config_id;
327  char name[WAN_IFNAME_SZ+1];
328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329  char addr[WAN_ADDRESS_SZ+1];
330  char usedby[USED_BY_FIELD];
331  unsigned idle_timeout;
332  unsigned hold_timeout;
333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334  unsigned cir;
335  unsigned bc;
336  unsigned be;
337  unsigned char enable_IPX;
338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339  unsigned char inarp;
340  unsigned inarp_interval;
341  unsigned long network_number;
342  char mc;
343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344  char local_addr[WAN_ADDRESS_SZ+1];
345  unsigned char port;
346  unsigned char protocol;
347  char pap;
348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349  char chap;
350  unsigned char userid[511];
351  unsigned char passwd[511];
352  unsigned char sysname[31];
353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354  unsigned char ignore_dcd;
355  unsigned char ignore_cts;
356  unsigned char ignore_keepalive;
357  unsigned char hdlc_streaming;
358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359  unsigned keepalive_tx_tmr;
360  unsigned keepalive_rx_tmr;
361  unsigned keepalive_err_margin;
362  unsigned slarp_timer;
363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364  unsigned char ttl;
365  char interface;
366  char clocking;
367  unsigned bps;
368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369  unsigned mtu;
370  unsigned char if_down;
371  unsigned char gateway;
372  unsigned char true_if_encoding;
373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374  unsigned char asy_data_trans;
375  unsigned char rts_hs_for_receive;
376  unsigned char xon_xoff_hs_for_receive;
377  unsigned char xon_xoff_hs_for_transmit;
378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379  unsigned char dcd_hs_for_transmit;
380  unsigned char cts_hs_for_transmit;
381  unsigned char async_mode;
382  unsigned tx_bits_per_char;
383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
384  unsigned rx_bits_per_char;
385  unsigned stop_bits;
386  unsigned char parity;
387  unsigned break_timer;
388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
389  unsigned inter_char_timer;
390  unsigned rx_complete_length;
391  unsigned xon_char;
392  unsigned xoff_char;
393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
394  unsigned char receive_only;
395 } wanif_conf_t;
396 #endif
397