blob: ada8b10fb4b9e9743929ec2282ec59633eef6e38 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#include <linux/types.h>
8#ifndef _UAPI_PPP_DEFS_H_
9#define _UAPI_PPP_DEFS_H_
10#define PPP_HDRLEN 4
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define PPP_FCSLEN 2
12#define PPP_MRU 1500
Tao Baod7db5942015-01-28 10:07:51 -080013#define PPP_ADDRESS(p) (((__u8 *) (p))[0])
14#define PPP_CONTROL(p) (((__u8 *) (p))[1])
Tao Baod7db5942015-01-28 10:07:51 -080015#define PPP_PROTOCOL(p) ((((__u8 *) (p))[2] << 8) + ((__u8 *) (p))[3])
Ben Cheng655a7c02013-10-16 16:09:24 -070016#define PPP_ALLSTATIONS 0xff
17#define PPP_UI 0x03
18#define PPP_FLAG 0x7e
Ben Cheng655a7c02013-10-16 16:09:24 -070019#define PPP_ESCAPE 0x7d
20#define PPP_TRANS 0x20
21#define PPP_IP 0x21
22#define PPP_AT 0x29
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define PPP_IPX 0x2b
24#define PPP_VJC_COMP 0x2d
25#define PPP_VJC_UNCOMP 0x2f
26#define PPP_MP 0x3d
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define PPP_IPV6 0x57
28#define PPP_COMPFRAG 0xfb
29#define PPP_COMP 0xfd
30#define PPP_MPLS_UC 0x0281
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define PPP_MPLS_MC 0x0283
32#define PPP_IPCP 0x8021
33#define PPP_ATCP 0x8029
34#define PPP_IPXCP 0x802b
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define PPP_IPV6CP 0x8057
36#define PPP_CCPFRAG 0x80fb
37#define PPP_CCP 0x80fd
38#define PPP_MPLSCP 0x80fd
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define PPP_LCP 0xc021
40#define PPP_PAP 0xc023
41#define PPP_LQR 0xc025
42#define PPP_CHAP 0xc223
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define PPP_CBCP 0xc029
44#define PPP_INITFCS 0xffff
45#define PPP_GOODFCS 0xf0b8
46typedef __u32 ext_accm[8];
Ben Cheng655a7c02013-10-16 16:09:24 -070047enum NPmode {
Tao Baod7db5942015-01-28 10:07:51 -080048 NPMODE_PASS,
49 NPMODE_DROP,
50 NPMODE_ERROR,
Tao Baod7db5942015-01-28 10:07:51 -080051 NPMODE_QUEUE
Ben Cheng655a7c02013-10-16 16:09:24 -070052};
53struct pppstat {
Tao Baod7db5942015-01-28 10:07:51 -080054 __u32 ppp_discards;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u32 ppp_ibytes;
56 __u32 ppp_ioctects;
57 __u32 ppp_ipackets;
58 __u32 ppp_ierrors;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u32 ppp_ilqrs;
60 __u32 ppp_obytes;
61 __u32 ppp_ooctects;
62 __u32 ppp_opackets;
Tao Baod7db5942015-01-28 10:07:51 -080063 __u32 ppp_oerrors;
64 __u32 ppp_olqrs;
Ben Cheng655a7c02013-10-16 16:09:24 -070065};
66struct vjstat {
Tao Baod7db5942015-01-28 10:07:51 -080067 __u32 vjs_packets;
68 __u32 vjs_compressed;
69 __u32 vjs_searches;
70 __u32 vjs_misses;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u32 vjs_uncompressedin;
72 __u32 vjs_compressedin;
73 __u32 vjs_errorin;
74 __u32 vjs_tossed;
Ben Cheng655a7c02013-10-16 16:09:24 -070075};
76struct compstat {
Tao Baod7db5942015-01-28 10:07:51 -080077 __u32 unc_bytes;
78 __u32 unc_packets;
Tao Baod7db5942015-01-28 10:07:51 -080079 __u32 comp_bytes;
80 __u32 comp_packets;
81 __u32 inc_bytes;
82 __u32 inc_packets;
Tao Baod7db5942015-01-28 10:07:51 -080083 __u32 in_count;
84 __u32 bytes_out;
85 double ratio;
Ben Cheng655a7c02013-10-16 16:09:24 -070086};
Ben Cheng655a7c02013-10-16 16:09:24 -070087struct ppp_stats {
Tao Baod7db5942015-01-28 10:07:51 -080088 struct pppstat p;
89 struct vjstat vj;
Ben Cheng655a7c02013-10-16 16:09:24 -070090};
Ben Cheng655a7c02013-10-16 16:09:24 -070091struct ppp_comp_stats {
Tao Baod7db5942015-01-28 10:07:51 -080092 struct compstat c;
93 struct compstat d;
Ben Cheng655a7c02013-10-16 16:09:24 -070094};
Ben Cheng655a7c02013-10-16 16:09:24 -070095struct ppp_idle {
Christopher Ferrisef80d682020-02-04 16:16:51 -080096 __kernel_old_time_t xmit_idle;
97 __kernel_old_time_t recv_idle;
98};
99struct ppp_idle32 {
100 __s32 xmit_idle;
101 __s32 recv_idle;
102};
103struct ppp_idle64 {
104 __s64 xmit_idle;
105 __s64 recv_idle;
Ben Cheng655a7c02013-10-16 16:09:24 -0700106};
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#endif