1/* $NetBSD: if_stripvar.h,v 1.18 2006/06/07 22:33:43 kardel Exp $ */ 2 3#ifndef _NET_IF_STRIPVAR_H_ 4#define _NET_IF_STRIPVAR_H_ 5 6/* 7 * Definitions for STRIP interface data structures 8 */ 9struct 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 void *sc_si; /* softintr handle */ 26#ifdef __NetBSD__ 27 int sc_oldbufsize; /* previous output buffer size */ 28 int sc_oldbufquot; /* previous output buffer quoting */ 29#endif 30#ifdef INET /* XXX */ 31 struct slcompress sc_comp; /* tcp compression data */ 32#endif 33 34 int sc_state; /* Radio reset state-machine */ 35#define ST_ALIVE 0x0 /* answered probe */ 36#define ST_PROBE_SENT 0x1 /* probe sent, answer pending */ 37#define ST_DEAD 0x2 /* no answer to probe; do reset */ 38 39 long sc_statetimo; /* When (secs) current state ends */ 40 41 struct bintime sc_lastpacket; /* for watchdog */ 42 LIST_ENTRY(strip_softc) sc_iflist; 43}; 44 45 46/* Internal flags */ 47#define SC_ERROR 0x0001 /* Incurred error reading current pkt*/ 48 49#define SC_TIMEOUT 0x00000400 /* timeout is currently pending */ 50 51/* visible flags */ 52#define SC_COMPRESS IFF_LINK0 /* compress TCP traffic */ 53#define SC_NOICMP IFF_LINK1 /* supress ICMP traffic */ 54#define SC_AUTOCOMP IFF_LINK2 /* auto-enable TCP compression */ 55 56#ifdef _KERNEL 57void stripattach(void); 58#endif /* _KERNEL */ 59 60#endif /* !_NET_IF_STRIPVAR_H_ */ 61