Subversion Repositories SvarDOS

Rev

Rev 616 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
207 mateuszvis 1
/*!\file net/if_slvar.h
2
 * SLIP interface structures.
3
 */
4
 
5
/*      $NetBSD: if_slvar.h,v 1.17 1997/03/27 20:36:17 thorpej Exp $    */
6
 
7
/*-
8
 * Copyright (c) 1991, 1993
9
 *	The Regents of the University of California.  All rights reserved.
10
 *
11
 * Redistribution and use in source and binary forms, with or without
12
 * modification, are permitted provided that the following conditions
13
 * are met:
14
 * 1. Redistributions of source code must retain the above copyright
15
 *    notice, this list of conditions and the following disclaimer.
16
 * 2. Redistributions in binary form must reproduce the above copyright
17
 *    notice, this list of conditions and the following disclaimer in the
18
 *    documentation and/or other materials provided with the distribution.
19
 * 3. All advertising materials mentioning features or use of this software
20
 *    must display the following acknowledgement:
21
 *	This product includes software developed by the University of
22
 *	California, Berkeley and its contributors.
23
 * 4. Neither the name of the University nor the names of its contributors
24
 *    may be used to endorse or promote products derived from this software
25
 *    without specific prior written permission.
26
 *
27
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37
 * SUCH DAMAGE.
38
 *
39
 *	@(#)if_slvar.h	8.3 (Berkeley) 2/1/94
40
 */
41
#ifndef __NET_IF_SLVAR_H
42
#define __NET_IF_SLVAR_H
43
 
44
/*
45
 * Definitions for SLIP interface data structures
46
 * 
47
 * (This exists so programs like slstats can get at the definition
48
 *  of sl_softc.)
49
 */
50
 
51
struct sl_softc {
52
	struct	ifnet sc_if;		/* network-visible interface */
53
	int	sc_unit;		/* XXX unit number */
54
	struct	ifqueue sc_fastq;	/* interactive output queue */
55
	struct	tty *sc_ttyp;		/* pointer to tty structure */
56
	u_char	*sc_mp;			/* pointer to next available buf char */
57
	u_char	*sc_ep;			/* pointer to last available buf char */
58
	u_char	*sc_buf;		/* input buffer */
59
	u_char	*sc_xxx;		/* XXX don't ask... */
60
	u_int	sc_flags;		/* see below */
61
	u_int	sc_escape;	/* =1 if last char input was FRAME_ESCAPE */
62
	long	sc_lasttime;		/* last time a char arrived */
63
	long	sc_abortcount;		/* number of abort esacpe chars */
64
	long	sc_starttime;		/* time of first abort in window */
65
	long	sc_oqlen;		/* previous output queue size */
66
	long	sc_otimeout;		/* number of times output's stalled */
67
#ifdef NetBSD
68
	int	sc_oldbufsize;		/* previous output buffer size */
69
	int	sc_oldbufquot;		/* previous output buffer quoting */
70
#endif
71
#ifdef INET				/* XXX */
72
	struct	slcompress sc_comp;	/* tcp compression data */
73
#endif
74
	caddr_t	sc_bpf;			/* BPF data */
75
};
76
 
77
/* internal flags */
78
#define	SC_ERROR	0x0001		/* had an input error */
79
 
80
/* visible flags */
81
#define	SC_COMPRESS	IFF_LINK0	/* compress TCP traffic */
82
#define	SC_NOICMP	IFF_LINK1	/* supress ICMP traffic */
83
#define	SC_AUTOCOMP	IFF_LINK2	/* auto-enable TCP compression */
84
 
85
#endif