01a7ccd07408cbcb88fa0e7cafb27dda8b53d613
[oftp] / libs / watt32 / net / if_strip.h
1 /*!\file net/if_strip.h
2  * SLIP interface structures.
3  */
4
5 /*      $NetBSD: if_stripvar.h,v 1.4.8.1 1997/11/17 23:36:16 thorpej Exp $      */
6
7 /*
8  * Definitions for SLIP interface data structures
9  * 
10  * (This exists so programs like slstats can get at the definition
11  *  of sl_softc.)
12  */
13
14 #ifndef __NET_IF_STRIP_H
15 #define __NET_IF_STRIP_H
16
17 struct strip_softc {
18         struct  ifnet sc_if;            /* network-visible interface */
19         int     sc_unit;                /* XXX unit number */
20         struct  ifqueue sc_fastq;       /* interactive output queue */
21         struct  tty *sc_ttyp;           /* pointer to tty structure */
22         u_char  *sc_mp;                 /* pointer to next available buf char */
23         u_char  *sc_ep;                 /* pointer to last available buf char */
24         u_char  *sc_buf;                /* input buffer */
25         u_char  *sc_rxbuf;              /* input destuffing buffer */
26         u_char  *sc_txbuf;              /* output stuffing buffer */
27         u_char  *sc_xxx;                /* XXX don't ask... */
28         u_int   sc_flags;               /* see below */
29         long    sc_oqlen;               /* previous output queue size */
30         long    sc_otimeout;            /* number of times output's stalled */
31 #ifdef __NetBSD__
32         int     sc_oldbufsize;          /* previous output buffer size */
33         int     sc_oldbufquot;          /* previous output buffer quoting */
34 #endif
35 #ifdef INET                             /* XXX */
36         struct  slcompress sc_comp;     /* tcp compression data */
37 #endif
38
39         int sc_state;                   /* Radio reset state-machine */
40 #define ST_ALIVE        0x0             /*    answered  probe */
41 #define ST_PROBE_SENT   0x1             /*    probe sent, answer pending */
42 #define ST_DEAD         0x2             /*    no answer to probe; do reset */
43
44         long sc_statetimo;              /* When (secs) current state ends */
45
46         caddr_t sc_bpf;                 /* BPF data */
47 };
48
49
50 /* Internal flags */
51 #define SC_ERROR        0x0001          /* Incurred error reading current pkt*/
52
53 #define SC_TIMEOUT      0x00000400      /* timeout is currently pending */
54
55 /* visible flags */
56 #define SC_COMPRESS     IFF_LINK0       /* compress TCP traffic */
57 #define SC_NOICMP       IFF_LINK1       /* supress ICMP traffic */
58 #define SC_AUTOCOMP     IFF_LINK2       /* auto-enable TCP compression */
59
60 #endif