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