diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/net/wan/x25_asy.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/net/wan/x25_asy.h')
-rw-r--r-- | drivers/net/wan/x25_asy.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/net/wan/x25_asy.h b/drivers/net/wan/x25_asy.h new file mode 100644 index 000000000000..41770200ceb6 --- /dev/null +++ b/drivers/net/wan/x25_asy.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _LINUX_X25_ASY_H | ||
2 | #define _LINUX_X25_ASY_H | ||
3 | |||
4 | /* X.25 asy configuration. */ | ||
5 | #define SL_NRUNIT 256 /* MAX number of X.25 channels; | ||
6 | This can be overridden with | ||
7 | insmod -ox25_asy_maxdev=nnn */ | ||
8 | #define SL_MTU 256 | ||
9 | |||
10 | /* X25 async protocol characters. */ | ||
11 | #define X25_END 0x7E /* indicates end of frame */ | ||
12 | #define X25_ESC 0x7D /* indicates byte stuffing */ | ||
13 | #define X25_ESCAPE(x) ((x)^0x20) | ||
14 | #define X25_UNESCAPE(x) ((x)^0x20) | ||
15 | |||
16 | |||
17 | struct x25_asy { | ||
18 | int magic; | ||
19 | |||
20 | /* Various fields. */ | ||
21 | spinlock_t lock; | ||
22 | struct tty_struct *tty; /* ptr to TTY structure */ | ||
23 | struct net_device *dev; /* easy for intr handling */ | ||
24 | |||
25 | /* These are pointers to the malloc()ed frame buffers. */ | ||
26 | unsigned char *rbuff; /* receiver buffer */ | ||
27 | int rcount; /* received chars counter */ | ||
28 | unsigned char *xbuff; /* transmitter buffer */ | ||
29 | unsigned char *xhead; /* pointer to next byte to XMIT */ | ||
30 | int xleft; /* bytes left in XMIT queue */ | ||
31 | |||
32 | /* X.25 interface statistics. */ | ||
33 | struct net_device_stats stats; | ||
34 | |||
35 | int buffsize; /* Max buffers sizes */ | ||
36 | |||
37 | unsigned long flags; /* Flag values/ mode etc */ | ||
38 | #define SLF_INUSE 0 /* Channel in use */ | ||
39 | #define SLF_ESCAPE 1 /* ESC received */ | ||
40 | #define SLF_ERROR 2 /* Parity, etc. error */ | ||
41 | #define SLF_OUTWAIT 4 /* Waiting for output */ | ||
42 | }; | ||
43 | |||
44 | |||
45 | |||
46 | #define X25_ASY_MAGIC 0x5303 | ||
47 | |||
48 | extern int x25_asy_init(struct net_device *dev); | ||
49 | |||
50 | #endif /* _LINUX_X25_ASY.H */ | ||