FreeBSD/Linux Kernel Cross Reference
sys/net/if_stripvar.h
1 /* $NetBSD: if_stripvar.h,v 1.12 2001/06/14 05:44:25 itojun Exp $ */
2
3 #ifndef _NET_IF_STRIPVAR_H_
4 #define _NET_IF_STRIPVAR_H_
5
6 /*
7 * Definitions for STRIP interface data structures
8 */
9 struct strip_softc {
10 struct ifnet sc_if; /* network-visible interface */
11 int sc_unit; /* XXX unit number */
12 struct ifqueue sc_fastq; /* interactive output queue */
13 struct ifqueue sc_inq; /* input queue */
14 struct tty *sc_ttyp; /* pointer to tty structure */
15 struct callout sc_timo_ch; /* timeout callout */
16 u_char *sc_mp; /* pointer to next available buf char */
17 u_char *sc_ep; /* pointer to last available buf char */
18 u_char *sc_pktstart; /* pointer to beginning of packet */
19 struct mbuf *sc_mbuf; /* input buffer */
20 u_char *sc_rxbuf; /* input destuffing buffer */
21 u_char *sc_txbuf; /* output stuffing buffer */
22 u_int sc_flags; /* see below */
23 long sc_oqlen; /* previous output queue size */
24 long sc_otimeout; /* number of times output's stalled */
25 #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
26 void *sc_si; /* softintr handle */
27 #endif
28 #ifdef __NetBSD__
29 int sc_oldbufsize; /* previous output buffer size */
30 int sc_oldbufquot; /* previous output buffer quoting */
31 #endif
32 #ifdef INET /* XXX */
33 struct slcompress sc_comp; /* tcp compression data */
34 #endif
35
36 int sc_state; /* Radio reset state-machine */
37 #define ST_ALIVE 0x0 /* answered probe */
38 #define ST_PROBE_SENT 0x1 /* probe sent, answer pending */
39 #define ST_DEAD 0x2 /* no answer to probe; do reset */
40
41 long sc_statetimo; /* When (secs) current state ends */
42
43 struct timeval sc_lastpacket; /* for watchdog */
44 };
45
46
47 /* Internal flags */
48 #define SC_ERROR 0x0001 /* Incurred error reading current pkt*/
49
50 #define SC_TIMEOUT 0x00000400 /* timeout is currently pending */
51
52 /* visible flags */
53 #define SC_COMPRESS IFF_LINK0 /* compress TCP traffic */
54 #define SC_NOICMP IFF_LINK1 /* supress ICMP traffic */
55 #define SC_AUTOCOMP IFF_LINK2 /* auto-enable TCP compression */
56
57 #ifdef _KERNEL
58 void stripattach __P((int n));
59 void stripclose __P((struct tty *));
60 void stripinput __P((int, struct tty *));
61 int stripioctl __P((struct ifnet *, u_long, caddr_t));
62 int stripopen __P((dev_t, struct tty *));
63 int stripoutput __P((struct ifnet *,
64 struct mbuf *, struct sockaddr *, struct rtentry *));
65 void stripstart __P((struct tty *));
66 int striptioctl __P((struct tty *, u_long, caddr_t, int));
67 #endif /* _KERNEL */
68
69 #endif /* _NET_IF_STRIPVAR_H_ */
Cache object: 495e5503a48f44f638e29e62da67ff31
|