xref: /csrg-svn/sys/net/if_slvar.h (revision 63211)
149284Sbostic /*-
2*63211Sbostic  * Copyright (c) 1991, 1993
3*63211Sbostic  *	The Regents of the University of California.  All rights reserved.
449284Sbostic  *
549284Sbostic  * %sccs.include.redist.c%
649284Sbostic  *
7*63211Sbostic  *	@(#)if_slvar.h	8.1 (Berkeley) 06/10/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 */
4261364Sbostic 
4361364Sbostic #ifdef KERNEL
4461364Sbostic void	 slattach __P((void));
4561364Sbostic void	 slclose __P((struct tty *));
4661364Sbostic void	 slinput __P((int, struct tty *));
4761364Sbostic int	 slioctl __P((struct ifnet *, int, caddr_t));
4861364Sbostic int	 slopen __P((dev_t, struct tty *));
4961364Sbostic int	 sloutput __P((struct ifnet *,
5061364Sbostic 	    struct mbuf *, struct sockaddr *, struct rtentry *));
5161364Sbostic void	 slstart __P((struct tty *));
5261364Sbostic int	 sltioctl __P((struct tty *, int, caddr_t, int));
5361364Sbostic #endif
54