NetBSD/sys/net/if_stripvar.h
jonathan 36c640a447 * Remove old, unused SLIP variables from softc.
* Fix radio error-message parsing bug: old comparison against error
  prefix string  off by the size of the Starmode link-level protocol field.
* Fix radio reset finite state machine, given that parsing works properly.
* Add debugging messages about reset FSM if IFF_DEBUG is set.
* Remove #ifdefs notdef around back the check that discards newlines at
  the beginning of a frame. Every error message from the radio has a newline,
  as the radio send error messages terminated by \r\n, not  just \r like data
  frames. Not dropping the \n garbles the following data frame.
* Remove unused low-level debugging routines.
* Reformat the low-level bytestuff/RLL code to match the canonical source.
* Reduce MTU to 1100 bytes; 1200 bytes can overflow the radio buffers if the
  bytestuff/RLL does poorly.
* Fix radio-probe string to _not_ include a frame delimiter (\r): sending
  a \r to the radio tickles a bug in the firmware, causing the radio to
  smash the next frame sent after  the "**\r" probe string.
* Add calls to the tty t_oproc routine to make sure the probe and reset
  strings get sent to the modem promptly, rather than waiting for the next
  packet.
* Add PPP-style calls to the tty start-output function; seems to
  reduce latency marginally.

still to do:
* Flush output queue if resetting, since the radio is going to drop
  frames on the floor anyway if it needs resetting.
* Reduce tty start-output calls.
1996-08-02 02:53:39 +00:00

62 lines
2.1 KiB
C

/* $NetBSD: if_stripvar.h,v 1.3 1996/08/02 02:53:39 jonathan Exp $ */
/*
* Definitions for SLIP interface data structures
*
* (This exists so programs like slstats can get at the definition
* of sl_softc.)
*/
struct st_softc {
struct ifnet sc_if; /* network-visible interface */
int sc_unit; /* XXX unit number */
struct ifqueue sc_fastq; /* interactive output queue */
struct tty *sc_ttyp; /* pointer to tty structure */
u_char *sc_mp; /* pointer to next available buf char */
u_char *sc_ep; /* pointer to last available buf char */
u_char *sc_buf; /* 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 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 */
caddr_t sc_bpf; /* BPF data */
};
/* 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 */