1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #ifndef _LINUX_SLIP_H
17 #define _LINUX_SLIP_H
18
19
20 #ifndef SL_SLIP_LOTS
21 #define SL_NRUNIT 4
22 #else
23 #define SL_NRUNIT 16
24 #endif
25 #define SL_MTU 296
26
27
28 #define END 0300
29 #define ESC 0333
30 #define ESC_END 0334
31 #define ESC_ESC 0335
32
33
34 struct slip {
35 int magic;
36
37 char inuse;
38 char sending;
39 char escape;
40 char unused;
41
42
43 int line;
44 struct tty_struct *tty;
45 struct device *dev;
46 struct slcompress *slcomp;
47
48
49 unsigned char *rbuff;
50 unsigned char *xbuff;
51 unsigned char *cbuff;
52
53
54 unsigned char *rhead;
55 unsigned char *rend;
56 int rcount;
57 unsigned char *xhead;
58 unsigned char *xtail;
59
60
61 unsigned long rpacket;
62 unsigned long roverrun;
63 unsigned long spacket;
64 unsigned long sbusy;
65 unsigned long errors;
66
67 int mtu;
68 unsigned char flags;
69 #define SLF_ESCAPE 2
70 #define SLF_ERROR 4
71 #define SLF_COMP 16
72 #define SLF_EXPN 32
73 #define SLF_XMIT_BUSY 64
74 unsigned char mode;
75 #define SL_MODE_SLIP 0
76 #define SL_MODE_CSLIP 1
77 #define SL_MODE_SLIP6 2
78 #define SL_MODE_CSLIP6 (SL_MODE_SLIP6|SL_MODE_CSLIP)
79 #define SL_MODE_AX25 4
80 #define SL_MODE_ADAPTIVE 8
81 int xdata,xbits;
82 };
83
84 #define SLIP_MAGIC 0x5302
85
86 extern int slip_init(struct device *dev);
87 extern int slip_esc(unsigned char *s, unsigned char *d, int len);
88 extern int slip_esc6(unsigned char *s, unsigned char *d, int len);
89 extern void slip_unesc(struct slip *sl, unsigned char s);
90 extern void slip_unesc6(struct slip *sl, unsigned char s);
91
92 #endif