| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #include <linux/types.h> | 
|  | 20 | #ifndef _UAPI_PPP_DEFS_H_ | 
|  | 21 | #define _UAPI_PPP_DEFS_H_ | 
|  | 22 | #define PPP_HDRLEN 4 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define PPP_FCSLEN 2 | 
|  | 24 | #define PPP_MRU 1500 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 25 | #define PPP_ADDRESS(p) (((__u8 *) (p))[0]) | 
|  | 26 | #define PPP_CONTROL(p) (((__u8 *) (p))[1]) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | #define PPP_PROTOCOL(p) ((((__u8 *) (p))[2] << 8) + ((__u8 *) (p))[3]) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | #define PPP_ALLSTATIONS 0xff | 
|  | 29 | #define PPP_UI 0x03 | 
|  | 30 | #define PPP_FLAG 0x7e | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define PPP_ESCAPE 0x7d | 
|  | 32 | #define PPP_TRANS 0x20 | 
|  | 33 | #define PPP_IP 0x21 | 
|  | 34 | #define PPP_AT 0x29 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define PPP_IPX 0x2b | 
|  | 36 | #define PPP_VJC_COMP 0x2d | 
|  | 37 | #define PPP_VJC_UNCOMP 0x2f | 
|  | 38 | #define PPP_MP 0x3d | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define PPP_IPV6 0x57 | 
|  | 40 | #define PPP_COMPFRAG 0xfb | 
|  | 41 | #define PPP_COMP 0xfd | 
|  | 42 | #define PPP_MPLS_UC 0x0281 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define PPP_MPLS_MC 0x0283 | 
|  | 44 | #define PPP_IPCP 0x8021 | 
|  | 45 | #define PPP_ATCP 0x8029 | 
|  | 46 | #define PPP_IPXCP 0x802b | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define PPP_IPV6CP 0x8057 | 
|  | 48 | #define PPP_CCPFRAG 0x80fb | 
|  | 49 | #define PPP_CCP 0x80fd | 
|  | 50 | #define PPP_MPLSCP 0x80fd | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define PPP_LCP 0xc021 | 
|  | 52 | #define PPP_PAP 0xc023 | 
|  | 53 | #define PPP_LQR 0xc025 | 
|  | 54 | #define PPP_CHAP 0xc223 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #define PPP_CBCP 0xc029 | 
|  | 56 | #define PPP_INITFCS 0xffff | 
|  | 57 | #define PPP_GOODFCS 0xf0b8 | 
|  | 58 | typedef __u32 ext_accm[8]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | enum NPmode { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 | NPMODE_PASS, | 
|  | 61 | NPMODE_DROP, | 
|  | 62 | NPMODE_ERROR, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | NPMODE_QUEUE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | }; | 
|  | 65 | struct pppstat { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 66 | __u32 ppp_discards; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | __u32 ppp_ibytes; | 
|  | 68 | __u32 ppp_ioctects; | 
|  | 69 | __u32 ppp_ipackets; | 
|  | 70 | __u32 ppp_ierrors; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | __u32 ppp_ilqrs; | 
|  | 72 | __u32 ppp_obytes; | 
|  | 73 | __u32 ppp_ooctects; | 
|  | 74 | __u32 ppp_opackets; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | __u32 ppp_oerrors; | 
|  | 76 | __u32 ppp_olqrs; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 77 | }; | 
|  | 78 | struct vjstat { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | __u32 vjs_packets; | 
|  | 80 | __u32 vjs_compressed; | 
|  | 81 | __u32 vjs_searches; | 
|  | 82 | __u32 vjs_misses; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | __u32 vjs_uncompressedin; | 
|  | 84 | __u32 vjs_compressedin; | 
|  | 85 | __u32 vjs_errorin; | 
|  | 86 | __u32 vjs_tossed; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | }; | 
|  | 88 | struct compstat { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 89 | __u32 unc_bytes; | 
|  | 90 | __u32 unc_packets; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | __u32 comp_bytes; | 
|  | 92 | __u32 comp_packets; | 
|  | 93 | __u32 inc_bytes; | 
|  | 94 | __u32 inc_packets; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | __u32 in_count; | 
|  | 96 | __u32 bytes_out; | 
|  | 97 | double ratio; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 99 | struct ppp_stats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 | struct pppstat p; | 
|  | 101 | struct vjstat vj; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 102 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | struct ppp_comp_stats { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 104 | struct compstat c; | 
|  | 105 | struct compstat d; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 106 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | struct ppp_idle { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 108 | __kernel_time_t xmit_idle; | 
|  | 109 | __kernel_time_t recv_idle; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 110 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 111 | #endif |