xref: /csrg-svn/sys/net/if_slvar.h (revision 61364)
149284Sbostic /*-
249284Sbostic  * Copyright (c) 1991 The Regents of the University of California.
349284Sbostic  * All rights reserved.
449284Sbostic  *
549284Sbostic  * %sccs.include.redist.c%
649284Sbostic  *
7*61364Sbostic  *	@(#)if_slvar.h	7.10 (Berkeley) 06/04/93
849284Sbostic  *
949284Sbostic  * $Header: if_slvar.h,v 1.3 89/05/31 02:25:18 van Exp $
1049284Sbostic  */
1138367Skarels 
1238367Skarels /*
1338368Skarels  * Definitions for SLIP interface data structures
1438368Skarels  *
1549284Sbostic  * (This exists so programs like slstats can get at the definition
1638368Skarels  *  of sl_softc.)
1738367Skarels  */
1838367Skarels struct sl_softc {
1938367Skarels 	struct	ifnet sc_if;		/* network-visible interface */
2038368Skarels 	struct	ifqueue sc_fastq;	/* interactive output queue */
2138367Skarels 	struct	tty *sc_ttyp;		/* pointer to tty structure */
2238368Skarels 	u_char	*sc_mp;			/* pointer to next available buf char */
2338368Skarels 	u_char	*sc_ep;			/* pointer to last available buf char */
2438368Skarels 	u_char	*sc_buf;		/* input buffer */
2538368Skarels 	u_int	sc_flags;		/* see below */
2638368Skarels 	u_int	sc_escape;	/* =1 if last char input was FRAME_ESCAPE */
2738368Skarels 	long	sc_lasttime;		/* last time a char arrived */
2838368Skarels 	long	sc_abortcount;		/* number of abort esacpe chars */
2952203Skarels 	long	sc_starttime;		/* time of first abort in window */
3038378Skarels #ifdef INET				/* XXX */
3138368Skarels 	struct	slcompress sc_comp;	/* tcp compression data */
3238378Skarels #endif
3338367Skarels };
3438367Skarels 
3539947Ssam /* visible flags */
3652203Skarels #define	SC_COMPRESS	IFF_LINK0	/* compress TCP traffic */
3752203Skarels #define	SC_NOICMP	IFF_LINK1	/* supress ICMP traffic */
3852203Skarels #define	SC_AUTOCOMP	IFF_LINK2	/* auto-enable TCP compression */
3938367Skarels 
4038367Skarels /* this stuff doesn't belong here... */
4146548Skarels #define	SLIOCGUNIT	_IOR('t', 88, int)	/* get slip unit number */
42*61364Sbostic 
43*61364Sbostic #ifdef KERNEL
44*61364Sbostic void	 slattach __P((void));
45*61364Sbostic void	 slclose __P((struct tty *));
46*61364Sbostic void	 slinput __P((int, struct tty *));
47*61364Sbostic int	 slioctl __P((struct ifnet *, int, caddr_t));
48*61364Sbostic int	 slopen __P((dev_t, struct tty *));
49*61364Sbostic int	 sloutput __P((struct ifnet *,
50*61364Sbostic 	    struct mbuf *, struct sockaddr *, struct rtentry *));
51*61364Sbostic void	 slstart __P((struct tty *));
52*61364Sbostic int	 sltioctl __P((struct tty *, int, caddr_t, int));
53*61364Sbostic #endif
54