Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/driver...
[linux-2.6/verdex.git] / include / linux / sdla_ppp.h
blob6f3923179c29f345d36bfdab28cd5f166508b5f8
1 /*****************************************************************************
2 * sdla_ppp.h Sangoma PPP firmware API definitions.
4 * Author: Nenad Corbic <ncorbic@sangoma.com>
6 * Copyright: (c) 1995-1997 Sangoma Technologies Inc.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 * ============================================================================
13 * Feb 24, 2000 Nenad Corbic v2.1.2
14 * Jan 06, 1997 Gene Kozin v2.0
15 * Apr 11, 1996 Gene Kozin Initial version.
16 *****************************************************************************/
17 #ifndef _SDLA_PPP_H
18 #define _SDLA_PPP_H
20 /*----------------------------------------------------------------------------
21 * Notes:
22 * ------
23 * 1. All structures defined in this file are byte-alined.
25 * Compiler Platform
26 * -------- --------
27 * GNU C Linux
30 #ifndef PACKED
31 # define PACKED __attribute__((packed))
32 #endif /* PACKED */
34 /* Adapter memory layout and important constants */
35 #define PPP508_MB_VECT 0xE000 /* mailbox window vector */
36 #define PPP508_MB_OFFS 0 /* mailbox offset */
37 #define PPP508_FLG_OFFS 0x1000 /* status flags offset */
38 #define PPP508_BUF_OFFS 0x1100 /* buffer info block offset */
39 #define PPP514_MB_OFFS 0xE000 /* mailbox offset */
40 #define PPP514_FLG_OFFS 0xF000 /* status flags offset */
41 #define PPP514_BUF_OFFS 0xF100 /* buffer info block offset */
43 #define PPP_MAX_DATA 1008 /* command block data buffer length */
45 /****** Data Structures *****************************************************/
47 /*----------------------------------------------------------------------------
48 * PPP Command Block.
50 typedef struct ppp_cmd{
51 unsigned char command PACKED; /* command code */
52 unsigned short length PACKED; /* length of data buffer */
53 unsigned char result PACKED; /* return code */
54 unsigned char rsrv[11] PACKED; /* reserved for future use */
55 } ppp_cmd_t;
57 typedef struct cblock{
58 unsigned char opp_flag PACKED;
59 unsigned char command PACKED; /* command code */
60 unsigned short length PACKED; /* length of data buffer */
61 unsigned char result PACKED; /* return code */
62 unsigned char rsrv[11] PACKED; /* reserved for future use */
63 } cblock_t;
65 typedef struct ppp_udp_pkt{
66 ip_pkt_t ip_pkt PACKED;
67 udp_pkt_t udp_pkt PACKED;
68 wp_mgmt_t wp_mgmt PACKED;
69 cblock_t cblock PACKED;
70 unsigned char data[MAX_LGTH_UDP_MGNT_PKT] PACKED;
71 } ppp_udp_pkt_t;
73 typedef struct {
74 unsigned char status PACKED;
75 unsigned char data_avail PACKED;
76 unsigned short real_length PACKED;
77 unsigned short time_stamp PACKED;
78 unsigned char data[1] PACKED;
79 } trace_pkt_t;
82 typedef struct {
83 unsigned char opp_flag PACKED;
84 unsigned char trace_type PACKED;
85 unsigned short trace_length PACKED;
86 unsigned short trace_data_ptr PACKED;
87 unsigned short trace_time_stamp PACKED;
88 } trace_element_t;
90 /* 'command' field defines */
91 #define PPP_READ_CODE_VERSION 0x10 /* configuration commands */
92 #define PPP_SET_CONFIG 0x05
93 #define PPP_READ_CONFIG 0x06
94 #define PPP_SET_INTR_FLAGS 0x20
95 #define PPP_READ_INTR_FLAGS 0x21
96 #define PPP_SET_INBOUND_AUTH 0x30
97 #define PPP_SET_OUTBOUND_AUTH 0x31
98 #define PPP_GET_CONNECTION_INFO 0x32
100 #define PPP_COMM_ENABLE 0x03 /* operational commands */
101 #define PPP_COMM_DISABLE 0x04
102 #define PPP_SEND_SIGN_FRAME 0x23
103 #define PPP_READ_SIGN_RESPONSE 0x24
104 #define PPP_DATALINE_MONITOR 0x33
106 #define PPP_READ_STATISTICS 0x07 /* statistics commands */
107 #define PPP_FLUSH_STATISTICS 0x08
108 #define PPP_READ_ERROR_STATS 0x09
109 #define PPP_FLUSH_ERROR_STATS 0x0A
110 #define PPP_READ_PACKET_STATS 0x12
111 #define PPP_FLUSH_PACKET_STATS 0x13
112 #define PPP_READ_LCP_STATS 0x14
113 #define PPP_FLUSH_LCP_STATS 0x15
114 #define PPP_READ_LPBK_STATS 0x16
115 #define PPP_FLUSH_LPBK_STATS 0x17
116 #define PPP_READ_IPCP_STATS 0x18
117 #define PPP_FLUSH_IPCP_STATS 0x19
118 #define PPP_READ_IPXCP_STATS 0x1A
119 #define PPP_FLUSH_IPXCP_STATS 0x1B
120 #define PPP_READ_PAP_STATS 0x1C
121 #define PPP_FLUSH_PAP_STATS 0x1D
122 #define PPP_READ_CHAP_STATS 0x1E
123 #define PPP_FLUSH_CHAP_STATS 0x1F
125 /* 'result' field defines */
126 #define PPPRES_OK 0x00 /* command executed successfully */
127 #define PPPRES_INVALID_STATE 0x09 /* invalid command in this context */
129 /*----------------------------------------------------------------------------
130 * PPP Mailbox.
131 * This structure is located at offset PPP???_MB_OFFS into PPP???_MB_VECT
133 typedef struct ppp_mbox
135 unsigned char flag PACKED; /* 00h: command execution flag */
136 ppp_cmd_t cmd PACKED; /* 01h: command block */
137 unsigned char data[1] PACKED; /* 10h: variable length data buffer */
138 } ppp_mbox_t;
140 /*----------------------------------------------------------------------------
141 * PPP Status Flags.
142 * This structure is located at offset PPP???_FLG_OFFS into
143 * PPP???_MB_VECT.
145 typedef struct ppp_flags
147 unsigned char iflag PACKED; /* 00: interrupt flag */
148 unsigned char imask PACKED; /* 01: interrupt mask */
149 unsigned char resrv PACKED;
150 unsigned char mstatus PACKED; /* 03: modem status */
151 unsigned char lcp_state PACKED; /* 04: LCP state */
152 unsigned char ppp_phase PACKED; /* 05: PPP phase */
153 unsigned char ip_state PACKED; /* 06: IPCP state */
154 unsigned char ipx_state PACKED; /* 07: IPXCP state */
155 unsigned char pap_state PACKED; /* 08: PAP state */
156 unsigned char chap_state PACKED; /* 09: CHAP state */
157 unsigned short disc_cause PACKED; /* 0A: disconnection cause */
158 } ppp_flags_t;
160 /* 'iflag' defines */
161 #define PPP_INTR_RXRDY 0x01 /* Rx ready */
162 #define PPP_INTR_TXRDY 0x02 /* Tx ready */
163 #define PPP_INTR_MODEM 0x04 /* modem status change (DCD, CTS) */
164 #define PPP_INTR_CMD 0x08 /* interface command completed */
165 #define PPP_INTR_DISC 0x10 /* data link disconnected */
166 #define PPP_INTR_OPEN 0x20 /* data link open */
167 #define PPP_INTR_DROP_DTR 0x40 /* DTR drop timeout expired */
168 #define PPP_INTR_TIMER 0x80 /* timer interrupt */
171 /* 'mstatus' defines */
172 #define PPP_MDM_DCD 0x08 /* mdm_status: DCD */
173 #define PPP_MDM_CTS 0x20 /* mdm_status: CTS */
175 /* 'disc_cause' defines */
176 #define PPP_LOCAL_TERMINATION 0x0001 /* Local Request by PPP termination phase */
177 #define PPP_DCD_CTS_DROP 0x0002 /* DCD and/or CTS dropped. Link down */
178 #define PPP_REMOTE_TERMINATION 0x0800 /* Remote Request by PPP termination phase */
180 /* 'misc_config_bits' defines */
181 #define DONT_RE_TX_ABORTED_I_FRAMES 0x01
182 #define TX_FRM_BYTE_COUNT_STATS 0x02
183 #define RX_FRM_BYTE_COUNT_STATS 0x04
184 #define TIME_STAMP_IN_RX_FRAMES 0x08
185 #define NON_STD_ADPTR_FREQ 0x10
186 #define INTERFACE_LEVEL_RS232 0x20
187 #define AUTO_LINK_RECOVERY 0x100
188 #define DONT_TERMINATE_LNK_MAX_CONFIG 0x200
190 /* 'authentication options' defines */
191 #define NO_AUTHENTICATION 0x00
192 #define INBOUND_AUTH 0x80
193 #define PAP_AUTH 0x01
194 #define CHAP_AUTH 0x02
196 /* 'ip options' defines */
197 #define L_AND_R_IP_NO_ASSIG 0x00
198 #define L_IP_LOCAL_ASSIG 0x01
199 #define L_IP_REMOTE_ASSIG 0x02
200 #define R_IP_LOCAL_ASSIG 0x04
201 #define R_IP_REMOTE_ASSIG 0x08
202 #define ENABLE_IP 0x80
204 /* 'ipx options' defines */
205 #define ROUTING_PROT_DEFAULT 0x20
206 #define ENABLE_IPX 0x80
207 #define DISABLE_IPX 0x00
209 /*----------------------------------------------------------------------------
210 * PPP Buffer Info.
211 * This structure is located at offset PPP508_BUF_OFFS into
212 * PPP508_MB_VECT.
214 typedef struct ppp508_buf_info
216 unsigned short txb_num PACKED; /* 00: number of transmit buffers */
217 unsigned long txb_ptr PACKED; /* 02: pointer to the buffer ctl. */
218 unsigned long txb_nxt PACKED;
219 unsigned char rsrv1[22] PACKED;
220 unsigned short rxb_num PACKED; /* 20: number of receive buffers */
221 unsigned long rxb_ptr PACKED; /* 22: pointer to the buffer ctl. */
222 unsigned long rxb1_ptr PACKED; /* 26: pointer to the first buf.ctl. */
223 unsigned long rxb_base PACKED; /* 2A: pointer to the buffer base */
224 unsigned char rsrv2[2] PACKED;
225 unsigned long rxb_end PACKED; /* 30: pointer to the buffer end */
226 } ppp508_buf_info_t;
228 /*----------------------------------------------------------------------------
229 * Transmit/Receive Buffer Control Block.
231 typedef struct ppp_buf_ctl
233 unsigned char flag PACKED; /* 00: 'buffer ready' flag */
234 unsigned short length PACKED; /* 01: length of data */
235 unsigned char reserved1[1] PACKED; /* 03: */
236 unsigned char proto PACKED; /* 04: protocol */
237 unsigned short timestamp PACKED; /* 05: time stamp (Rx only) */
238 unsigned char reserved2[5] PACKED; /* 07: */
239 union
241 unsigned short o_p[2]; /* 1C: buffer offset & page (S502) */
242 unsigned long ptr; /* 1C: buffer pointer (S508) */
243 } buf PACKED;
244 } ppp_buf_ctl_t;
246 /*----------------------------------------------------------------------------
247 * S508 Adapter Configuration Block (passed to the PPP_SET_CONFIG command).
249 typedef struct ppp508_conf
251 unsigned long line_speed PACKED; /* 00: baud rate, bps */
252 unsigned short txbuf_percent PACKED; /* 04: % of Tx buffer */
253 unsigned short conf_flags PACKED; /* 06: configuration bits */
254 unsigned short mtu_local PACKED; /* 08: local MTU */
255 unsigned short mtu_remote PACKED; /* 0A: remote MTU */
256 unsigned short restart_tmr PACKED; /* 0C: restart timer */
257 unsigned short auth_rsrt_tmr PACKED; /* 0E: authentication timer */
258 unsigned short auth_wait_tmr PACKED; /* 10: authentication timer */
259 unsigned short mdm_fail_tmr PACKED; /* 12: modem failure timer */
260 unsigned short dtr_drop_tmr PACKED; /* 14: DTR drop timer */
261 unsigned short connect_tmout PACKED; /* 16: connection timeout */
262 unsigned short conf_retry PACKED; /* 18: max. retry */
263 unsigned short term_retry PACKED; /* 1A: max. retry */
264 unsigned short fail_retry PACKED; /* 1C: max. retry */
265 unsigned short auth_retry PACKED; /* 1E: max. retry */
266 unsigned char auth_options PACKED; /* 20: authentication opt. */
267 unsigned char ip_options PACKED; /* 21: IP options */
268 unsigned long ip_local PACKED; /* 22: local IP address */
269 unsigned long ip_remote PACKED; /* 26: remote IP address */
270 unsigned char ipx_options PACKED; /* 2A: IPX options */
271 unsigned char ipx_netno[4] PACKED; /* 2B: IPX net number */
272 unsigned char ipx_local[6] PACKED; /* 2F: local IPX node number*/
273 unsigned char ipx_remote[6] PACKED; /* 35: remote IPX node num.*/
274 unsigned char ipx_router[48] PACKED; /* 3B: IPX router name*/
275 unsigned long alt_cpu_clock PACKED; /* 6B: */
276 } ppp508_conf_t;
278 /*----------------------------------------------------------------------------
279 * S508 Adapter Read Connection Information Block
280 * Returned by the PPP_GET_CONNECTION_INFO command
282 typedef struct ppp508_connect_info
284 unsigned short mru PACKED; /* 00-01 Remote Max Rec' Unit */
285 unsigned char ip_options PACKED; /* 02: Negotiated ip options */
286 unsigned long ip_local PACKED; /* 03-06: local IP address */
287 unsigned long ip_remote PACKED; /* 07-0A: remote IP address */
288 unsigned char ipx_options PACKED; /* 0B: Negotiated ipx options */
289 unsigned char ipx_netno[4] PACKED; /* 0C-0F: IPX net number */
290 unsigned char ipx_local[6] PACKED; /* 10-1F: local IPX node # */
291 unsigned char ipx_remote[6] PACKED; /* 16-1B: remote IPX node # */
292 unsigned char ipx_router[48] PACKED; /* 1C-4B: IPX router name */
293 unsigned char auth_status PACKED; /* 4C: Authentication Status */
294 unsigned char inbd_auth_peerID[1] PACKED; /* 4D: variable length inbound authenticated peer ID */
295 } ppp508_connect_info_t;
297 /* 'line_speed' field */
298 #define PPP_BITRATE_1200 0x01
299 #define PPP_BITRATE_2400 0x02
300 #define PPP_BITRATE_4800 0x03
301 #define PPP_BITRATE_9600 0x04
302 #define PPP_BITRATE_19200 0x05
303 #define PPP_BITRATE_38400 0x06
304 #define PPP_BITRATE_45000 0x07
305 #define PPP_BITRATE_56000 0x08
306 #define PPP_BITRATE_64000 0x09
307 #define PPP_BITRATE_74000 0x0A
308 #define PPP_BITRATE_112000 0x0B
309 #define PPP_BITRATE_128000 0x0C
310 #define PPP_BITRATE_156000 0x0D
312 /* Defines for the 'conf_flags' field */
313 #define PPP_IGNORE_TX_ABORT 0x01 /* don't re-transmit aborted frames */
314 #define PPP_ENABLE_TX_STATS 0x02 /* enable Tx statistics */
315 #define PPP_ENABLE_RX_STATS 0x04 /* enable Rx statistics */
316 #define PPP_ENABLE_TIMESTAMP 0x08 /* enable timestamp */
318 /* 'ip_options' defines */
319 #define PPP_LOCAL_IP_LOCAL 0x01
320 #define PPP_LOCAL_IP_REMOTE 0x02
321 #define PPP_REMOTE_IP_LOCAL 0x04
322 #define PPP_REMOTE_IP_REMOTE 0x08
324 /* 'ipx_options' defines */
325 #define PPP_REMOTE_IPX_NETNO 0x01
326 #define PPP_REMOTE_IPX_LOCAL 0x02
327 #define PPP_REMOTE_IPX_REMOTE 0x04
328 #define PPP_IPX_ROUTE_RIP_SAP 0x08
329 #define PPP_IPX_ROUTE_NLSP 0x10
330 #define PPP_IPX_ROUTE_DEFAULT 0x20
331 #define PPP_IPX_CONF_COMPLETE 0x40
332 #define PPP_IPX_ENABLE 0x80
334 /*----------------------------------------------------------------------------
335 * S508 Adapter Configuration Block (returned by the PPP_READ_CONFIG command).
337 typedef struct ppp508_get_conf
339 unsigned long bps PACKED; /* 00: baud rate, bps */
340 ppp508_conf_t conf PACKED; /* 04: requested config. */
341 unsigned short txb_num PACKED; /* 6F: number of Tx buffers */
342 unsigned short rxb_num PACKED; /* 71: number of Rx buffers */
343 } ppp508_get_conf_t;
345 /*----------------------------------------------------------------------------
346 * S508 Operational Statistics (returned by the PPP_READ_STATISTIC command).
348 typedef struct ppp508_stats
350 unsigned short reserved1 PACKED; /* 00: */
351 unsigned short rx_bad_len PACKED; /* 02: */
352 unsigned short reserved2 PACKED; /* 04: */
353 unsigned long tx_frames PACKED; /* 06: */
354 unsigned long tx_bytes PACKED; /* 0A: */
355 unsigned long rx_frames PACKED; /* 0E: */
356 unsigned long rx_bytes PACKED; /* 12: */
357 } ppp508_stats_t;
359 /*----------------------------------------------------------------------------
360 * Adapter Error Statistics (returned by the PPP_READ_ERROR_STATS command).
362 typedef struct ppp_err_stats
364 unsigned char rx_overrun PACKED; /* 00: Rx overrun errors */
365 unsigned char rx_bad_crc PACKED; /* 01: Rx CRC errors */
366 unsigned char rx_abort PACKED; /* 02: Rx aborted frames */
367 unsigned char rx_lost PACKED; /* 03: Rx frames lost */
368 unsigned char tx_abort PACKED; /* 04: Tx aborted frames */
369 unsigned char tx_underrun PACKED; /* 05: Tx underrun errors */
370 unsigned char tx_missed_intr PACKED; /* 06: Tx underruns missed */
371 unsigned char reserved PACKED; /* 07: Tx underruns missed */
372 unsigned char dcd_trans PACKED; /* 08: DCD transitions */
373 unsigned char cts_trans PACKED; /* 09: CTS transitions */
374 } ppp_err_stats_t;
376 /*----------------------------------------------------------------------------
377 * Packet Statistics (returned by the PPP_READ_PACKET_STATS command).
379 typedef struct ppp_pkt_stats
381 unsigned short rx_bad_header PACKED; /* 00: */
382 unsigned short rx_prot_unknwn PACKED; /* 02: */
383 unsigned short rx_too_large PACKED; /* 04: */
384 unsigned short rx_lcp PACKED; /* 06: */
385 unsigned short tx_lcp PACKED; /* 08: */
386 unsigned short rx_ipcp PACKED; /* 0A: */
387 unsigned short tx_ipcp PACKED; /* 0C: */
388 unsigned short rx_ipxcp PACKED; /* 0E: */
389 unsigned short tx_ipxcp PACKED; /* 10: */
390 unsigned short rx_pap PACKED; /* 12: */
391 unsigned short tx_pap PACKED; /* 14: */
392 unsigned short rx_chap PACKED; /* 16: */
393 unsigned short tx_chap PACKED; /* 18: */
394 unsigned short rx_lqr PACKED; /* 1A: */
395 unsigned short tx_lqr PACKED; /* 1C: */
396 unsigned short rx_ip PACKED; /* 1E: */
397 unsigned short tx_ip PACKED; /* 20: */
398 unsigned short rx_ipx PACKED; /* 22: */
399 unsigned short tx_ipx PACKED; /* 24: */
400 } ppp_pkt_stats_t;
402 /*----------------------------------------------------------------------------
403 * LCP Statistics (returned by the PPP_READ_LCP_STATS command).
405 typedef struct ppp_lcp_stats
407 unsigned short rx_unknown PACKED; /* 00: unknown LCP type */
408 unsigned short rx_conf_rqst PACKED; /* 02: Configure-Request */
409 unsigned short rx_conf_ack PACKED; /* 04: Configure-Ack */
410 unsigned short rx_conf_nak PACKED; /* 06: Configure-Nak */
411 unsigned short rx_conf_rej PACKED; /* 08: Configure-Reject */
412 unsigned short rx_term_rqst PACKED; /* 0A: Terminate-Request */
413 unsigned short rx_term_ack PACKED; /* 0C: Terminate-Ack */
414 unsigned short rx_code_rej PACKED; /* 0E: Code-Reject */
415 unsigned short rx_proto_rej PACKED; /* 10: Protocol-Reject */
416 unsigned short rx_echo_rqst PACKED; /* 12: Echo-Request */
417 unsigned short rx_echo_reply PACKED; /* 14: Echo-Reply */
418 unsigned short rx_disc_rqst PACKED; /* 16: Discard-Request */
419 unsigned short tx_conf_rqst PACKED; /* 18: Configure-Request */
420 unsigned short tx_conf_ack PACKED; /* 1A: Configure-Ack */
421 unsigned short tx_conf_nak PACKED; /* 1C: Configure-Nak */
422 unsigned short tx_conf_rej PACKED; /* 1E: Configure-Reject */
423 unsigned short tx_term_rqst PACKED; /* 20: Terminate-Request */
424 unsigned short tx_term_ack PACKED; /* 22: Terminate-Ack */
425 unsigned short tx_code_rej PACKED; /* 24: Code-Reject */
426 unsigned short tx_proto_rej PACKED; /* 26: Protocol-Reject */
427 unsigned short tx_echo_rqst PACKED; /* 28: Echo-Request */
428 unsigned short tx_echo_reply PACKED; /* 2A: Echo-Reply */
429 unsigned short tx_disc_rqst PACKED; /* 2E: Discard-Request */
430 unsigned short rx_too_large PACKED; /* 30: packets too large */
431 unsigned short rx_ack_inval PACKED; /* 32: invalid Conf-Ack */
432 unsigned short rx_rej_inval PACKED; /* 34: invalid Conf-Reject */
433 unsigned short rx_rej_badid PACKED; /* 36: Conf-Reject w/bad ID */
434 } ppp_lcp_stats_t;
436 /*----------------------------------------------------------------------------
437 * Loopback Error Statistics (returned by the PPP_READ_LPBK_STATS command).
439 typedef struct ppp_lpbk_stats
441 unsigned short conf_magic PACKED; /* 00: */
442 unsigned short loc_echo_rqst PACKED; /* 02: */
443 unsigned short rem_echo_rqst PACKED; /* 04: */
444 unsigned short loc_echo_reply PACKED; /* 06: */
445 unsigned short rem_echo_reply PACKED; /* 08: */
446 unsigned short loc_disc_rqst PACKED; /* 0A: */
447 unsigned short rem_disc_rqst PACKED; /* 0C: */
448 unsigned short echo_tx_collsn PACKED; /* 0E: */
449 unsigned short echo_rx_collsn PACKED; /* 10: */
450 } ppp_lpbk_stats_t;
452 /*----------------------------------------------------------------------------
453 * Protocol Statistics (returned by the PPP_READ_IPCP_STATS and
454 * PPP_READ_IPXCP_STATS commands).
456 typedef struct ppp_prot_stats
458 unsigned short rx_unknown PACKED; /* 00: unknown type */
459 unsigned short rx_conf_rqst PACKED; /* 02: Configure-Request */
460 unsigned short rx_conf_ack PACKED; /* 04: Configure-Ack */
461 unsigned short rx_conf_nak PACKED; /* 06: Configure-Nak */
462 unsigned short rx_conf_rej PACKED; /* 08: Configure-Reject */
463 unsigned short rx_term_rqst PACKED; /* 0A: Terminate-Request */
464 unsigned short rx_term_ack PACKED; /* 0C: Terminate-Ack */
465 unsigned short rx_code_rej PACKED; /* 0E: Code-Reject */
466 unsigned short reserved PACKED; /* 10: */
467 unsigned short tx_conf_rqst PACKED; /* 12: Configure-Request */
468 unsigned short tx_conf_ack PACKED; /* 14: Configure-Ack */
469 unsigned short tx_conf_nak PACKED; /* 16: Configure-Nak */
470 unsigned short tx_conf_rej PACKED; /* 18: Configure-Reject */
471 unsigned short tx_term_rqst PACKED; /* 1A: Terminate-Request */
472 unsigned short tx_term_ack PACKED; /* 1C: Terminate-Ack */
473 unsigned short tx_code_rej PACKED; /* 1E: Code-Reject */
474 unsigned short rx_too_large PACKED; /* 20: packets too large */
475 unsigned short rx_ack_inval PACKED; /* 22: invalid Conf-Ack */
476 unsigned short rx_rej_inval PACKED; /* 24: invalid Conf-Reject */
477 unsigned short rx_rej_badid PACKED; /* 26: Conf-Reject w/bad ID */
478 } ppp_prot_stats_t;
480 /*----------------------------------------------------------------------------
481 * PAP Statistics (returned by the PPP_READ_PAP_STATS command).
483 typedef struct ppp_pap_stats
485 unsigned short rx_unknown PACKED; /* 00: unknown type */
486 unsigned short rx_auth_rqst PACKED; /* 02: Authenticate-Request */
487 unsigned short rx_auth_ack PACKED; /* 04: Authenticate-Ack */
488 unsigned short rx_auth_nak PACKED; /* 06: Authenticate-Nak */
489 unsigned short reserved PACKED; /* 08: */
490 unsigned short tx_auth_rqst PACKED; /* 0A: Authenticate-Request */
491 unsigned short tx_auth_ack PACKED; /* 0C: Authenticate-Ack */
492 unsigned short tx_auth_nak PACKED; /* 0E: Authenticate-Nak */
493 unsigned short rx_too_large PACKED; /* 10: packets too large */
494 unsigned short rx_bad_peerid PACKED; /* 12: invalid peer ID */
495 unsigned short rx_bad_passwd PACKED; /* 14: invalid password */
496 } ppp_pap_stats_t;
498 /*----------------------------------------------------------------------------
499 * CHAP Statistics (returned by the PPP_READ_CHAP_STATS command).
501 typedef struct ppp_chap_stats
503 unsigned short rx_unknown PACKED; /* 00: unknown type */
504 unsigned short rx_challenge PACKED; /* 02: Authenticate-Request */
505 unsigned short rx_response PACKED; /* 04: Authenticate-Ack */
506 unsigned short rx_success PACKED; /* 06: Authenticate-Nak */
507 unsigned short rx_failure PACKED; /* 08: Authenticate-Nak */
508 unsigned short reserved PACKED; /* 0A: */
509 unsigned short tx_challenge PACKED; /* 0C: Authenticate-Request */
510 unsigned short tx_response PACKED; /* 0E: Authenticate-Ack */
511 unsigned short tx_success PACKED; /* 10: Authenticate-Nak */
512 unsigned short tx_failure PACKED; /* 12: Authenticate-Nak */
513 unsigned short rx_too_large PACKED; /* 14: packets too large */
514 unsigned short rx_bad_peerid PACKED; /* 16: invalid peer ID */
515 unsigned short rx_bad_passwd PACKED; /* 18: invalid password */
516 unsigned short rx_bad_md5 PACKED; /* 1A: invalid MD5 format */
517 unsigned short rx_bad_resp PACKED; /* 1C: invalid response */
518 } ppp_chap_stats_t;
520 /*----------------------------------------------------------------------------
521 * Connection Information (returned by the PPP_GET_CONNECTION_INFO command).
523 typedef struct ppp_conn_info
525 unsigned short remote_mru PACKED; /* 00: */
526 unsigned char ip_options PACKED; /* 02: */
527 unsigned char ip_local[4] PACKED; /* 03: */
528 unsigned char ip_remote[4] PACKED; /* 07: */
529 unsigned char ipx_options PACKED; /* 0B: */
530 unsigned char ipx_network[4] PACKED; /* 0C: */
531 unsigned char ipx_local[6] PACKED; /* 10: */
532 unsigned char ipx_remote[6] PACKED; /* 16: */
533 unsigned char ipx_router[48] PACKED; /* 1C: */
534 unsigned char auth_status PACKED; /* 4C: */
535 unsigned char peer_id[0] PACKED; /* 4D: */
536 } ppp_conn_info_t;
538 /* Data structure for SET_TRIGGER_INTR command
541 typedef struct ppp_intr_info{
542 unsigned char i_enable PACKED; /* 0 Interrupt enable bits */
543 unsigned char irq PACKED; /* 1 Irq number */
544 unsigned short timer_len PACKED; /* 2 Timer delay */
545 } ppp_intr_info_t;
548 #define FT1_MONITOR_STATUS_CTRL 0x80
549 #define SET_FT1_MODE 0x81
553 /* Special UDP drivers management commands */
554 #define PPIPE_ENABLE_TRACING 0x20
555 #define PPIPE_DISABLE_TRACING 0x21
556 #define PPIPE_GET_TRACE_INFO 0x22
557 #define PPIPE_GET_IBA_DATA 0x23
558 #define PPIPE_KILL_BOARD 0x24
559 #define PPIPE_FT1_READ_STATUS 0x25
560 #define PPIPE_DRIVER_STAT_IFSEND 0x26
561 #define PPIPE_DRIVER_STAT_INTR 0x27
562 #define PPIPE_DRIVER_STAT_GEN 0x28
563 #define PPIPE_FLUSH_DRIVER_STATS 0x29
564 #define PPIPE_ROUTER_UP_TIME 0x30
566 #define DISABLE_TRACING 0x00
567 #define TRACE_SIGNALLING_FRAMES 0x01
568 #define TRACE_DATA_FRAMES 0x02
572 #ifdef _MSC_
573 # pragma pack()
574 #endif
575 #endif /* _SDLA_PPP_H */