if_sppp.h (138745) | if_sppp.h (139365) |
---|---|
1/* | 1/* |
2 * Defines for synchronous PPP/Cisco link level subroutines. | 2 * Defines for synchronous PPP/Cisco/Frame Relay link level subroutines. |
3 * | 3 * |
4 * Copyright (C) 1994 Cronyx Ltd. | 4 * Copyright (C) 1994-2000 Cronyx Engineering. |
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 * | 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 138745 2004-12-12 14:54:15Z rik $ | 19 * $FreeBSD: head/sys/net/if_sppp.h 139365 2004-12-28 00:07:57Z rik $ |
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 { --- 132 unchanged lines hidden (view full) --- 160 struct callout pap_my_to_ch; /* PAP needs one more... */ 161 struct callout keepalive_callout; /* keepalive callout */ 162 struct slcp lcp; /* LCP params */ 163 struct sipcp ipcp; /* IPCP params */ 164 struct sipcp ipv6cp; /* IPv6CP params */ 165 struct sauth myauth; /* auth params, i'm peer */ 166 struct sauth hisauth; /* auth params, i'm authenticator */ 167 struct slcompress *pp_comp; /* for VJ compression */ | 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 { --- 132 unchanged lines hidden (view full) --- 160 struct callout pap_my_to_ch; /* PAP needs one more... */ 161 struct callout keepalive_callout; /* keepalive callout */ 162 struct slcp lcp; /* LCP params */ 163 struct sipcp ipcp; /* IPCP params */ 164 struct sipcp ipv6cp; /* IPv6CP params */ 165 struct sauth myauth; /* auth params, i'm peer */ 166 struct sauth hisauth; /* auth params, i'm authenticator */ 167 struct slcompress *pp_comp; /* for VJ compression */ |
168 u_short fr_dlci; /* Frame Relay DLCI number, 16..1023 */ 169 u_char fr_status; /* PVC status, active/new/delete */ |
|
168 /* 169 * These functions are filled in by sppp_attach(), and are 170 * expected to be used by the lower layer (hardware) drivers 171 * in order to communicate the (un)availability of the 172 * communication link. Lower layer drivers that are always 173 * ready to communicate (like hardware HDLC) can shortcut 174 * pp_up from pp_tls, and pp_down from pp_tlf. 175 */ --- 23 unchanged lines hidden (view full) --- 199 struct mtx mtx; 200 /* if_start () wrapper */ 201 void (*if_start) (struct ifnet *); 202 struct callout ifstart_callout; /* if_start () scheduler */ 203}; 204 205/* bits for pp_flags */ 206#define PP_KEEPALIVE 0x01 /* use keepalive protocol */ | 170 /* 171 * These functions are filled in by sppp_attach(), and are 172 * expected to be used by the lower layer (hardware) drivers 173 * in order to communicate the (un)availability of the 174 * communication link. Lower layer drivers that are always 175 * ready to communicate (like hardware HDLC) can shortcut 176 * pp_up from pp_tls, and pp_down from pp_tlf. 177 */ --- 23 unchanged lines hidden (view full) --- 201 struct mtx mtx; 202 /* if_start () wrapper */ 203 void (*if_start) (struct ifnet *); 204 struct callout ifstart_callout; /* if_start () scheduler */ 205}; 206 207/* bits for pp_flags */ 208#define PP_KEEPALIVE 0x01 /* use keepalive protocol */ |
209#define PP_FR 0x04 /* use Frame Relay protocol instead of PPP */ |
|
207 /* 0x04 was PP_TIMO */ 208#define PP_CALLIN 0x08 /* we are being called */ 209#define PP_NEEDAUTH 0x10 /* remote requested authentication */ 210 211void sppp_attach (struct ifnet *ifp); 212void sppp_detach (struct ifnet *ifp); 213void sppp_input (struct ifnet *ifp, struct mbuf *m); 214int sppp_ioctl (struct ifnet *ifp, u_long cmd, void *data); 215struct mbuf *sppp_dequeue (struct ifnet *ifp); 216struct mbuf *sppp_pick(struct ifnet *ifp); 217int sppp_isempty (struct ifnet *ifp); 218void sppp_flush (struct ifnet *ifp); | 210 /* 0x04 was PP_TIMO */ 211#define PP_CALLIN 0x08 /* we are being called */ 212#define PP_NEEDAUTH 0x10 /* remote requested authentication */ 213 214void sppp_attach (struct ifnet *ifp); 215void sppp_detach (struct ifnet *ifp); 216void sppp_input (struct ifnet *ifp, struct mbuf *m); 217int sppp_ioctl (struct ifnet *ifp, u_long cmd, void *data); 218struct mbuf *sppp_dequeue (struct ifnet *ifp); 219struct mbuf *sppp_pick(struct ifnet *ifp); 220int sppp_isempty (struct ifnet *ifp); 221void sppp_flush (struct ifnet *ifp); |
222 223/* Internal functions */ 224void sppp_fr_input (struct sppp *sp, struct mbuf *m); 225struct mbuf *sppp_fr_header (struct sppp *sp, struct mbuf *m, int fam); 226void sppp_fr_keepalive (struct sppp *sp); 227void sppp_get_ip_addrs(struct sppp *sp, u_long *src, u_long *dst, 228 u_long *srcmask); 229 |
|
219#endif 220 221#endif /* _NET_IF_SPPP_H_ */ | 230#endif 231 232#endif /* _NET_IF_SPPP_H_ */ |