1 /****************************************************************************
2  *	Defines for the Multi-KISS driver.
3  ****************************************************************************/
4 
5 #define AX25_MAXDEV	16		/* MAX number of AX25 channels;
6 					   This can be overridden with
7 					   insmod -oax25_maxdev=nnn	*/
8 #define AX_MTU		236
9 
10 /* SLIP/KISS protocol characters. */
11 #define END             0300		/* indicates end of frame	*/
12 #define ESC             0333		/* indicates byte stuffing	*/
13 #define ESC_END         0334		/* ESC ESC_END means END 'data'	*/
14 #define ESC_ESC         0335		/* ESC ESC_ESC means ESC 'data'	*/
15 
16 struct ax_disp {
17 	int                magic;
18 
19 	/* Various fields. */
20 	struct tty_struct  *tty;		/* ptr to TTY structure		*/
21 	struct net_device      *dev;		/* easy for intr handling	*/
22 	struct ax_disp     *mkiss;		/* mkiss txport if mkiss channel*/
23 
24 	/* These are pointers to the malloc()ed frame buffers. */
25 	unsigned char      *rbuff;		/* receiver buffer		*/
26 	int                rcount;		/* received chars counter       */
27 	unsigned char      *xbuff;		/* transmitter buffer		*/
28 	unsigned char      *xhead;		/* pointer to next byte to XMIT */
29 	int                xleft;		/* bytes left in XMIT queue     */
30 
31 	/* SLIP interface statistics. */
32 	unsigned long      rx_packets;		/* inbound frames counter	*/
33 	unsigned long      tx_packets;		/* outbound frames counter      */
34         unsigned long      rx_bytes;            /* inbound bytes counter        */
35         unsigned long      tx_bytes;            /* outbound bytes counter       */
36 	unsigned long      rx_errors;		/* Parity, etc. errors          */
37 	unsigned long      tx_errors;		/* Planned stuff                */
38 	unsigned long      rx_dropped;		/* No memory for skb            */
39 	unsigned long      tx_dropped;		/* When MTU change              */
40 	unsigned long      rx_over_errors;	/* Frame bigger then SLIP buf.  */
41 
42 	/* Detailed SLIP statistics. */
43 	int                 mtu;		/* Our mtu (to spot changes!)   */
44 	int                 buffsize;		/* Max buffers sizes            */
45 
46 
47 	unsigned long   flags;		/* Flag values/ mode etc	*/
48 					/* long req'd: used by set_bit --RR */
49 #define AXF_INUSE	0		/* Channel in use               */
50 #define AXF_ESCAPE	1               /* ESC received                 */
51 #define AXF_ERROR	2               /* Parity, etc. error           */
52 #define AXF_KEEPTEST	3		/* Keepalive test flag		*/
53 #define AXF_OUTWAIT	4		/* is outpacket was flag	*/
54 
55 	int                 mode;
56         int                 crcmode;    /* MW: for FlexNet, SMACK etc.  */
57 #define CRC_MODE_NONE   0
58 #define CRC_MODE_FLEX   1
59 #define CRC_MODE_SMACK  2
60 };
61 
62 #define AX25_MAGIC		0x5316
63 #define MKISS_DRIVER_MAGIC	1215
64