]> git.ozlabs.org Git - ppp.git/blobdiff - include/linux/if_pppvar.h
chatchat stuff from gpk@onramp.net
[ppp.git] / include / linux / if_pppvar.h
index 0c6a39b9bbdce80f0a3b254f8b0d768fcba87ef5..d6cd0c25bb17397d9619b8ea01cac8a7dc901055 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: if_pppvar.h,v 1.1 1994/12/08 01:59:58 paulus Exp $ */
+/*     From: if_pppvar.h,v 1.2 1995/06/12 11:36:51 paulus Exp */
 /*
  * if_pppvar.h - private structures and declarations for PPP.
  *
  */
 
 /*
- * Supported network protocols.  These values are used for
- * indexing sc_npmode.
+ *  ==FILEVERSION 990325==
+ *
+ *  NOTE TO MAINTAINERS:
+ *   If you modify this file at all, please set the above date.
+ *   if_pppvar.h is shipped with a PPP distribution as well as with the kernel;
+ *   if everyone increases the FILEVERSION number above, then scripts
+ *   can do the right thing when deciding whether to install a new if_pppvar.h
+ *   file.  Don't change the format of that line otherwise, so the
+ *   installation script can recognize it.
  */
 
-#define NP_IP  0               /* Internet Protocol */
-#define NUM_NP 1               /* Number of NPs. */
-
 /*
- * Buffers for the PPP process have the following structure
+ * Supported network protocols.  These values are used for
+ * indexing sc_npmode.
  */
 
-#define RBUFSIZE 2048   /* MUST be a power of 2 and be <= 4095 */
-struct ppp_buffer {
-  int                  size;           /* Size of the buffer area      */
-  int                  count;          /* Count of characters in bufr  */
-  int                  head;           /* index to head of list        */
-  int                  tail;           /* index to tail of list        */
-  int                  locked;         /* Buffer is being sent         */
-  int                  type;           /* Type of the buffer           */
-                                       /* =0, device read buffer       */
-                                       /* =1, device write buffer      */
-                                       /* =2, daemon write buffer      */
-                                       /* =3, daemon read buffer       */
-  unsigned short       fcs;            /* Frame Check Sequence (CRC)   */
-};
+#define NP_IP  0               /* Internet Protocol */
+#define NP_IPX 1               /* IPX protocol */
+#define NP_AT  2               /* Appletalk protocol */
+#define NP_IPV6        3               /* Internet Protocol */
+#define NUM_NP 4               /* Number of NPs. */
 
-/* Given a pointer to the ppp_buffer then return base address of buffer */
-#define buf_base(buf) ((u_char *) (&buf[1]))
+#define OBUFSIZE       256     /* # chars of output buffering */
 
 /*
  * Structure describing each ppp unit.
@@ -77,66 +72,64 @@ struct ppp_buffer {
 
 struct ppp {
        int             magic;          /* magic value for structure    */
-
-  /* Bitmapped flag fields. */
-       char            inuse;          /* are we allocated?            */
-       char            escape;         /* 0x20 if prev char was PPP_ESC*/
-       char            toss;           /* toss this frame              */
-
-       unsigned int    flags;          /* miscellany                   */
-
-       ext_accm        xmit_async_map; /* 1 bit means that given control 
+       struct ppp      *next;          /* unit with next index         */
+       unsigned long   inuse;          /* are we allocated?            */
+       int             line;           /* network interface unit #     */
+       __u32           flags;          /* miscellaneous control flags  */
+       int             mtu;            /* maximum xmit frame size      */
+       int             mru;            /* maximum receive frame size   */
+       struct slcompress *slcomp;      /* for TCP header compression   */
+       struct sk_buff_head xmt_q;      /* frames to send from pppd     */
+       struct sk_buff_head rcv_q;      /* frames for pppd to read      */
+       unsigned long   xmit_busy;      /* bit 0 set when xmitter busy  */
+
+       /* Information specific to using ppp on async serial lines. */
+       struct tty_struct *tty;         /* ptr to TTY structure */
+       struct tty_struct *backup_tty;  /* TTY to use if tty gets closed */
+       __u8            escape;         /* 0x20 if prev char was PPP_ESC */
+       __u8            toss;           /* toss this frame              */
+       volatile __u8   tty_pushing;    /* internal state flag          */
+       volatile __u8   woke_up;        /* internal state flag          */
+       __u32           xmit_async_map[8]; /* 1 bit means that given control 
                                           character is quoted on output*/
-
-       unsigned long   recv_async_map; /* 1 bit means that given control 
+       __u32           recv_async_map; /* 1 bit means that given control 
                                           character is ignored on input*/
-       int                     mtu;    /* maximum xmit frame size      */
-       int                     mru;    /* maximum receive frame size   */
+       __u32           bytes_sent;     /* Bytes sent on frame  */
+       __u32           bytes_rcvd;     /* Bytes recvd on frame */
 
-  /* Information about the current tty data */
-       int                     line;           /* PPP channel number   */
-       struct tty_struct       *tty;           /* ptr to TTY structure */
-       int                     bytes_sent;     /* Bytes sent on frame  */
-       int                     bytes_rcvd;     /* Bytes recvd on frame */
+       /* Async transmission information */
+       struct sk_buff  *tpkt;          /* frame currently being sent   */
+       int             tpkt_pos;       /* how much of it we've done    */
+       __u16           tfcs;           /* FCS so far for it            */
+       unsigned char   *optr;          /* where we're up to in sending */
+       unsigned char   *olim;          /* points past last valid char  */
 
-  /* Interface to the network layer */
-       struct device           *dev;   /* easy for intr handling       */
+       /* Async reception information */
+       struct sk_buff  *rpkt;          /* frame currently being rcvd   */
+       __u16           rfcs;           /* FCS so far of rpkt           */
 
-  /* VJ Header compression data */
-       struct slcompress       *slcomp;/* for header compression       */
+       /* Queues for select() functionality */
+       struct wait_queue *read_wait;   /* queue for reading processes  */
 
-  /* Transmission information */
-       struct ppp_buffer *xbuf;        /* Buffer currently being sent  */
-       struct ppp_buffer *s1buf;       /* Pointer to daemon buffer     */
-       struct ppp_buffer *s2buf;       /* Pointer to device buffer     */
+       /* info for detecting idle channels */
+       unsigned long   last_xmit;      /* time of last transmission    */
+       unsigned long   last_recv;      /* time last packet received    */
 
-       unsigned long     last_xmit;    /* time of last transmission    */
+       /* Statistic information */
+       struct pppstat  stats;          /* statistic information        */
 
-  /* These are pointers to the malloc()ed frame buffers.
-     These buffers are used while processing a packet. If a packet
-     has to hang around for the user process to read it, it lingers in
-     the user buffers below. */
+       /* PPP compression protocol information */
+       struct  compressor *sc_xcomp;   /* transmit compressor */
+       void    *sc_xc_state;           /* transmit compressor state */
+       struct  compressor *sc_rcomp;   /* receive decompressor */
+       void    *sc_rc_state;           /* receive decompressor state */
 
-       struct ppp_buffer *wbuf;        /* Transmission information     */
-       struct ppp_buffer *tbuf;        /* daemon transmission buffer   */
-       struct ppp_buffer *rbuf;        /* Receive information          */
-       struct ppp_buffer *ubuf;        /* User buffer information      */
-       struct ppp_buffer *cbuf;        /* compression buffer           */
-
-  /* Queues for select() functionality */
-       struct wait_queue *write_wait;  /* queue for reading processes  */
-       struct wait_queue *read_wait;   /* queue for writing processes  */
-
-  /* Statistic information */
-       struct pppstat    p;            /* statistic information        */
-       struct ppp_ddinfo ddinfo;       /* demand dial information      */
-
-  /* PPP compression protocol information */
-       u_int   sc_bytessent;             /* count of octets sent */
-       u_int   sc_bytesrcvd;             /* count of octets received */
        enum    NPmode sc_npmode[NUM_NP]; /* what to do with each NP */
-       struct  compressor *sc_xcomp;     /* transmit compressor */
-       void    *sc_xc_state;             /* transmit compressor state */
-       struct  compressor *sc_rcomp;     /* receive decompressor */
-       void    *sc_rc_state;             /* receive decompressor state */
+       int      sc_xfer;               /* PID of reserved PPP table */
+       char    name[8];                /* space for unit name */
+       struct device   dev;            /* net device structure */
+       struct enet_statistics estats;  /* more detailed stats */
+
+       /* tty output buffer */
+       unsigned char   obuf[OBUFSIZE]; /* buffer for characters to send */
 };