Import 2.3.6
[davej-history.git] / include / linux / sdla_ppp.h
blob267986833c5dd37f78d8d3dc4dbd8ce047ae0063
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. To ensure
23 * portability of this code between different platforms and compilers, one
24 * of the following defines must be defined before including this file:
26 * Compiler Platform Define Use option
27 * -------- -------- ------ ----------
28 * GNU C Linux _GNUC_ -
29 * Microsoft C DOS/Windows _MSC_ -
32 #ifdef _GNUC_
33 # ifndef PACKED
34 # define PACKED __attribute__((packed))
35 # endif /* PACKED */
36 #else
37 # define PACKED
38 #endif
39 #ifdef _MSC_
40 # pragma pack(1)
41 #endif
43 /* Adapter memory layout and important constants */
45 #define PPP502_MB_VECT 0xA000 /* mailbox window vector */
46 #define PPP502_MB_OFFS 0x1C00 /* mailbox offset */
47 #define PPP502_FLG_OFFS 0 /* status flags offset */
48 #define PPP502_BUF_OFFS 0x0010 /* buffer info block offset */
50 #define PPP508_MB_VECT 0xE000 /* mailbox window vector */
51 #define PPP508_MB_OFFS 0 /* mailbox offset */
52 #define PPP508_FLG_OFFS 0x1000 /* status flags offset */
53 #define PPP508_BUF_OFFS 0x1100 /* buffer info block offset */
55 #define PPP_MAX_DATA 1008 /* command block data buffer length */
57 /****** Data Structures *****************************************************/
59 /*----------------------------------------------------------------------------
60 * PPP Command Block.
62 typedef struct ppp_cmd
64 unsigned char command PACKED; /* command code */
65 unsigned short length PACKED; /* length of data buffer */
66 unsigned char result PACKED; /* return code */
67 unsigned char rsrv[11] PACKED; /* reserved for future use */
68 } ppp_cmd_t;
70 /* 'command' field defines */
71 #define PPP_READ_CODE_VERSION 0x10 /* configuration commands */
72 #define PPP_SET_CONFIG 0x05
73 #define PPP_READ_CONFIG 0x06
74 #define PPP_SET_INTR_FLAGS 0x20
75 #define PPP_READ_INTR_FLAGS 0x21
76 #define PPP_SET_INBOUND_AUTH 0x30
77 #define PPP_SET_OUTBOUND_AUTH 0x31
78 #define PPP_GET_CONNECTION_INFO 0x32
80 #define PPP_COMM_ENABLE 0x03 /* operational commands */
81 #define PPP_COMM_DISABLE 0x04
82 #define PPP_SEND_SIGN_FRAME 0x23
83 #define PPP_READ_SIGN_RESPONSE 0x24
84 #define PPP_DATALINE_MONITOR 0x33
86 #define PPP_READ_STATISTICS 0x07 /* statistics commands */
87 #define PPP_FLUSH_STATISTICS 0x08
88 #define PPP_READ_ERROR_STATS 0x09
89 #define PPP_FLUSH_ERROR_STATS 0x0A
90 #define PPP_READ_PACKET_STATS 0x12
91 #define PPP_FLUSH_PACKET_STATS 0x13
92 #define PPP_READ_LCP_STATS 0x14
93 #define PPP_FLUSH_LCP_STATS 0x15
94 #define PPP_READ_LPBK_STATS 0x16
95 #define PPP_FLUSH_LPBK_STATS 0x17
96 #define PPP_READ_IPCP_STATS 0x18
97 #define PPP_FLUSH_IPCP_STATS 0x19
98 #define PPP_READ_IPXCP_STATS 0x1A
99 #define PPP_FLUSH_IPXCP_STATS 0x1B
100 #define PPP_READ_PAP_STATS 0x1C
101 #define PPP_FLUSH_PAP_STATS 0x1D
102 #define PPP_READ_CHAP_STATS 0x1E
103 #define PPP_FLUSH_CHAP_STATS 0x1F
105 /* 'result' field defines */
106 #define PPPRES_OK 0x00 /* command executed successfully */
107 #define PPPRES_INVALID_STATE 0x09 /* invalid command in this context */
109 /*----------------------------------------------------------------------------
110 * PPP Mailbox.
111 * This structure is located at offset PPP???_MB_OFFS into PPP???_MB_VECT
113 typedef struct ppp_mbox
115 unsigned char flag PACKED; /* 00h: command execution flag */
116 ppp_cmd_t cmd PACKED; /* 01h: command block */
117 unsigned char data[1] PACKED; /* 10h: variable length data buffer */
118 } ppp_mbox_t;
120 /*----------------------------------------------------------------------------
121 * PPP Status Flags.
122 * This structure is located at offset PPP???_FLG_OFFS into
123 * PPP???_MB_VECT.
125 typedef struct ppp_flags
127 unsigned char iflag PACKED; /* 00: interrupt flag */
128 unsigned char imask PACKED; /* 01: interrupt mask */
129 unsigned char resrv PACKED;
130 unsigned char mstatus PACKED; /* 03: modem status */
131 unsigned char lcp_state PACKED; /* 04: LCP state */
132 unsigned char ppp_phase PACKED; /* 05: PPP phase */
133 unsigned char ip_state PACKED; /* 06: IPCP state */
134 unsigned char ipx_state PACKED; /* 07: IPXCP state */
135 unsigned char pap_state PACKED; /* 08: PAP state */
136 unsigned char chap_state PACKED; /* 09: CHAP state */
137 unsigned short disc_cause PACKED; /* 0A: disconnection cause */
138 } ppp_flags_t;
140 /* 'iflag' defines */
141 #define PPP_INTR_RXRDY 0x01 /* Rx ready */
142 #define PPP_INTR_TXRDY 0x02 /* Tx ready */
143 #define PPP_INTR_MODEM 0x04 /* modem status change (DCD, CTS) */
144 #define PPP_INTR_CMD 0x08 /* interface command completed */
145 #define PPP_INTR_DISC 0x10 /* data link disconnected */
146 #define PPP_INTR_OPEN 0x20 /* data link open */
147 #define PPP_INTR_DROP_DTR 0x40 /* DTR drop timeout expired */
149 /* 'mstatus' defines */
150 #define PPP_MDM_DCD 0x08 /* mdm_status: DCD */
151 #define PPP_MDM_CTS 0x20 /* mdm_status: CTS */
153 /*----------------------------------------------------------------------------
154 * PPP Buffer Info.
155 * This structure is located at offset PPP502_BUF_OFFS into
156 * PPP502_MB_VECT.
158 typedef struct ppp502_buf_info
160 unsigned short txb_num PACKED; /* 00: number of transmit buffers */
161 unsigned short txb_offs PACKED; /* 02: offset of the buffer ctl. */
162 unsigned char rsrv1[4] PACKED;
163 unsigned short rxb_num PACKED; /* 08: number of receive buffers */
164 unsigned short rxb_offs PACKED; /* 0A: offset of the buffer ctl. */
165 unsigned char rsrv2[2] PACKED;
166 unsigned short rxb_next PACKED; /* 0E: index of the next buffer */
167 } ppp502_buf_info_t;
169 /*----------------------------------------------------------------------------
170 * PPP Buffer Info.
171 * This structure is located at offset PPP508_BUF_OFFS into
172 * PPP508_MB_VECT.
174 typedef struct ppp508_buf_info
176 unsigned short txb_num PACKED; /* 00: number of transmit buffers */
177 unsigned long txb_ptr PACKED; /* 02: pointer to the buffer ctl. */
178 unsigned char rsrv1[26] PACKED;
179 unsigned short rxb_num PACKED; /* 20: number of receive buffers */
180 unsigned long rxb_ptr PACKED; /* 22: pointer to the buffer ctl. */
181 unsigned long rxb1_ptr PACKED; /* 26: pointer to the first buf.ctl. */
182 unsigned long rxb_base PACKED; /* 2A: pointer to the buffer base */
183 unsigned char rsrv2[2] PACKED;
184 unsigned long rxb_end PACKED; /* 30: pointer to the buffer end */
185 } ppp508_buf_info_t;
187 /*----------------------------------------------------------------------------
188 * Transmit/Receive Buffer Control Block.
190 typedef struct ppp_buf_ctl
192 unsigned char flag PACKED; /* 00: 'buffer ready' flag */
193 unsigned short length PACKED; /* 01: length of data */
194 unsigned char reserved1[1] PACKED; /* 03: */
195 unsigned char proto PACKED; /* 04: protocol */
196 unsigned short timestamp PACKED; /* 05: time stamp (Rx only) */
197 unsigned char reserved2[5] PACKED; /* 07: */
198 union
200 unsigned short o_p[2]; /* 1C: buffer offset & page (S502) */
201 unsigned long ptr; /* 1C: buffer pointer (S508) */
202 } buf PACKED;
203 } ppp_buf_ctl_t;
205 /*----------------------------------------------------------------------------
206 * S502 Adapter Configuration Block (passed to the PPP_SET_CONFIG command).
208 typedef struct ppp502_conf
210 unsigned char line_speed PACKED; /* 00: 0 - external clk. */
211 unsigned short txbuf_num PACKED; /* 01: number of Tx buffers */
212 unsigned short conf_flags PACKED; /* 03: configuration bits */
213 unsigned short mtu_local PACKED; /* 05: local MTU */
214 unsigned short mtu_remote PACKED; /* 07: remote MTU */
215 unsigned short restart_tmr PACKED; /* 09: restart timer */
216 unsigned short auth_rsrt_tmr PACKED; /* 0B: authentication timer */
217 unsigned short auth_wait_tmr PACKED; /* 0D: authentication timer */
218 unsigned short mdm_fail_tmr PACKED; /* 0F: modem failure timer */
219 unsigned short dtr_drop_tmr PACKED; /* 11: DTR drop timer */
220 unsigned short connect_tmout PACKED; /* 13: connection timeout */
221 unsigned short conf_retry PACKED; /* 15: max. retry */
222 unsigned short term_retry PACKED; /* 17: max. retry */
223 unsigned short fail_retry PACKED; /* 19: max. retry */
224 unsigned short auth_retry PACKED; /* 1B: max. retry */
225 unsigned char auth_options PACKED; /* 1D: authentication opt. */
226 unsigned char ip_options PACKED; /* 1E: IP options */
227 unsigned char ip_local[4] PACKED; /* 1F: local IP address */
228 unsigned char ip_remote[4] PACKED; /* 23: remote IP address */
229 unsigned char ipx_options PACKED; /* 27: IPX options */
230 unsigned char ipx_netno[4] PACKED; /* 28: IPX net number */
231 unsigned char ipx_local[6] PACKED; /* 2C: local IPX node number*/
232 unsigned char ipx_remote[6] PACKED; /* 32: remote IPX node num.*/
233 unsigned char ipx_router[48] PACKED; /* 38: IPX router name*/
234 } ppp502_conf_t;
236 /*----------------------------------------------------------------------------
237 * S508 Adapter Configuration Block (passed to the PPP_SET_CONFIG command).
239 typedef struct ppp508_conf
241 unsigned long line_speed PACKED; /* 00: baud rate, bps */
242 unsigned short txbuf_percent PACKED; /* 04: % of Tx buffer */
243 unsigned short conf_flags PACKED; /* 06: configuration bits */
244 unsigned short mtu_local PACKED; /* 08: local MTU */
245 unsigned short mtu_remote PACKED; /* 0A: remote MTU */
246 unsigned short restart_tmr PACKED; /* 0C: restart timer */
247 unsigned short auth_rsrt_tmr PACKED; /* 0E: authentication timer */
248 unsigned short auth_wait_tmr PACKED; /* 10: authentication timer */
249 unsigned short mdm_fail_tmr PACKED; /* 12: modem failure timer */
250 unsigned short dtr_drop_tmr PACKED; /* 14: DTR drop timer */
251 unsigned short connect_tmout PACKED; /* 16: connection timeout */
252 unsigned short conf_retry PACKED; /* 18: max. retry */
253 unsigned short term_retry PACKED; /* 1A: max. retry */
254 unsigned short fail_retry PACKED; /* 1C: max. retry */
255 unsigned short auth_retry PACKED; /* 1E: max. retry */
256 unsigned char auth_options PACKED; /* 20: authentication opt. */
257 unsigned char ip_options PACKED; /* 21: IP options */
258 unsigned char ip_local[4] PACKED; /* 22: local IP address */
259 unsigned char ip_remote[4] PACKED; /* 26: remote IP address */
260 unsigned char ipx_options PACKED; /* 2A: IPX options */
261 unsigned char ipx_netno[4] PACKED; /* 2B: IPX net number */
262 unsigned char ipx_local[6] PACKED; /* 2F: local IPX node number*/
263 unsigned char ipx_remote[6] PACKED; /* 35: remote IPX node num.*/
264 unsigned char ipx_router[48] PACKED; /* 3B: IPX router name*/
265 unsigned long alt_cpu_clock PACKED; /* 6B: */
266 } ppp508_conf_t;
268 /* 'line_speed' field */
269 #define PPP_BITRATE_1200 0x01
270 #define PPP_BITRATE_2400 0x02
271 #define PPP_BITRATE_4800 0x03
272 #define PPP_BITRATE_9600 0x04
273 #define PPP_BITRATE_19200 0x05
274 #define PPP_BITRATE_38400 0x06
275 #define PPP_BITRATE_45000 0x07
276 #define PPP_BITRATE_56000 0x08
277 #define PPP_BITRATE_64000 0x09
278 #define PPP_BITRATE_74000 0x0A
279 #define PPP_BITRATE_112000 0x0B
280 #define PPP_BITRATE_128000 0x0C
281 #define PPP_BITRATE_156000 0x0D
283 /* Defines for the 'conf_flags' field */
284 #define PPP_IGNORE_TX_ABORT 0x01 /* don't re-transmit aborted frames */
285 #define PPP_ENABLE_TX_STATS 0x02 /* enable Tx statistics */
286 #define PPP_ENABLE_RX_STATS 0x04 /* enable Rx statistics */
287 #define PPP_ENABLE_TIMESTAMP 0x08 /* enable timestamp */
289 /* 'ip_options' defines */
290 #define PPP_LOCAL_IP_LOCAL 0x01
291 #define PPP_LOCAL_IP_REMOTE 0x02
292 #define PPP_REMOTE_IP_LOCAL 0x04
293 #define PPP_REMOTE_IP_REMOTE 0x08
295 /* 'ipx_options' defines */
296 #define PPP_REMOTE_IPX_NETNO 0x01
297 #define PPP_REMOTE_IPX_LOCAL 0x02
298 #define PPP_REMOTE_IPX_REMOTE 0x04
299 #define PPP_IPX_ROUTE_RIP_SAP 0x08
300 #define PPP_IPX_ROUTE_NLSP 0x10
301 #define PPP_IPX_ROUTE_DEFAULT 0x20
302 #define PPP_IPX_CONF_COMPLETE 0x40
303 #define PPP_IPX_ENABLE 0x80
305 /*----------------------------------------------------------------------------
306 * S502 Adapter Configuration Block (returned by the PPP_READ_CONFIG command).
308 typedef struct ppp502_get_conf
310 ppp502_conf_t conf PACKED; /* 00: requested config. */
311 unsigned short txb_num PACKED; /* 68: number of Tx buffers */
312 unsigned short rxb_num PACKED; /* 6A: number of Rx buffers */
313 } ppp502_get_conf_t;
315 /*----------------------------------------------------------------------------
316 * S508 Adapter Configuration Block (returned by the PPP_READ_CONFIG command).
318 typedef struct ppp508_get_conf
320 unsigned long bps PACKED; /* 00: baud rate, bps */
321 ppp508_conf_t conf PACKED; /* 04: requested config. */
322 unsigned short txb_num PACKED; /* 6F: number of Tx buffers */
323 unsigned short rxb_num PACKED; /* 71: number of Rx buffers */
324 } ppp508_get_conf_t;
326 /*----------------------------------------------------------------------------
327 * S502 Operational Statistics (returned by the PPP_READ_STATISTIC command).
329 typedef struct ppp502_Stats
331 unsigned short rx_lost_intr PACKED; /* 00: */
332 unsigned short rx_lost_buff PACKED; /* 02: */
333 unsigned short tx_abort PACKED; /* 04: */
334 unsigned long tx_frames PACKED; /* 06: */
335 unsigned long tx_bytes PACKED; /* 0A: */
336 unsigned long rx_frames PACKED; /* 0E: */
337 unsigned long rx_bytes PACKED; /* 12: */
338 } ppp502_Stats_t;
340 /*----------------------------------------------------------------------------
341 * S508 Operational Statistics (returned by the PPP_READ_STATISTIC command).
343 typedef struct ppp508_stats
345 unsigned short reserved1 PACKED; /* 00: */
346 unsigned short rx_bad_len PACKED; /* 02: */
347 unsigned short reserved2 PACKED; /* 04: */
348 unsigned long tx_frames PACKED; /* 06: */
349 unsigned long tx_bytes PACKED; /* 0A: */
350 unsigned long rx_frames PACKED; /* 0E: */
351 unsigned long rx_bytes PACKED; /* 12: */
352 } ppp508_stats_t;
354 /*----------------------------------------------------------------------------
355 * Adapter Error Statistics (returned by the PPP_READ_ERROR_STATS command).
357 typedef struct ppp_err_stats
359 unsigned char rx_overrun PACKED; /* 00: Rx overrun errors */
360 unsigned char rx_bad_crc PACKED; /* 01: Rx CRC errors */
361 unsigned char rx_abort PACKED; /* 02: Rx aborted frames */
362 unsigned char rx_lost PACKED; /* 03: Rx frames lost */
363 unsigned char tx_abort PACKED; /* 04: Tx aborted frames */
364 unsigned char tx_underrun PACKED; /* 05: Tx underrun errors */
365 unsigned char tx_missed_intr PACKED; /* 06: Tx underruns missed */
366 unsigned char reserved PACKED; /* 07: Tx underruns missed */
367 unsigned char dcd_trans PACKED; /* 08: DCD transitions */
368 unsigned char cts_trans PACKED; /* 09: CTS transitions */
369 } ppp_err_stats_t;
371 /*----------------------------------------------------------------------------
372 * Packet Statistics (returned by the PPP_READ_PACKET_STATS command).
374 typedef struct ppp_pkt_stats
376 unsigned short rx_bad_header PACKED; /* 00: */
377 unsigned short rx_prot_unknwn PACKED; /* 02: */
378 unsigned short rx_too_large PACKED; /* 04: */
379 unsigned short rx_lcp PACKED; /* 06: */
380 unsigned short tx_lcp PACKED; /* 08: */
381 unsigned short rx_ipcp PACKED; /* 0A: */
382 unsigned short tx_ipcp PACKED; /* 0C: */
383 unsigned short rx_ipxcp PACKED; /* 0E: */
384 unsigned short tx_ipxcp PACKED; /* 10: */
385 unsigned short rx_pap PACKED; /* 12: */
386 unsigned short tx_pap PACKED; /* 14: */
387 unsigned short rx_chap PACKED; /* 16: */
388 unsigned short tx_chap PACKED; /* 18: */
389 unsigned short rx_lqr PACKED; /* 1A: */
390 unsigned short tx_lqr PACKED; /* 1C: */
391 unsigned short rx_ip PACKED; /* 1E: */
392 unsigned short tx_ip PACKED; /* 20: */
393 unsigned short rx_ipx PACKED; /* 22: */
394 unsigned short tx_ipx PACKED; /* 24: */
395 } ppp_pkt_stats_t;
397 /*----------------------------------------------------------------------------
398 * LCP Statistics (returned by the PPP_READ_LCP_STATS command).
400 typedef struct ppp_lcp_stats
402 unsigned short rx_unknown PACKED; /* 00: unknown LCP type */
403 unsigned short rx_conf_rqst PACKED; /* 02: Configure-Request */
404 unsigned short rx_conf_ack PACKED; /* 04: Configure-Ack */
405 unsigned short rx_conf_nak PACKED; /* 06: Configure-Nak */
406 unsigned short rx_conf_rej PACKED; /* 08: Configure-Reject */
407 unsigned short rx_term_rqst PACKED; /* 0A: Terminate-Request */
408 unsigned short rx_term_ack PACKED; /* 0C: Terminate-Ack */
409 unsigned short rx_code_rej PACKED; /* 0E: Code-Reject */
410 unsigned short rx_proto_rej PACKED; /* 10: Protocol-Reject */
411 unsigned short rx_echo_rqst PACKED; /* 12: Echo-Request */
412 unsigned short rx_echo_reply PACKED; /* 14: Echo-Reply */
413 unsigned short rx_disc_rqst PACKED; /* 16: Discard-Request */
414 unsigned short tx_conf_rqst PACKED; /* 18: Configure-Request */
415 unsigned short tx_conf_ack PACKED; /* 1A: Configure-Ack */
416 unsigned short tx_conf_nak PACKED; /* 1C: Configure-Nak */
417 unsigned short tx_conf_rej PACKED; /* 1E: Configure-Reject */
418 unsigned short tx_term_rqst PACKED; /* 20: Terminate-Request */
419 unsigned short tx_term_ack PACKED; /* 22: Terminate-Ack */
420 unsigned short tx_code_rej PACKED; /* 24: Code-Reject */
421 unsigned short tx_proto_rej PACKED; /* 26: Protocol-Reject */
422 unsigned short tx_echo_rqst PACKED; /* 28: Echo-Request */
423 unsigned short tx_echo_reply PACKED; /* 2A: Echo-Reply */
424 unsigned short tx_disc_rqst PACKED; /* 2E: Discard-Request */
425 unsigned short rx_too_large PACKED; /* 30: packets too large */
426 unsigned short rx_ack_inval PACKED; /* 32: invalid Conf-Ack */
427 unsigned short rx_rej_inval PACKED; /* 34: invalid Conf-Reject */
428 unsigned short rx_rej_badid PACKED; /* 36: Conf-Reject w/bad ID */
429 } ppp_lcp_stats_t;
431 /*----------------------------------------------------------------------------
432 * Loopback Error Statistics (returned by the PPP_READ_LPBK_STATS command).
434 typedef struct ppp_lpbk_stats
436 unsigned short conf_magic PACKED; /* 00: */
437 unsigned short loc_echo_rqst PACKED; /* 02: */
438 unsigned short rem_echo_rqst PACKED; /* 04: */
439 unsigned short loc_echo_reply PACKED; /* 06: */
440 unsigned short rem_echo_reply PACKED; /* 08: */
441 unsigned short loc_disc_rqst PACKED; /* 0A: */
442 unsigned short rem_disc_rqst PACKED; /* 0C: */
443 unsigned short echo_tx_collsn PACKED; /* 0E: */
444 unsigned short echo_rx_collsn PACKED; /* 10: */
445 } ppp_lpbk_stats_t;
447 /*----------------------------------------------------------------------------
448 * Protocol Statistics (returned by the PPP_READ_IPCP_STATS and
449 * PPP_READ_IPXCP_STATS commands).
451 typedef struct ppp_prot_stats
453 unsigned short rx_unknown PACKED; /* 00: unknown type */
454 unsigned short rx_conf_rqst PACKED; /* 02: Configure-Request */
455 unsigned short rx_conf_ack PACKED; /* 04: Configure-Ack */
456 unsigned short rx_conf_nak PACKED; /* 06: Configure-Nak */
457 unsigned short rx_conf_rej PACKED; /* 08: Configure-Reject */
458 unsigned short rx_term_rqst PACKED; /* 0A: Terminate-Request */
459 unsigned short rx_term_ack PACKED; /* 0C: Terminate-Ack */
460 unsigned short rx_code_rej PACKED; /* 0E: Code-Reject */
461 unsigned short reserved PACKED; /* 10: */
462 unsigned short tx_conf_rqst PACKED; /* 12: Configure-Request */
463 unsigned short tx_conf_ack PACKED; /* 14: Configure-Ack */
464 unsigned short tx_conf_nak PACKED; /* 16: Configure-Nak */
465 unsigned short tx_conf_rej PACKED; /* 18: Configure-Reject */
466 unsigned short tx_term_rqst PACKED; /* 1A: Terminate-Request */
467 unsigned short tx_term_ack PACKED; /* 1C: Terminate-Ack */
468 unsigned short tx_code_rej PACKED; /* 1E: Code-Reject */
469 unsigned short rx_too_large PACKED; /* 20: packets too large */
470 unsigned short rx_ack_inval PACKED; /* 22: invalid Conf-Ack */
471 unsigned short rx_rej_inval PACKED; /* 24: invalid Conf-Reject */
472 unsigned short rx_rej_badid PACKED; /* 26: Conf-Reject w/bad ID */
473 } ppp_prot_stats_t;
475 /*----------------------------------------------------------------------------
476 * PAP Statistics (returned by the PPP_READ_PAP_STATS command).
478 typedef struct ppp_pap_stats
480 unsigned short rx_unknown PACKED; /* 00: unknown type */
481 unsigned short rx_auth_rqst PACKED; /* 02: Authenticate-Request */
482 unsigned short rx_auth_ack PACKED; /* 04: Authenticate-Ack */
483 unsigned short rx_auth_nak PACKED; /* 06: Authenticate-Nak */
484 unsigned short reserved PACKED; /* 08: */
485 unsigned short tx_auth_rqst PACKED; /* 0A: Authenticate-Request */
486 unsigned short tx_auth_ack PACKED; /* 0C: Authenticate-Ack */
487 unsigned short tx_auth_nak PACKED; /* 0E: Authenticate-Nak */
488 unsigned short rx_too_large PACKED; /* 10: packets too large */
489 unsigned short rx_bad_peerid PACKED; /* 12: invalid peer ID */
490 unsigned short rx_bad_passwd PACKED; /* 14: invalid password */
491 } ppp_pap_stats_t;
493 /*----------------------------------------------------------------------------
494 * CHAP Statistics (returned by the PPP_READ_CHAP_STATS command).
496 typedef struct ppp_chap_stats
498 unsigned short rx_unknown PACKED; /* 00: unknown type */
499 unsigned short rx_challenge PACKED; /* 02: Authenticate-Request */
500 unsigned short rx_response PACKED; /* 04: Authenticate-Ack */
501 unsigned short rx_success PACKED; /* 06: Authenticate-Nak */
502 unsigned short rx_failure PACKED; /* 08: Authenticate-Nak */
503 unsigned short reserved PACKED; /* 0A: */
504 unsigned short tx_challenge PACKED; /* 0C: Authenticate-Request */
505 unsigned short tx_response PACKED; /* 0E: Authenticate-Ack */
506 unsigned short tx_success PACKED; /* 10: Authenticate-Nak */
507 unsigned short tx_failure PACKED; /* 12: Authenticate-Nak */
508 unsigned short rx_too_large PACKED; /* 14: packets too large */
509 unsigned short rx_bad_peerid PACKED; /* 16: invalid peer ID */
510 unsigned short rx_bad_passwd PACKED; /* 18: invalid password */
511 unsigned short rx_bad_md5 PACKED; /* 1A: invalid MD5 format */
512 unsigned short rx_bad_resp PACKED; /* 1C: invalid response */
513 } ppp_chap_stats_t;
515 /*----------------------------------------------------------------------------
516 * Connection Information (returned by the PPP_GET_CONNECTION_INFO command).
518 typedef struct ppp_conn_info
520 unsigned short remote_mru PACKED; /* 00: */
521 unsigned char ip_options PACKED; /* 02: */
522 unsigned char ip_local[4] PACKED; /* 03: */
523 unsigned char ip_remote[4] PACKED; /* 07: */
524 unsigned char ipx_options PACKED; /* 0B: */
525 unsigned char ipx_network[4] PACKED; /* 0C: */
526 unsigned char ipx_local[6] PACKED; /* 10: */
527 unsigned char ipx_remote[6] PACKED; /* 16: */
528 unsigned char ipx_router[48] PACKED; /* 1C: */
529 unsigned char auth_status PACKED; /* 4C: */
530 unsigned char peer_id[0] PACKED; /* 4D: */
531 } ppp_conn_info_t;
533 #ifdef _MSC_
534 # pragma pack()
535 #endif
536 #endif /* _SDLA_PPP_H */