Deleted Added
full compact
if_sppp.h (55205) if_sppp.h (78064)
1/*
2 * Defines for synchronous PPP/Cisco link level subroutines.
3 *
4 * Copyright (C) 1994 Cronyx Ltd.
5 * Author: Serge Vakulenko, <vak@cronyx.ru>
6 *
7 * Heavily revamped to conform to RFC 1661.
8 * Copyright (C) 1997, Joerg Wunsch.
9 *
10 * This software is distributed with NO WARRANTIES, not even the implied
11 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 *
13 * Authors grant any other persons or organizations permission to use
14 * or modify this software as long as this message is kept with the software,
15 * all derivative works or modified versions.
16 *
17 * From: Version 2.0, Fri Oct 6 20:39:21 MSK 1995
18 *
1/*
2 * Defines for synchronous PPP/Cisco link level subroutines.
3 *
4 * Copyright (C) 1994 Cronyx Ltd.
5 * Author: Serge Vakulenko, <vak@cronyx.ru>
6 *
7 * Heavily revamped to conform to RFC 1661.
8 * Copyright (C) 1997, Joerg Wunsch.
9 *
10 * This software is distributed with NO WARRANTIES, not even the implied
11 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 *
13 * Authors grant any other persons or organizations permission to use
14 * or modify this software as long as this message is kept with the software,
15 * all derivative works or modified versions.
16 *
17 * From: Version 2.0, Fri Oct 6 20:39:21 MSK 1995
18 *
19 * $FreeBSD: head/sys/net/if_sppp.h 55205 1999-12-29 04:46:21Z peter $
19 * $FreeBSD: head/sys/net/if_sppp.h 78064 2001-06-11 12:39:29Z ume $
20 */
21
22#ifndef _NET_IF_SPPP_H_
23#define _NET_IF_SPPP_H_ 1
24
25#define IDX_LCP 0 /* idx into state table */
26
27struct slcp {

--- 6 unchanged lines hidden (view full) ---

34 /* restart max values, see RFC 1661 */
35 int timeout;
36 int max_terminate;
37 int max_configure;
38 int max_failure;
39};
40
41#define IDX_IPCP 1 /* idx into state table */
20 */
21
22#ifndef _NET_IF_SPPP_H_
23#define _NET_IF_SPPP_H_ 1
24
25#define IDX_LCP 0 /* idx into state table */
26
27struct slcp {

--- 6 unchanged lines hidden (view full) ---

34 /* restart max values, see RFC 1661 */
35 int timeout;
36 int max_terminate;
37 int max_configure;
38 int max_failure;
39};
40
41#define IDX_IPCP 1 /* idx into state table */
42#define IDX_IPV6CP 2 /* idx into state table */
42
43struct sipcp {
44 u_long opts; /* IPCP options to send (bitfield) */
45 u_int flags;
46#define IPCP_HISADDR_SEEN 1 /* have seen his address already */
47#define IPCP_MYADDR_DYN 2 /* my address is dynamically assigned */
48#define IPCP_MYADDR_SEEN 4 /* have seen his address already */
43
44struct sipcp {
45 u_long opts; /* IPCP options to send (bitfield) */
46 u_int flags;
47#define IPCP_HISADDR_SEEN 1 /* have seen his address already */
48#define IPCP_MYADDR_DYN 2 /* my address is dynamically assigned */
49#define IPCP_MYADDR_SEEN 4 /* have seen his address already */
50#ifdef notdef
51#define IPV6CP_MYIFID_DYN 2 /* my ifid is dynamically assigned */
52#endif
53#define IPV6CP_MYIFID_SEEN 4 /* have seen his ifid already */
49};
50
51#define AUTHNAMELEN 32
52#define AUTHKEYLEN 16
53
54struct sauth {
55 u_short proto; /* authentication protocol to use */
56 u_short flags;
57#define AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */
58 /* callouts */
59#define AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */
60 u_char name[AUTHNAMELEN]; /* system identification name */
61 u_char secret[AUTHKEYLEN]; /* secret password */
62 u_char challenge[AUTHKEYLEN]; /* random challenge */
63};
64
54};
55
56#define AUTHNAMELEN 32
57#define AUTHKEYLEN 16
58
59struct sauth {
60 u_short proto; /* authentication protocol to use */
61 u_short flags;
62#define AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */
63 /* callouts */
64#define AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */
65 u_char name[AUTHNAMELEN]; /* system identification name */
66 u_char secret[AUTHKEYLEN]; /* secret password */
67 u_char challenge[AUTHKEYLEN]; /* random challenge */
68};
69
65#define IDX_PAP 2
66#define IDX_CHAP 3
70#define IDX_PAP 3
71#define IDX_CHAP 4
67
68#define IDX_COUNT (IDX_CHAP + 1) /* bump this when adding cp's! */
69
70/*
71 * Don't change the order of this. Ordering the phases this way allows
72 * for a comparision of ``pp_phase >= PHASE_AUTHENTICATE'' in order to
73 * know whether LCP is up.
74 */

--- 7 unchanged lines hidden (view full) ---

82 struct ifnet pp_if; /* network interface data */
83 struct ifqueue pp_fastq; /* fast output queue */
84 struct ifqueue pp_cpq; /* PPP control protocol queue */
85 struct sppp *pp_next; /* next interface in keepalive list */
86 u_int pp_mode; /* major protocol modes (cisco/ppp/...) */
87 u_int pp_flags; /* sub modes */
88 u_short pp_alivecnt; /* keepalive packets counter */
89 u_short pp_loopcnt; /* loopback detection counter */
72
73#define IDX_COUNT (IDX_CHAP + 1) /* bump this when adding cp's! */
74
75/*
76 * Don't change the order of this. Ordering the phases this way allows
77 * for a comparision of ``pp_phase >= PHASE_AUTHENTICATE'' in order to
78 * know whether LCP is up.
79 */

--- 7 unchanged lines hidden (view full) ---

87 struct ifnet pp_if; /* network interface data */
88 struct ifqueue pp_fastq; /* fast output queue */
89 struct ifqueue pp_cpq; /* PPP control protocol queue */
90 struct sppp *pp_next; /* next interface in keepalive list */
91 u_int pp_mode; /* major protocol modes (cisco/ppp/...) */
92 u_int pp_flags; /* sub modes */
93 u_short pp_alivecnt; /* keepalive packets counter */
94 u_short pp_loopcnt; /* loopback detection counter */
90 u_long pp_seq; /* local sequence number */
91 u_long pp_rseq; /* remote sequence number */
95 u_long pp_seq[IDX_COUNT]; /* local sequence number */
96 u_long pp_rseq[IDX_COUNT]; /* remote sequence number */
92 enum ppp_phase pp_phase; /* phase we're currently in */
93 int state[IDX_COUNT]; /* state machine */
94 u_char confid[IDX_COUNT]; /* id of last configuration request */
95 int rst_counter[IDX_COUNT]; /* restart counter */
96 int fail_counter[IDX_COUNT]; /* negotiation failure counter */
97 struct callout_handle ch[IDX_COUNT]; /* per-proto and if callouts */
98 struct callout_handle pap_my_to_ch; /* PAP needs one more... */
99 struct slcp lcp; /* LCP params */
100 struct sipcp ipcp; /* IPCP params */
97 enum ppp_phase pp_phase; /* phase we're currently in */
98 int state[IDX_COUNT]; /* state machine */
99 u_char confid[IDX_COUNT]; /* id of last configuration request */
100 int rst_counter[IDX_COUNT]; /* restart counter */
101 int fail_counter[IDX_COUNT]; /* negotiation failure counter */
102 struct callout_handle ch[IDX_COUNT]; /* per-proto and if callouts */
103 struct callout_handle pap_my_to_ch; /* PAP needs one more... */
104 struct slcp lcp; /* LCP params */
105 struct sipcp ipcp; /* IPCP params */
106 struct sipcp ipv6cp; /* IPv6CP params */
101 struct sauth myauth; /* auth params, i'm peer */
102 struct sauth hisauth; /* auth params, i'm authenticator */
103 /*
104 * These functions are filled in by sppp_attach(), and are
105 * expected to be used by the lower layer (hardware) drivers
106 * in order to communicate the (un)availability of the
107 * communication link. Lower layer drivers that are always
108 * ready to communicate (like hardware HDLC) can shortcut

--- 67 unchanged lines hidden ---
107 struct sauth myauth; /* auth params, i'm peer */
108 struct sauth hisauth; /* auth params, i'm authenticator */
109 /*
110 * These functions are filled in by sppp_attach(), and are
111 * expected to be used by the lower layer (hardware) drivers
112 * in order to communicate the (un)availability of the
113 * communication link. Lower layer drivers that are always
114 * ready to communicate (like hardware HDLC) can shortcut

--- 67 unchanged lines hidden ---