xref: /aosp_15_r20/bionic/libc/kernel/uapi/linux/ppp_defs.h (revision 8d67ca893c1523eb926b9080dbe4e2ffd2a27ba1)
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #include <linux/types.h>
8 #ifndef _UAPI_PPP_DEFS_H_
9 #define _UAPI_PPP_DEFS_H_
10 #define PPP_HDRLEN 4
11 #define PPP_FCSLEN 2
12 #define PPP_MRU 1500
13 #define PPP_ADDRESS(p) (((__u8 *) (p))[0])
14 #define PPP_CONTROL(p) (((__u8 *) (p))[1])
15 #define PPP_PROTOCOL(p) ((((__u8 *) (p))[2] << 8) + ((__u8 *) (p))[3])
16 #define PPP_ALLSTATIONS 0xff
17 #define PPP_UI 0x03
18 #define PPP_FLAG 0x7e
19 #define PPP_ESCAPE 0x7d
20 #define PPP_TRANS 0x20
21 #define PPP_IP 0x21
22 #define PPP_AT 0x29
23 #define PPP_IPX 0x2b
24 #define PPP_VJC_COMP 0x2d
25 #define PPP_VJC_UNCOMP 0x2f
26 #define PPP_MP 0x3d
27 #define PPP_IPV6 0x57
28 #define PPP_COMPFRAG 0xfb
29 #define PPP_COMP 0xfd
30 #define PPP_MPLS_UC 0x0281
31 #define PPP_MPLS_MC 0x0283
32 #define PPP_IPCP 0x8021
33 #define PPP_ATCP 0x8029
34 #define PPP_IPXCP 0x802b
35 #define PPP_IPV6CP 0x8057
36 #define PPP_CCPFRAG 0x80fb
37 #define PPP_CCP 0x80fd
38 #define PPP_MPLSCP 0x80fd
39 #define PPP_LCP 0xc021
40 #define PPP_PAP 0xc023
41 #define PPP_LQR 0xc025
42 #define PPP_CHAP 0xc223
43 #define PPP_CBCP 0xc029
44 #define PPP_INITFCS 0xffff
45 #define PPP_GOODFCS 0xf0b8
46 typedef __u32 ext_accm[8];
47 enum NPmode {
48   NPMODE_PASS,
49   NPMODE_DROP,
50   NPMODE_ERROR,
51   NPMODE_QUEUE
52 };
53 struct pppstat {
54   __u32 ppp_discards;
55   __u32 ppp_ibytes;
56   __u32 ppp_ioctects;
57   __u32 ppp_ipackets;
58   __u32 ppp_ierrors;
59   __u32 ppp_ilqrs;
60   __u32 ppp_obytes;
61   __u32 ppp_ooctects;
62   __u32 ppp_opackets;
63   __u32 ppp_oerrors;
64   __u32 ppp_olqrs;
65 };
66 struct vjstat {
67   __u32 vjs_packets;
68   __u32 vjs_compressed;
69   __u32 vjs_searches;
70   __u32 vjs_misses;
71   __u32 vjs_uncompressedin;
72   __u32 vjs_compressedin;
73   __u32 vjs_errorin;
74   __u32 vjs_tossed;
75 };
76 struct compstat {
77   __u32 unc_bytes;
78   __u32 unc_packets;
79   __u32 comp_bytes;
80   __u32 comp_packets;
81   __u32 inc_bytes;
82   __u32 inc_packets;
83   __u32 in_count;
84   __u32 bytes_out;
85   double ratio;
86 };
87 struct ppp_stats {
88   struct pppstat p;
89   struct vjstat vj;
90 };
91 struct ppp_comp_stats {
92   struct compstat c;
93   struct compstat d;
94 };
95 struct ppp_idle {
96   __kernel_old_time_t xmit_idle;
97   __kernel_old_time_t recv_idle;
98 };
99 struct ppp_idle32 {
100   __s32 xmit_idle;
101   __s32 recv_idle;
102 };
103 struct ppp_idle64 {
104   __s64 xmit_idle;
105   __s64 recv_idle;
106 };
107 #endif
108