• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _PPP_DEFS_H_
13 #define _PPP_DEFS_H_
14 
15 #define PPP_HDRLEN 4
16 #define PPP_FCSLEN 2
17 #define PPP_MRU 1500
18 
19 #define PPP_ADDRESS(p) (((__u8 *)(p))[0])
20 #define PPP_CONTROL(p) (((__u8 *)(p))[1])
21 #define PPP_PROTOCOL(p) ((((__u8 *)(p))[2] << 8) + ((__u8 *)(p))[3])
22 
23 #define PPP_ALLSTATIONS 0xff
24 #define PPP_UI 0x03
25 #define PPP_FLAG 0x7e
26 #define PPP_ESCAPE 0x7d
27 #define PPP_TRANS 0x20
28 
29 #define PPP_IP 0x21
30 #define PPP_AT 0x29
31 #define PPP_IPX 0x2b
32 #define PPP_VJC_COMP 0x2d
33 #define PPP_VJC_UNCOMP 0x2f
34 #define PPP_MP 0x3d
35 #define PPP_IPV6 0x57
36 #define PPP_COMPFRAG 0xfb
37 #define PPP_COMP 0xfd
38 #define PPP_MPLS_UC 0x0281
39 #define PPP_MPLS_MC 0x0283
40 #define PPP_IPCP 0x8021
41 #define PPP_ATCP 0x8029
42 #define PPP_IPXCP 0x802b
43 #define PPP_IPV6CP 0x8057
44 #define PPP_CCPFRAG 0x80fb
45 #define PPP_CCP 0x80fd
46 #define PPP_MPLSCP 0x80fd
47 #define PPP_LCP 0xc021
48 #define PPP_PAP 0xc023
49 #define PPP_LQR 0xc025
50 #define PPP_CHAP 0xc223
51 #define PPP_CBCP 0xc029
52 
53 #define PPP_INITFCS 0xffff
54 #define PPP_GOODFCS 0xf0b8
55 
56 typedef __u32 ext_accm[8];
57 
58 enum NPmode {
59  NPMODE_PASS,
60  NPMODE_DROP,
61  NPMODE_ERROR,
62  NPMODE_QUEUE
63 };
64 
65 struct pppstat {
66  __u32 ppp_discards;
67 
68  __u32 ppp_ibytes;
69  __u32 ppp_ioctects;
70  __u32 ppp_ipackets;
71  __u32 ppp_ierrors;
72  __u32 ppp_ilqrs;
73 
74  __u32 ppp_obytes;
75  __u32 ppp_ooctects;
76  __u32 ppp_opackets;
77  __u32 ppp_oerrors;
78  __u32 ppp_olqrs;
79 };
80 
81 struct vjstat {
82  __u32 vjs_packets;
83  __u32 vjs_compressed;
84  __u32 vjs_searches;
85  __u32 vjs_misses;
86  __u32 vjs_uncompressedin;
87  __u32 vjs_compressedin;
88  __u32 vjs_errorin;
89  __u32 vjs_tossed;
90 };
91 
92 struct compstat {
93  __u32 unc_bytes;
94  __u32 unc_packets;
95  __u32 comp_bytes;
96  __u32 comp_packets;
97  __u32 inc_bytes;
98  __u32 inc_packets;
99 
100  __u32 in_count;
101  __u32 bytes_out;
102 
103  double ratio;
104 };
105 
106 struct ppp_stats {
107  struct pppstat p;
108  struct vjstat vj;
109 };
110 
111 struct ppp_comp_stats {
112  struct compstat c;
113  struct compstat d;
114 };
115 
116 struct ppp_idle {
117  time_t xmit_idle;
118  time_t recv_idle;
119 };
120 
121 #endif
122