2 * slip.h Define the SLIP device driver interface and constants.
4 * NOTE: THIS FILE WILL BE MOVED TO THE LINUX INCLUDE DIRECTORY
7 * Version: @(#)slip.h 1.2.0 03/28/93
10 * Alan Cox : Added slip mtu field.
11 * Matt Dillon : Printable slip (borrowed from net2e)
12 * Alan Cox : Added SL_SLIP_LOTS
13 * Dmitry Gorodchanin : A lot of changes in the 'struct slip'
14 * Dmitry Gorodchanin : Added CSLIP statistics.
15 * Stanislav Voronyi : Make line checking as created by
16 * Igor Chechik, RELCOM Corp.
17 * Craig Schlenter : Fixed #define bug that caused
18 * CSLIP telnets to hang in 1.3.61-6
20 * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
26 #if defined(CONFIG_INET) && defined(CONFIG_SLIP_COMPRESSED)
27 # define SL_INCLUDE_CSLIP
30 #ifdef SL_INCLUDE_CSLIP
31 # define SL_MODE_DEFAULT SL_MODE_ADAPTIVE
33 # define SL_MODE_DEFAULT SL_MODE_SLIP
36 /* SLIP configuration. */
37 #define SL_NRUNIT 256 /* MAX number of SLIP channels;
38 This can be overridden with
39 insmod -oslip_maxdev=nnn */
40 #define SL_MTU 296 /* 296; I am used to 600- FvK */
42 /* SLIP protocol characters. */
43 #define END 0300 /* indicates end of frame */
44 #define ESC 0333 /* indicates byte stuffing */
45 #define ESC_END 0334 /* ESC ESC_END means END 'data' */
46 #define ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */
53 struct tty_struct *tty; /* ptr to TTY structure */
54 struct net_device *dev; /* easy for intr handling */
57 #ifdef SL_INCLUDE_CSLIP
58 struct slcompress *slcomp; /* for header compression */
59 unsigned char *cbuff; /* compression buffer */
62 /* These are pointers to the malloc()ed frame buffers. */
63 unsigned char *rbuff; /* receiver buffer */
64 int rcount; /* received chars counter */
65 unsigned char *xbuff; /* transmitter buffer */
66 unsigned char *xhead; /* pointer to next byte to XMIT */
67 int xleft; /* bytes left in XMIT queue */
69 /* SLIP interface statistics. */
70 #ifdef SL_INCLUDE_CSLIP
71 unsigned long tx_compressed;
72 unsigned long rx_compressed;
73 unsigned long tx_misses;
75 /* Detailed SLIP statistics. */
77 int mtu; /* Our mtu (to spot changes!) */
78 int buffsize; /* Max buffers sizes */
80 #ifdef CONFIG_SLIP_MODE_SLIP6
81 int xdata, xbits; /* 6 bit slip controls */
84 unsigned long flags; /* Flag values/ mode etc */
85 #define SLF_INUSE 0 /* Channel in use */
86 #define SLF_ESCAPE 1 /* ESC received */
87 #define SLF_ERROR 2 /* Parity, etc. error */
88 #define SLF_KEEPTEST 3 /* Keepalive test flag */
89 #define SLF_OUTWAIT 4 /* is outpacket was flag */
91 unsigned char mode; /* SLIP mode */
95 #define SL_MODE_SLIP 0
96 #define SL_MODE_CSLIP 1
97 #define SL_MODE_SLIP6 2 /* Matt Dillon's printable slip */
98 #define SL_MODE_CSLIP6 (SL_MODE_SLIP6|SL_MODE_CSLIP)
99 #define SL_MODE_AX25 4
100 #define SL_MODE_ADAPTIVE 8
101 #ifdef CONFIG_SLIP_SMART
102 unsigned char outfill; /* # of sec between outfill packet */
103 unsigned char keepalive; /* keepalive seconds */
104 struct timer_list outfill_timer;
105 struct timer_list keepalive_timer;
109 #define SLIP_MAGIC 0x5302
111 #endif /* _LINUX_SLIP.H */