1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #ifndef _LINUX_SLIP_H
19 #define _LINUX_SLIP_H
20
21 #include <linux/config.h>
22
23 #if defined(CONFIG_INET) && defined(CONFIG_SLIP_COMPRESSED)
24 # define SL_INCLUDE_CSLIP
25 #endif
26
27 #ifdef SL_INCLUDE_CSLIP
28 # define SL_MODE_DEFAULT SL_MODE_ADAPTIVE
29 #else
30 # define SL_MODE_DEFAULT SL_MODE_SLIP
31 #endif
32
33
34 #define SL_NRUNIT 256
35
36
37 #define SL_MTU 296
38
39
40 #define END 0300
41 #define ESC 0333
42 #define ESC_END 0334
43 #define ESC_ESC 0335
44
45
46 struct slip {
47 int magic;
48
49
50 struct tty_struct *tty;
51 struct device *dev;
52 #ifdef SL_INCLUDE_CSLIP
53 struct slcompress *slcomp;
54 unsigned char *cbuff;
55 #endif
56
57
58 unsigned char *rbuff;
59 int rcount;
60 unsigned char *xbuff;
61 unsigned char *xhead;
62 int xleft;
63
64
65 unsigned long rx_packets;
66 unsigned long tx_packets;
67 unsigned long rx_errors;
68 unsigned long tx_errors;
69 unsigned long rx_dropped;
70 unsigned long tx_dropped;
71 unsigned long rx_over_errors;
72 #ifdef SL_INCLUDE_CSLIP
73 unsigned long tx_compressed;
74 unsigned long rx_compressed;
75 unsigned long tx_misses;
76 #endif
77
78
79 int mtu;
80 int buffsize;
81
82 #ifdef CONFIG_SLIP_MODE_SLIP6
83 int xdata, xbits;
84 #endif
85
86 unsigned char flags;
87 #define SLF_INUSE 0
88 #define SLF_ESCAPE 1
89 #define SLF_ERROR 2
90
91 unsigned char mode;
92 #define SL_MODE_SLIP 0
93 #define SL_MODE_CSLIP 1
94 #define SL_MODE_SLIP6 2
95 #define SL_MODE_CSLIP6 (SL_MODE_SLIP6|SL_MODE_CSLIP)
96 #define SL_MODE_AX25 4
97 #define SL_MODE_ADAPTIVE 8
98 };
99
100
101
102 #define SLIP_MAGIC 0x5302
103
104 extern int slip_init(struct device *dev);
105
106 #endif