| 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 | #ifndef _UAPI__LINUX_IF_PPPOX_H | 
|  | 20 | #define _UAPI__LINUX_IF_PPPOX_H | 
|  | 21 | #include <linux/types.h> | 
|  | 22 | #include <asm/byteorder.h> | 
|  | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
|  | 24 | #include <linux/socket.h> | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 25 | #include <linux/if.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 26 | #include <linux/if_ether.h> | 
|  | 27 | #include <linux/if_pppol2tp.h> | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 29 | #include <linux/in.h> | 
|  | 30 | #include <linux/in6.h> | 
|  | 31 | #ifndef AF_PPPOX | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 32 | #define AF_PPPOX 24 | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #define PF_PPPOX AF_PPPOX | 
|  | 35 | #endif | 
|  | 36 | typedef __be16 sid_t; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 37 | struct pppoe_addr { | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | sid_t sid; | 
|  | 40 | unsigned char remote[ETH_ALEN]; | 
|  | 41 | char dev[IFNAMSIZ]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | }; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | struct pptp_addr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | __u16 call_id; | 
|  | 46 | struct in_addr sin_addr; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | }; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 49 | #define PX_PROTO_OE 0 | 
|  | 50 | #define PX_PROTO_OL2TP 1 | 
|  | 51 | #define PX_PROTO_PPTP 2 | 
| Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 52 | #define PX_MAX_PROTO 3 | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | struct sockaddr_pppox { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | __kernel_sa_family_t sa_family; | 
|  | 56 | unsigned int sa_protocol; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 57 | union { | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | struct pppoe_addr pppoe; | 
|  | 60 | struct pptp_addr pptp; | 
|  | 61 | } sa_addr; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | } __packed; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | struct sockaddr_pppol2tp { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 65 | __kernel_sa_family_t sa_family; | 
|  | 66 | unsigned int sa_protocol; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | struct pppol2tp_addr pppol2tp; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 69 | } __packed; | 
|  | 70 | struct sockaddr_pppol2tpin6 { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | __kernel_sa_family_t sa_family; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 72 | unsigned int sa_protocol; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 74 | struct pppol2tpin6_addr pppol2tp; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | } __packed; | 
|  | 76 | struct sockaddr_pppol2tpv3 { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 77 | __kernel_sa_family_t sa_family; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | unsigned int sa_protocol; | 
|  | 80 | struct pppol2tpv3_addr pppol2tp; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | } __packed; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | struct sockaddr_pppol2tpv3in6 { | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 84 | __kernel_sa_family_t sa_family; | 
|  | 85 | unsigned int sa_protocol; | 
|  | 86 | struct pppol2tpv3in6_addr pppol2tp; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | } __packed; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 89 | #define PPPOEIOCSFWD _IOW(0xB1, 0, size_t) | 
|  | 90 | #define PPPOEIOCDFWD _IO(0xB1, 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | #define PADI_CODE 0x09 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 92 | #define PADO_CODE 0x07 | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 94 | #define PADR_CODE 0x19 | 
|  | 95 | #define PADS_CODE 0x65 | 
|  | 96 | #define PADT_CODE 0xa7 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 97 | struct pppoe_tag { | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 | __be16 tag_type; | 
|  | 100 | __be16 tag_len; | 
|  | 101 | char tag_data[0]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 102 | } __attribute__((packed)); | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 104 | #define PTT_EOL __cpu_to_be16(0x0000) | 
|  | 105 | #define PTT_SRV_NAME __cpu_to_be16(0x0101) | 
|  | 106 | #define PTT_AC_NAME __cpu_to_be16(0x0102) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | #define PTT_HOST_UNIQ __cpu_to_be16(0x0103) | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 109 | #define PTT_AC_COOKIE __cpu_to_be16(0x0104) | 
|  | 110 | #define PTT_VENDOR __cpu_to_be16(0x0105) | 
|  | 111 | #define PTT_RELAY_SID __cpu_to_be16(0x0110) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | #define PTT_SRV_ERR __cpu_to_be16(0x0201) | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 114 | #define PTT_SYS_ERR __cpu_to_be16(0x0202) | 
|  | 115 | #define PTT_GEN_ERR __cpu_to_be16(0x0203) | 
|  | 116 | struct pppoe_hdr { | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 117 | #ifdef __LITTLE_ENDIAN_BITFIELD | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 119 | __u8 type : 4; | 
|  | 120 | __u8 ver : 4; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 121 | #elif defined(__BIG_ENDIAN_BITFIELD) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 122 | __u8 ver : 4; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 124 | __u8 type : 4; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 125 | #else | 
|  | 126 | #error "Please fix <asm/byteorder.h>" | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 127 | #endif | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 129 | __u8 code; | 
|  | 130 | __be16 sid; | 
|  | 131 | __be16 length; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 132 | struct pppoe_tag tag[0]; | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 134 | } __packed; | 
|  | 135 | #define PPPOE_SES_HLEN 8 | 
|  | 136 | #endif |