NetBSD/sys/net/if_stripvar.h
itojun 4d51fe368b change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific
interfaces only).

was: if_lastchange get updated on every packet transmission/receipt.
now: if_lastchange get updated when IFF_UP is changed.
2001-06-14 05:44:23 +00:00

70 lines
2.4 KiB
C

/* $NetBSD: if_stripvar.h,v 1.12 2001/06/14 05:44:25 itojun Exp $ */
#ifndef _NET_IF_STRIPVAR_H_
#define _NET_IF_STRIPVAR_H_
/*
* Definitions for STRIP interface data structures
*/
struct strip_softc {
struct ifnet sc_if; /* network-visible interface */
int sc_unit; /* XXX unit number */
struct ifqueue sc_fastq; /* interactive output queue */
struct ifqueue sc_inq; /* input queue */
struct tty *sc_ttyp; /* pointer to tty structure */
struct callout sc_timo_ch; /* timeout callout */
u_char *sc_mp; /* pointer to next available buf char */
u_char *sc_ep; /* pointer to last available buf char */
u_char *sc_pktstart; /* pointer to beginning of packet */
struct mbuf *sc_mbuf; /* input buffer */
u_char *sc_rxbuf; /* input destuffing buffer */
u_char *sc_txbuf; /* output stuffing buffer */
u_int sc_flags; /* see below */
long sc_oqlen; /* previous output queue size */
long sc_otimeout; /* number of times output's stalled */
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
void *sc_si; /* softintr handle */
#endif
#ifdef __NetBSD__
int sc_oldbufsize; /* previous output buffer size */
int sc_oldbufquot; /* previous output buffer quoting */
#endif
#ifdef INET /* XXX */
struct slcompress sc_comp; /* tcp compression data */
#endif
int sc_state; /* Radio reset state-machine */
#define ST_ALIVE 0x0 /* answered probe */
#define ST_PROBE_SENT 0x1 /* probe sent, answer pending */
#define ST_DEAD 0x2 /* no answer to probe; do reset */
long sc_statetimo; /* When (secs) current state ends */
struct timeval sc_lastpacket; /* for watchdog */
};
/* Internal flags */
#define SC_ERROR 0x0001 /* Incurred error reading current pkt*/
#define SC_TIMEOUT 0x00000400 /* timeout is currently pending */
/* visible flags */
#define SC_COMPRESS IFF_LINK0 /* compress TCP traffic */
#define SC_NOICMP IFF_LINK1 /* supress ICMP traffic */
#define SC_AUTOCOMP IFF_LINK2 /* auto-enable TCP compression */
#ifdef _KERNEL
void stripattach __P((int n));
void stripclose __P((struct tty *));
void stripinput __P((int, struct tty *));
int stripioctl __P((struct ifnet *, u_long, caddr_t));
int stripopen __P((dev_t, struct tty *));
int stripoutput __P((struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *));
void stripstart __P((struct tty *));
int striptioctl __P((struct tty *, u_long, caddr_t, int));
#endif /* _KERNEL */
#endif /* _NET_IF_STRIPVAR_H_ */