1 /****************************************************************************
2 ****************************************************************************
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.
10 ****************************************************************************
11 ****************************************************************************/
15 #define ROUTER_NAME "wanrouter"
16 #define ROUTER_VERSION 1
17 #define ROUTER_RELEASE 1
18 #define ROUTER_IOCTL 'W'
19 #define ROUTER_MAGIC 0x524D4157L
23 ROUTER_SETUP = ROUTER_IOCTL<<8,
29 ROUTER_USER = (ROUTER_IOCTL<<8)+16,
30 ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31
33 #define PROC_DATA_PORT_0 0x8000
34 #define PROC_DATA_PORT_1 0x8001
37 #define NLPID_SNAP 0x80
38 #define NLPID_CLNP 0x81
39 #define NLPID_ESIS 0x82
40 #define NLPID_ISIS 0x83
41 #define NLPID_Q933 0x08
43 #define WAN_IFNAME_SZ 15
44 #define WAN_DRVNAME_SZ 15
45 #define WAN_ADDRESS_SZ 31
46 #define USED_BY_FIELD 8
48 #define UDP_PTPIPE_TYPE 0x01
49 #define UDP_FPIPE_TYPE 0x02
50 #define UDP_CPIPE_TYPE 0x03
51 #define UDP_DRVSTATS_TYPE 0x04
52 #define UDP_INVALID_TYPE 0x05
55 #define CMD_TIMEOUT 0xFF
57 #define UDP_PKT_FRM_STACK 0x00
58 #define UDP_PKT_FRM_NETWORK 0x01
60 #define MAX_INTR_TEST_COUNTER 100
62 #define CRITICAL_IN_ISR 0xA1
63 #define CRITICAL_INTR_HANDLED 0xB1
65 typedef struct wan_x25_conf
86 unsigned ccitt_compat;
87 unsigned x25_conf_opt;
88 unsigned char LAPB_hdlc_only;
89 unsigned char logging;
90 unsigned char oob_on_modem;
93 typedef struct wan_fr_conf
105 typedef struct wan_ppp_conf
107 unsigned restart_tmr;
108 unsigned auth_rsrt_tmr;
109 unsigned auth_wait_tmr;
110 unsigned mdm_fail_tmr;
111 unsigned dtr_drop_tmr;
112 unsigned connect_tmout;
117 unsigned auth_options;
123 typedef struct wan_chdlc_conf
125 unsigned char ignore_dcd;
126 unsigned char ignore_cts;
127 unsigned char ignore_keepalive;
128 unsigned char hdlc_streaming;
129 unsigned char receive_only;
130 unsigned keepalive_tx_tmr;
131 unsigned keepalive_rx_tmr;
132 unsigned keepalive_err_margin;
133 unsigned slarp_timer;
136 typedef struct wandev_conf
147 unsigned PCI_slot_no;
168 unsigned reserved[4];
177 wan_chdlc_conf_t chdlc;
181 #define WANCONFIG_X25 101
182 #define WANCONFIG_FR 102
183 #define WANCONFIG_PPP 103
184 #define WANCONFIG_CHDLC 104
185 #define WANCONFIG_BSC 105
186 #define WANCONFIG_HDLC 106
187 #define WANCONFIG_MPPP 107
194 #define WANOPT_RS232 0
198 #define WANOPT_NRZI 1
202 #define WANOPT_POINTTOPOINT 0
203 #define WANOPT_MULTIDROP 1
205 #define WANOPT_EXTERNAL 0
206 #define WANOPT_INTERNAL 1
211 #define WANOPT_NODE 1
212 #define WANOPT_SECONDARY 0
213 #define WANOPT_PRIMARY 1
215 #define WANOPT_PERMANENT 0
216 #define WANOPT_SWITCHED 1
217 #define WANOPT_ONDEMAND 2
219 #define WANOPT_FR_ANSI 1
220 #define WANOPT_FR_Q933 2
221 #define WANOPT_FR_LMI 3
223 #define WANOPT_PPP_STATIC 0
224 #define WANOPT_PPP_HOST 1
225 #define WANOPT_PPP_PEER 2
229 #define WANOPT_ONE_AND_HALF 3
231 #define WANOPT_NONE 0
233 #define WANOPT_EVEN 2
238 #define WANOPT_INTR 0
239 #define WANOPT_POLL 1
241 #define WANOPT_TTY_SYNC 0
242 #define WANOPT_TTY_ASYNC 1
244 typedef struct wandev_stat
253 unsigned modem_status;
255 unsigned rx_overruns;
258 unsigned rx_bad_length;
261 unsigned tx_underruns;
262 unsigned tx_timeouts;
265 unsigned rx_bad_format;
266 unsigned rx_bad_addr;
268 unsigned reserved[16];
290 #define WAN_MODEM_CTS 0x0001
291 #define WAN_MODEM_DCD 0x0002
292 #define WAN_MODEM_DTR 0x0010
293 #define WAN_MODEM_RTS 0x0020
295 typedef struct wanif_conf
299 char name[WAN_IFNAME_SZ+1];
300 char addr[WAN_ADDRESS_SZ+1];
301 char usedby[USED_BY_FIELD];
302 unsigned idle_timeout;
303 unsigned hold_timeout;
307 unsigned char enable_IPX;
309 unsigned inarp_interval;
310 unsigned long network_number;
312 char local_addr[WAN_ADDRESS_SZ+1];
314 unsigned char protocol;
317 unsigned char userid[511];
318 unsigned char passwd[511];
319 unsigned char sysname[31];
320 unsigned char ignore_dcd;
321 unsigned char ignore_cts;
322 unsigned char ignore_keepalive;
323 unsigned char hdlc_streaming;
324 unsigned keepalive_tx_tmr;
325 unsigned keepalive_rx_tmr;
326 unsigned keepalive_err_margin;
327 unsigned slarp_timer;
333 unsigned char if_down;
334 unsigned char gateway;
335 unsigned char true_if_encoding;
337 unsigned char asy_data_trans;
338 unsigned char rts_hs_for_receive;
339 unsigned char xon_xoff_hs_for_receive;
340 unsigned char xon_xoff_hs_for_transmit;
341 unsigned char dcd_hs_for_transmit;
342 unsigned char cts_hs_for_transmit;
343 unsigned char async_mode;
344 unsigned tx_bits_per_char;
345 unsigned rx_bits_per_char;
347 unsigned char parity;
348 unsigned break_timer;
349 unsigned inter_char_timer;
350 unsigned rx_complete_length;
353 unsigned char receive_only;