root/net/inet/slip.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * slip.h       Define the SLIP device driver interface and constants.
   3  *
   4  * NOTE:        THIS FILE WILL BE MOVED TO THE LINUX INCLUDE DIRECTORY
   5  *              AS SOON AS POSSIBLE!
   6  *
   7  * Version:     @(#)slip.h      1.2.0   03/28/93
   8  *
   9  * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  10  */
  11 #ifndef _LINUX_SLIP_H
  12 #define _LINUX_SLIP_H
  13 
  14 /* SLIP configuration. */
  15 #define SL_NRUNIT       4               /* number of SLIP channels      */
  16 #define SL_MTU          296             /* 296; I am used to 600- FvK   */
  17 
  18 /* SLIP protocol characters. */
  19 #define END             0300            /* indicates end of frame       */
  20 #define ESC             0333            /* indicates byte stuffing      */
  21 #define ESC_END         0334            /* ESC ESC_END means END 'data' */
  22 #define ESC_ESC         0335            /* ESC ESC_ESC means ESC 'data' */
  23 
  24 
  25 struct slip {
  26   /* Bitmapped flag fields. */
  27   char                  inuse;          /* are we allocated?            */
  28   char                  sending;        /* "channel busy" indicator     */
  29   char                  escape;         /* SLIP state machine           */
  30   char                  unused;         /* fillers                      */
  31 
  32   /* Various fields. */
  33   int                   line;           /* SLIP channel number          */
  34   struct tty_struct     *tty;           /* ptr to TTY structure         */
  35   struct device         *dev;           /* easy for intr handling       */
  36   struct slcompress     *slcomp;        /* for header compression       */
  37 
  38   /* These are pointers to the malloc()ed frame buffers. */
  39   unsigned char         *rbuff;         /* receiver buffer              */
  40   unsigned char         *xbuff;         /* transmitter buffer           */
  41   unsigned char         *cbuff;         /* compression buffer           */
  42 
  43   /* These are the various pointers into the buffers. */
  44   unsigned char         *rhead;         /* RECV buffer pointer (head)   */
  45   unsigned char         *rend;          /* RECV buffer pointer (end)    */
  46   int                   rcount;         /* SLIP receive counter         */
  47 
  48   /* SLIP interface statistics. */
  49   unsigned long         rpacket;        /* inbound frame counter        */
  50   unsigned long         roverrun;       /* "buffer overrun" counter     */
  51   unsigned long         spacket;        /* outbound frames counter      */
  52   unsigned long         sbusy;          /* "transmitter busy" counter   */
  53   unsigned long         errors;         /* error count                  */
  54 };
  55 
  56 
  57 extern int      slip_init(struct device *dev);
  58 
  59 
  60 #endif  /* _LINUX_SLIP.H */

/* [previous][next][first][last][top][bottom][index][help] */