1 /* $Id: if_pppvar.h,v 1.1 1994/09/21 00:28:59 paulus Exp $ */
3 * if_pppvar.h - private structures and declarations for PPP.
5 * Copyright (c) 1994 The Australian National University.
8 * Permission to use, copy, modify, and distribute this software and its
9 * documentation is hereby granted, provided that the above copyright
10 * notice appears in all copies. This software is provided without any
11 * warranty, express or implied. The Australian National University
12 * makes no representations about the suitability of this software for
15 * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
16 * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
17 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
18 * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
21 * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
22 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
23 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
24 * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
25 * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
28 * Copyright (c) 1989 Carnegie Mellon University.
29 * All rights reserved.
31 * Redistribution and use in source and binary forms are permitted
32 * provided that the above copyright notice and this paragraph are
33 * duplicated in all such forms and that any documentation,
34 * advertising materials, and other materials related to such
35 * distribution and use acknowledge that the software was developed
36 * by Carnegie Mellon University. The name of the
37 * University may not be used to endorse or promote products derived
38 * from this software without specific prior written permission.
39 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
40 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
41 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
45 * Supported network protocols. These values are used for
48 #define NP_IP 0 /* Internet Protocol */
49 #define NUM_NP 1 /* Number of NPs. */
52 * Structure describing each ppp unit.
55 struct ifnet sc_if; /* network-visible interface */
56 u_int sc_flags; /* see below */
57 void *sc_devp; /* pointer to device-dep structure */
58 int (*sc_start) __P((struct ppp_softc *)); /* start routine */
59 short sc_mru; /* max receive unit */
60 pid_t sc_xfer; /* used in transferring unit */
61 struct ifqueue sc_inq; /* TTY side input queue */
62 struct ifqueue sc_fastq; /* IP interactive output packet q */
64 struct slcompress sc_comp; /* vjc control buffer */
66 u_int sc_bytessent; /* count of octets sent */
67 u_int sc_bytesrcvd; /* count of octets received */
68 caddr_t sc_bpf; /* hook for BPF */
69 enum NPmode sc_npmode[NUM_NP]; /* what to do with each NP */
70 struct compressor *sc_xcomp; /* transmit compressor */
71 void *sc_xc_state; /* transmit compressor state */
72 struct compressor *sc_rcomp; /* receive decompressor */
73 void *sc_rc_state; /* receive decompressor state */
75 /* Device-dependent part for async lines. */
76 ext_accm sc_asyncmap; /* async control character map */
77 u_long sc_rasyncmap; /* receive async control char map */
78 struct mbuf *sc_outm; /* mbuf chain currently being output */
79 struct mbuf *sc_m; /* pointer to input mbuf chain */
80 struct mbuf *sc_mc; /* pointer to current input mbuf */
81 char *sc_mp; /* ptr to next char in input mbuf */
82 short sc_ilen; /* length of input packet so far */
83 u_short sc_fcs; /* FCS so far (input) */
84 u_short sc_outfcs; /* FCS so far for output packet */
85 u_char sc_rawin[16]; /* chars as received */
86 int sc_rawin_count; /* # in sc_rawin */
89 struct ppp_softc ppp_softc[NPPP];
91 extern int ppppktin __P((struct ppp_softc *sc, struct mbuf *m));
92 struct mbuf *ppp_dequeue __P((struct ppp_softc *sc));