diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_ppp.h | 28 | ||||
-rw-r--r-- | include/linux/if_pppvar.h | 127 |
2 files changed, 67 insertions, 88 deletions
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index d2a7e15..bb7a98d 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h @@ -1,4 +1,4 @@ -/* $Id: if_ppp.h,v 1.13 1998/05/04 06:14:00 paulus Exp $ */ +/* $Id: if_ppp.h,v 1.14 1998/07/07 04:27:33 paulus Exp $ */ /* * if_ppp.h - Point-to-Point Protocol definitions. @@ -21,7 +21,7 @@ */ /* - * ==FILEVERSION 980504== + * ==FILEVERSION 980704== * * NOTE TO MAINTAINERS: * If you modify this file at all, please set the above date. @@ -35,13 +35,19 @@ #ifndef _IF_PPP_H_ #define _IF_PPP_H_ +#if defined(__linux__) +#include <linux/if.h> +#include <linux/ioctl.h> +#include <linux/ppp_defs.h> +#endif + /* * Packet sizes */ #define PPP_MTU 1500 /* Default MTU (size of Info field) */ #define PPP_MAXMRU 65000 /* Largest MRU we allow */ -#define PPP_VERSION "2.3.5" +#define PPP_VERSION "2.3.3" #define PPP_MAGIC 0x5002 /* Magic value for the ppp structure */ #define PROTO_IPX 0x002b /* protocol numbers */ #define PROTO_DNA_RT 0x0027 /* DNA Routing */ @@ -70,7 +76,7 @@ #define SC_MASK 0x0f0000ff /* bits that user can change */ /* state bits */ -#define SC_XMIT_BUSY 0x10000000 /* ppp_write_wakeup is active */ +#define SC_XMIT_BUSY 0x10000000 /* (used by isdn_ppp?) */ #define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */ #define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */ #define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */ @@ -83,8 +89,8 @@ */ struct npioctl { - int protocol; /* PPP protocol, e.g. PPP_IP */ - enum NPmode mode; + int protocol; /* PPP protocol, e.g. PPP_IP */ + enum NPmode mode; }; /* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */ @@ -95,13 +101,13 @@ struct ppp_option_data { }; struct ifpppstatsreq { - struct ifreq b; - struct ppp_stats stats; /* statistic information */ + struct ifreq b; + struct ppp_stats stats; /* statistic information */ }; struct ifpppcstatsreq { - struct ifreq b; - struct ppp_comp_stats stats; + struct ifreq b; + struct ppp_comp_stats stats; }; #define ifr__name b.ifr_ifrn.ifrn_name @@ -132,7 +138,7 @@ struct ifpppcstatsreq { #define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */ #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0) -#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ +#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */ #define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2) #if !defined(ifr_mtu) diff --git a/include/linux/if_pppvar.h b/include/linux/if_pppvar.h index c1fe88a..cf70fe6 100644 --- a/include/linux/if_pppvar.h +++ b/include/linux/if_pppvar.h @@ -42,15 +42,15 @@ */ /* - * ==FILEVERSION 971001== + * ==FILEVERSION 980704== * * 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. + * 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. */ /* @@ -59,101 +59,74 @@ */ #define NP_IP 0 /* Internet Protocol */ -#define NUM_NP 1 /* Number of NPs. */ +#define NP_IPX 1 /* IPX protocol */ +#define NP_AT 2 /* Appletalk protocol */ +#define NUM_NP 3 /* Number of NPs. */ -/* - * Buffers for the PPP process have the following structure - */ - -#define RBUFSIZE 2048 /* MUST be a power of 2 and be <= 4095 */ - -struct ppp_buffer { - __s32 size; /* Size of the buffer area */ - __s32 count; /* Count of characters in bufr */ - __s32 head; /* index to head of list */ - __s32 tail; /* index to tail of list */ - unsigned long locked; /* Buffer is being sent */ - __s32 type; /* Type of the buffer */ - /* =0, device read buffer */ - /* =1, device write buffer */ - /* =2, daemon write buffer */ - /* =3, daemon read buffer */ - __u16 fcs; /* Frame Check Sequence (CRC) */ - __u16 magic; /* Extra space if needed */ -}; - -/* Given a pointer to the ppp_buffer then return base address of buffer */ -#define buf_base(buf) ((__u8 *) (&buf[1])) +#define OBUFSIZE 256 /* # chars of output buffering */ /* * Structure describing each ppp unit. */ struct ppp { - __s32 magic; /* magic value for structure */ + int magic; /* magic value for structure */ struct ppp *next; /* unit with next index */ - - /* Bitmapped flag fields. */ unsigned long inuse; /* are we allocated? */ - __u8 escape; /* 0x20 if prev char was PPP_ESC*/ + 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 */ + + /* 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 */ - - __u32 flags; /* miscellany */ - + volatile __u8 tty_pushing; /* internal state flag */ __u32 xmit_async_map[8]; /* 1 bit means that given control character is quoted on output*/ - __u32 recv_async_map; /* 1 bit means that given control character is ignored on input*/ - __s32 mtu; /* maximum xmit frame size */ - __s32 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 */ - __s32 line; /* PPP channel number */ - struct tty_struct *tty; /* ptr to TTY structure */ - struct tty_struct *backup_tty; /* TTY to use if tty gets closed */ - __s32 bytes_sent; /* Bytes sent on frame */ - __s32 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 */ - /* VJ Header compression data */ - struct slcompress *slcomp; /* for header compression */ + /* Async reception information */ + struct sk_buff *rpkt; /* frame currently being rcvd */ + __u16 rfcs; /* FCS so far of rpkt */ - /* 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 */ + /* Queues for select() functionality */ + struct wait_queue *read_wait; /* queue for reading processes */ + /* info for detecting idle channels */ unsigned long last_xmit; /* time of last transmission */ unsigned long last_recv; /* time last packet received */ - /* 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. */ - - 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 stats; /* statistic information */ + struct pppstat stats; /* statistic information */ /* PPP compression protocol information */ - __u32 sc_bytessent; /* count of octets sent */ - __u32 sc_bytesrcvd; /* count of octets received */ + 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 */ + 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 */ - __s32 sc_xfer; /* PID of reserved PPP table */ - char name[8]; + 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 */ }; |