![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /* 0003 * slip.h Define the SLIP device driver interface and constants. 0004 * 0005 * NOTE: THIS FILE WILL BE MOVED TO THE LINUX INCLUDE DIRECTORY 0006 * AS SOON AS POSSIBLE! 0007 * 0008 * Version: @(#)slip.h 1.2.0 03/28/93 0009 * 0010 * Fixes: 0011 * Alan Cox : Added slip mtu field. 0012 * Matt Dillon : Printable slip (borrowed from net2e) 0013 * Alan Cox : Added SL_SLIP_LOTS 0014 * Dmitry Gorodchanin : A lot of changes in the 'struct slip' 0015 * Dmitry Gorodchanin : Added CSLIP statistics. 0016 * Stanislav Voronyi : Make line checking as created by 0017 * Igor Chechik, RELCOM Corp. 0018 * Craig Schlenter : Fixed #define bug that caused 0019 * CSLIP telnets to hang in 1.3.61-6 0020 * 0021 * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> 0022 */ 0023 #ifndef _LINUX_SLIP_H 0024 #define _LINUX_SLIP_H 0025 0026 0027 #if defined(CONFIG_INET) && defined(CONFIG_SLIP_COMPRESSED) 0028 # define SL_INCLUDE_CSLIP 0029 #endif 0030 0031 #ifdef SL_INCLUDE_CSLIP 0032 # define SL_MODE_DEFAULT SL_MODE_ADAPTIVE 0033 #else 0034 # define SL_MODE_DEFAULT SL_MODE_SLIP 0035 #endif 0036 0037 /* SLIP configuration. */ 0038 #define SL_NRUNIT 256 /* MAX number of SLIP channels; 0039 This can be overridden with 0040 insmod -oslip_maxdev=nnn */ 0041 #define SL_MTU 296 /* 296; I am used to 600- FvK */ 0042 0043 /* some arch define END as assembly function ending, just undef it */ 0044 #undef END 0045 /* SLIP protocol characters. */ 0046 #define END 0300 /* indicates end of frame */ 0047 #define ESC 0333 /* indicates byte stuffing */ 0048 #define ESC_END 0334 /* ESC ESC_END means END 'data' */ 0049 #define ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */ 0050 0051 0052 struct slip { 0053 int magic; 0054 0055 /* Various fields. */ 0056 struct tty_struct *tty; /* ptr to TTY structure */ 0057 struct net_device *dev; /* easy for intr handling */ 0058 spinlock_t lock; 0059 struct work_struct tx_work; /* Flushes transmit buffer */ 0060 0061 #ifdef SL_INCLUDE_CSLIP 0062 struct slcompress *slcomp; /* for header compression */ 0063 unsigned char *cbuff; /* compression buffer */ 0064 #endif 0065 0066 /* These are pointers to the malloc()ed frame buffers. */ 0067 unsigned char *rbuff; /* receiver buffer */ 0068 int rcount; /* received chars counter */ 0069 unsigned char *xbuff; /* transmitter buffer */ 0070 unsigned char *xhead; /* pointer to next byte to XMIT */ 0071 int xleft; /* bytes left in XMIT queue */ 0072 int mtu; /* Our mtu (to spot changes!) */ 0073 int buffsize; /* Max buffers sizes */ 0074 0075 #ifdef CONFIG_SLIP_MODE_SLIP6 0076 int xdata, xbits; /* 6 bit slip controls */ 0077 #endif 0078 0079 unsigned long flags; /* Flag values/ mode etc */ 0080 #define SLF_INUSE 0 /* Channel in use */ 0081 #define SLF_ESCAPE 1 /* ESC received */ 0082 #define SLF_ERROR 2 /* Parity, etc. error */ 0083 #define SLF_KEEPTEST 3 /* Keepalive test flag */ 0084 #define SLF_OUTWAIT 4 /* is outpacket was flag */ 0085 0086 unsigned char mode; /* SLIP mode */ 0087 unsigned char leased; 0088 pid_t pid; 0089 #define SL_MODE_SLIP 0 0090 #define SL_MODE_CSLIP 1 0091 #define SL_MODE_SLIP6 2 /* Matt Dillon's printable slip */ 0092 #define SL_MODE_CSLIP6 (SL_MODE_SLIP6|SL_MODE_CSLIP) 0093 #define SL_MODE_AX25 4 0094 #define SL_MODE_ADAPTIVE 8 0095 #ifdef CONFIG_SLIP_SMART 0096 unsigned char outfill; /* # of sec between outfill packet */ 0097 unsigned char keepalive; /* keepalive seconds */ 0098 struct timer_list outfill_timer; 0099 struct timer_list keepalive_timer; 0100 #endif 0101 }; 0102 0103 #define SLIP_MAGIC 0x5302 0104 0105 #endif /* _LINUX_SLIP.H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |