]> git.ozlabs.org Git - ppp.git/blob - include/net/ppp_str.h
Initial revision
[ppp.git] / include / net / ppp_str.h
1 /*
2   ppp_str.h - streams version include file
3
4   defines ioctl calls for MRU, COMPPROT and ASYNCMAP
5
6   Copyright (C) 1990 Brad K. Clements, All Rights Reserved,
7   See copyright statement in NOTES
8 */
9
10 #include        <sys/ioccom.h>
11
12 #ifdef  __STDC__
13 #define SIOCSIFCOMPAC   _IOW('p', 130, char)
14 #define SIOCSIFCOMPPROT _IOW('p', 131, char)
15 #define SIOCSIFMRU      _IOW('p', 132, int)
16 #define SIOCGIFMRU      _IOR('p', 133, int)
17 #define SIOCGIFASYNCMAP _IOR('p', 134, long)
18 #define SIOCSIFASYNCMAP _IOW('p', 135, long)
19 #define SIOCGETU        _IOR('p', 136, int)     /* get unit number */
20 #define SIOCSIFVJCOMP   _IOW('p', 137, char)    /* enable/disable VJ Compression */
21 #define SIOCGIFDEBUG    _IOR('p', 138, int)     /* get debug flags */
22 #define SIOCSIFDEBUG    _IOW('p', 139, int)     /* set debug flags */
23
24 #else
25 /* traditional C compiler */
26 #define SIOCSIFCOMPAC   _IOW(p, 130, char)
27 #define SIOCSIFCOMPPROT _IOW(p, 131, char)
28 #define SIOCSIFMRU      _IOW(p, 132, int)
29 #define SIOCGIFMRU      _IOR(p, 133, int)
30 #define SIOCGIFASYNCMAP _IOR(p, 134, long)
31 #define SIOCSIFASYNCMAP _IOW(p, 135, long)
32 #define SIOCGETU        _IOR(p, 136, int)       /* get unit number */
33 #define SIOCSIFVJCOMP   _IOW(p, 137, char)      /* enable/disable VJ Compression */
34 #define SIOCGIFDEBUG    _IOR(p, 138, int)       /* get debug flags */
35 #define SIOCSIFDEBUG    _IOW(p, 139, int)       /* set debug flags */
36 #endif
37
38 struct  ppp_if_info {
39         int     pii_flags;
40 #define PII_FLAGS_INUSE         0x1             /* in use by  a stream  */
41 #define PII_FLAGS_COMPAC        0x2
42 #define PII_FLAGS_COMPPROT      0x4
43 #define PII_FLAGS_ATTACHED      0x8             /* already if_attached  */
44 #define PII_FLAGS_VJC_ON        0x10            /* VJ TCP header compression enabled */
45         struct  ifnet   pii_ifnet;
46         queue_t         *pii_writeq;            /* used by ppp_output   */
47 #ifdef  VJC
48         struct  slcompress      pii_sc_comp;    /* vjc control buffer */
49 #endif
50 #ifdef  PPP_STATS
51         struct  pppstat {
52                 u_int   ppp_ibytes;
53                 u_int   ppp_ipackets;
54                 u_int   ppp_ierrors;
55                 u_int   ppp_obytes;
56                 u_int   ppp_opackets;
57                 u_int   ppp_oerrors;
58         } pii_stats;
59 #endif
60 };
61
62 #ifdef        STREAMS
63 /* defines for streams modules */
64 #define       IF_INPUT_ERROR  0xe1
65 #define       IF_OUTPUT_ERROR 0xe2
66
67 #define       ALLOCBSIZE      64              /* how big of a buffer block to
68 allocate for each chunk of the input chain */
69 #endif