OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [if_pppvar.h] - Diff between revs 1765 and 1782

Only display areas with differences | Details | Blame | View Log

Rev 1765 Rev 1782
/*      $Id: if_pppvar.h,v 1.1 2005-12-20 11:32:24 jcastillo Exp $      */
/*      $Id: if_pppvar.h,v 1.1 2005-12-20 11:32:24 jcastillo Exp $      */
/*
/*
 * if_pppvar.h - private structures and declarations for PPP.
 * if_pppvar.h - private structures and declarations for PPP.
 *
 *
 * Copyright (c) 1994 The Australian National University.
 * Copyright (c) 1994 The Australian National University.
 * All rights reserved.
 * All rights reserved.
 *
 *
 * Permission to use, copy, modify, and distribute this software and its
 * Permission to use, copy, modify, and distribute this software and its
 * documentation is hereby granted, provided that the above copyright
 * documentation is hereby granted, provided that the above copyright
 * notice appears in all copies.  This software is provided without any
 * notice appears in all copies.  This software is provided without any
 * warranty, express or implied. The Australian National University
 * warranty, express or implied. The Australian National University
 * makes no representations about the suitability of this software for
 * makes no representations about the suitability of this software for
 * any purpose.
 * any purpose.
 *
 *
 * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
 * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
 * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
 * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
 * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
 * OF SUCH DAMAGE.
 * OF SUCH DAMAGE.
 *
 *
 * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
 * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
 * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
 * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
 * OR MODIFICATIONS.
 * OR MODIFICATIONS.
 *
 *
 * Copyright (c) 1989 Carnegie Mellon University.
 * Copyright (c) 1989 Carnegie Mellon University.
 * All rights reserved.
 * All rights reserved.
 *
 *
 * Redistribution and use in source and binary forms are permitted
 * Redistribution and use in source and binary forms are permitted
 * provided that the above copyright notice and this paragraph are
 * provided that the above copyright notice and this paragraph are
 * duplicated in all such forms and that any documentation,
 * duplicated in all such forms and that any documentation,
 * advertising materials, and other materials related to such
 * advertising materials, and other materials related to such
 * distribution and use acknowledge that the software was developed
 * distribution and use acknowledge that the software was developed
 * by Carnegie Mellon University.  The name of the
 * by Carnegie Mellon University.  The name of the
 * University may not be used to endorse or promote products derived
 * University may not be used to endorse or promote products derived
 * from this software without specific prior written permission.
 * from this software without specific prior written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */
 */
 
 
/*
/*
 *  ==FILEVERSION 960302==
 *  ==FILEVERSION 960302==
 *
 *
 *  NOTE TO MAINTAINERS:
 *  NOTE TO MAINTAINERS:
 *     If you modify this file at all, please set the above date.
 *     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_pppvar.h is shipped with a PPP distribution as well as with the kernel;
 *     if everyone increases the FILEVERSION number above, then scripts
 *     if everyone increases the FILEVERSION number above, then scripts
 *     can do the right thing when deciding whether to install a new if_pppvar.h
 *     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
 *     file.  Don't change the format of that line otherwise, so the
 *     installation script can recognize it.
 *     installation script can recognize it.
 */
 */
 
 
/*
/*
 * Supported network protocols.  These values are used for
 * Supported network protocols.  These values are used for
 * indexing sc_npmode.
 * indexing sc_npmode.
 */
 */
 
 
/*
/*
 * ppp->inuse should be 32 bits -- kja
 * ppp->inuse should be 32 bits -- kja
 */
 */
 
 
#define NP_IP   0                /* Internet Protocol */
#define NP_IP   0                /* Internet Protocol */
#define NUM_NP  1               /* Number of NPs. */
#define NUM_NP  1               /* Number of NPs. */
 
 
/*
/*
 * Buffers for the PPP process have the following structure
 * Buffers for the PPP process have the following structure
 */
 */
 
 
#define RBUFSIZE  2048           /* MUST be a power of 2 and be <= 4095 */
#define RBUFSIZE  2048           /* MUST be a power of 2 and be <= 4095 */
 
 
struct ppp_buffer {
struct ppp_buffer {
        __s32           size;           /* Size of the buffer area      */
        __s32           size;           /* Size of the buffer area      */
        __s32           count;          /* Count of characters in bufr  */
        __s32           count;          /* Count of characters in bufr  */
        __s32           head;           /* index to head of list        */
        __s32           head;           /* index to head of list        */
        __s32           tail;           /* index to tail of list        */
        __s32           tail;           /* index to tail of list        */
        __u32           locked;         /* Buffer is being sent         */
        __u32           locked;         /* Buffer is being sent         */
        __s32           type;           /* Type of the buffer           */
        __s32           type;           /* Type of the buffer           */
                                        /* =0, device read buffer       */
                                        /* =0, device read buffer       */
                                        /* =1, device write buffer      */
                                        /* =1, device write buffer      */
                                        /* =2, daemon write buffer      */
                                        /* =2, daemon write buffer      */
                                        /* =3, daemon read buffer       */
                                        /* =3, daemon read buffer       */
        __u16           fcs;            /* Frame Check Sequence (CRC)   */
        __u16           fcs;            /* Frame Check Sequence (CRC)   */
        __u8            filler[4];      /* Extra space if needed        */
        __u8            filler[4];      /* Extra space if needed        */
};
};
 
 
/* Given a pointer to the ppp_buffer then return base address of buffer */
/* Given a pointer to the ppp_buffer then return base address of buffer */
#define buf_base(buf) ((__u8 *) (&buf[1]))
#define buf_base(buf) ((__u8 *) (&buf[1]))
 
 
/*
/*
 * Structure describing each ppp unit.
 * Structure describing each ppp unit.
 */
 */
 
 
struct ppp {
struct ppp {
        __s32           magic;          /* magic value for structure    */
        __s32           magic;          /* magic value for structure    */
 
 
        /* Bitmapped flag fields. */
        /* Bitmapped flag fields. */
        __u32           inuse;          /* are we allocated? u8 on intel*/
        __u32           inuse;          /* are we allocated? u8 on intel*/
        __u8            escape;         /* 0x20 if prev char was PPP_ESC*/
        __u8            escape;         /* 0x20 if prev char was PPP_ESC*/
        __u8            toss;           /* toss this frame              */
        __u8            toss;           /* toss this frame              */
 
 
        __u32           flags;          /* miscellany                   */
        __u32           flags;          /* miscellany                   */
 
 
        __u32           xmit_async_map[8]; /* 1 bit means that given control
        __u32           xmit_async_map[8]; /* 1 bit means that given control
                                           character is quoted on output*/
                                           character is quoted on output*/
 
 
        __u32           recv_async_map; /* 1 bit means that given control
        __u32           recv_async_map; /* 1 bit means that given control
                                           character is ignored on input*/
                                           character is ignored on input*/
        __s32                   mtu;    /* maximum xmit frame size      */
        __s32                   mtu;    /* maximum xmit frame size      */
        __s32                   mru;    /* maximum receive frame size   */
        __s32                   mru;    /* maximum receive frame size   */
 
 
        /* Information about the current tty data */
        /* Information about the current tty data */
        __s32                   line;           /* PPP channel number   */
        __s32                   line;           /* PPP channel number   */
        struct tty_struct       *tty;           /* ptr to TTY structure */
        struct tty_struct       *tty;           /* ptr to TTY structure */
        __s32                   bytes_sent;     /* Bytes sent on frame  */
        __s32                   bytes_sent;     /* Bytes sent on frame  */
        __s32                   bytes_rcvd;     /* Bytes recvd on frame */
        __s32                   bytes_rcvd;     /* Bytes recvd on frame */
 
 
        /* Interface to the network layer */
        /* Interface to the network layer */
        struct device           *dev;    /* easy for intr handling      */
        struct device           *dev;    /* easy for intr handling      */
 
 
        /* VJ Header compression data */
        /* VJ Header compression data */
        struct slcompress       *slcomp; /* for header compression      */
        struct slcompress       *slcomp; /* for header compression      */
 
 
        /* Transmission information */
        /* Transmission information */
        struct ppp_buffer *xbuf;        /* Buffer currently being sent  */
        struct ppp_buffer *xbuf;        /* Buffer currently being sent  */
        struct ppp_buffer *s1buf;       /* Pointer to daemon buffer     */
        struct ppp_buffer *s1buf;       /* Pointer to daemon buffer     */
        struct ppp_buffer *s2buf;       /* Pointer to device buffer     */
        struct ppp_buffer *s2buf;       /* Pointer to device buffer     */
 
 
        __u32             last_xmit;    /* time of last transmission    */
        __u32             last_xmit;    /* time of last transmission    */
 
 
  /* These are pointers to the malloc()ed frame buffers.
  /* These are pointers to the malloc()ed frame buffers.
     These buffers are used while processing a packet.  If a packet
     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
     has to hang around for the user process to read it, it lingers in
     the user buffers below. */
     the user buffers below. */
 
 
        struct ppp_buffer *wbuf;          /* Transmission information   */
        struct ppp_buffer *wbuf;          /* Transmission information   */
        struct ppp_buffer *tbuf;          /* daemon transmission buffer */
        struct ppp_buffer *tbuf;          /* daemon transmission buffer */
        struct ppp_buffer *rbuf;          /* Receive information        */
        struct ppp_buffer *rbuf;          /* Receive information        */
        struct ppp_buffer *ubuf;          /* User buffer information    */
        struct ppp_buffer *ubuf;          /* User buffer information    */
        struct ppp_buffer *cbuf;          /* compression buffer         */
        struct ppp_buffer *cbuf;          /* compression buffer         */
 
 
        /* Queues for select() functionality */
        /* Queues for select() functionality */
        struct wait_queue *write_wait;    /* queue for reading processes */
        struct wait_queue *write_wait;    /* queue for reading processes */
        struct wait_queue *read_wait;     /* queue for writing processes */
        struct wait_queue *read_wait;     /* queue for writing processes */
 
 
        /* Statistic information */
        /* Statistic information */
        struct pppstat        stats;      /* statistic information      */
        struct pppstat        stats;      /* statistic information      */
        struct ppp_idle       ddinfo;     /* demand dial information    */
        struct ppp_idle       ddinfo;     /* demand dial information    */
 
 
        /* PPP compression protocol information */
        /* PPP compression protocol information */
        __u32   sc_bytessent;             /* count of octets sent */
        __u32   sc_bytessent;             /* count of octets sent */
        __u32   sc_bytesrcvd;             /* count of octets received */
        __u32   sc_bytesrcvd;             /* count of octets received */
        enum    NPmode sc_npmode[NUM_NP]; /* what to do with each NP */
        enum    NPmode sc_npmode[NUM_NP]; /* what to do with each NP */
        struct  compressor *sc_xcomp;     /* transmit compressor */
        struct  compressor *sc_xcomp;     /* transmit compressor */
        void    *sc_xc_state;             /* transmit compressor state */
        void    *sc_xc_state;             /* transmit compressor state */
        struct  compressor *sc_rcomp;     /* receive decompressor */
        struct  compressor *sc_rcomp;     /* receive decompressor */
        void    *sc_rc_state;             /* receive decompressor state */
        void    *sc_rc_state;             /* receive decompressor state */
        __s32    sc_xfer;                 /* PID of reserved PPP table */
        __s32    sc_xfer;                 /* PID of reserved PPP table */
};
};
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.