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