xref: /original-bsd/sys/net/if_slvar.h (revision c3e32dec)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)if_slvar.h	7.10 (Berkeley) 06/04/93
8  *
9  * $Header: if_slvar.h,v 1.3 89/05/31 02:25:18 van Exp $
10  */
11 
12 /*
13  * Definitions for SLIP interface data structures
14  *
15  * (This exists so programs like slstats can get at the definition
16  *  of sl_softc.)
17  */
18 struct sl_softc {
19 	struct	ifnet sc_if;		/* network-visible interface */
20 	struct	ifqueue sc_fastq;	/* interactive output queue */
21 	struct	tty *sc_ttyp;		/* pointer to tty structure */
22 	u_char	*sc_mp;			/* pointer to next available buf char */
23 	u_char	*sc_ep;			/* pointer to last available buf char */
24 	u_char	*sc_buf;		/* input buffer */
25 	u_int	sc_flags;		/* see below */
26 	u_int	sc_escape;	/* =1 if last char input was FRAME_ESCAPE */
27 	long	sc_lasttime;		/* last time a char arrived */
28 	long	sc_abortcount;		/* number of abort esacpe chars */
29 	long	sc_starttime;		/* time of first abort in window */
30 #ifdef INET				/* XXX */
31 	struct	slcompress sc_comp;	/* tcp compression data */
32 #endif
33 };
34 
35 /* visible flags */
36 #define	SC_COMPRESS	IFF_LINK0	/* compress TCP traffic */
37 #define	SC_NOICMP	IFF_LINK1	/* supress ICMP traffic */
38 #define	SC_AUTOCOMP	IFF_LINK2	/* auto-enable TCP compression */
39 
40 /* this stuff doesn't belong here... */
41 #define	SLIOCGUNIT	_IOR('t', 88, int)	/* get slip unit number */
42 
43 #ifdef KERNEL
44 void	 slattach __P((void));
45 void	 slclose __P((struct tty *));
46 void	 slinput __P((int, struct tty *));
47 int	 slioctl __P((struct ifnet *, int, caddr_t));
48 int	 slopen __P((dev_t, struct tty *));
49 int	 sloutput __P((struct ifnet *,
50 	    struct mbuf *, struct sockaddr *, struct rtentry *));
51 void	 slstart __P((struct tty *));
52 int	 sltioctl __P((struct tty *, int, caddr_t, int));
53 #endif
54