1655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/****************************************************************************
2655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************
3655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
4655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   This header was automatically generated from a Linux kernel header
5655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   of the same name, to make information necessary for userspace to
6655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   call into the kernel available to libc.  It contains only constants,
7655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   structures, and macros generated from the original header, and thus,
8655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   contains no copyrightable information.
9655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
10655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   To edit the content of this header, modify the corresponding
11655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   source file (e.g. under external/kernel-headers/original/) then
12655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   run bionic/libc/kernel/tools/update_all.py
13655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
14655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   Any manual change here will be lost the next time this script will
15655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   be run. You've been warned!
16655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
17655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************
18655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************/
19655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#ifndef _UAPI__LINUX_IF_PPPOX_H
20655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _UAPI__LINUX_IF_PPPOX_H
21655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <linux/types.h>
22655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <asm/byteorder.h>
23655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <linux/socket.h>
25655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <linux/if_ether.h>
26655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <linux/if_pppol2tp.h>
278cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#ifndef AF_PPPOX
2838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AF_PPPOX 24
30655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PF_PPPOX AF_PPPOX
31655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#endif
32655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef __be16 sid_t;
3338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct pppoe_addr {
35d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  sid_t sid;
36d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned char remote[ETH_ALEN];
37d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char dev[IFNAMSIZ];
3838062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
40655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct pptp_addr {
41d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u16 call_id;
42d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct in_addr sin_addr;
4338062f954c637861348dd8078cefb73554e6f12cChristopher Ferris/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
45655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PX_PROTO_OE 0
46655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PX_PROTO_OL2TP 1
47655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PX_PROTO_PPTP 2
48655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
4938062f954c637861348dd8078cefb73554e6f12cChristopher Ferris#define PX_MAX_PROTO 3
50655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct sockaddr_pppox {
51d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __kernel_sa_family_t sa_family;
52d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int sa_protocol;
53655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  union {
55d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct pppoe_addr pppoe;
56d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct pptp_addr pptp;
57d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  } sa_addr;
58655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng} __packed;
60655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct sockaddr_pppol2tp {
61d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __kernel_sa_family_t sa_family;
62d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int sa_protocol;
63655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct pppol2tp_addr pppol2tp;
65655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng} __packed;
66655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct sockaddr_pppol2tpin6 {
67d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __kernel_sa_family_t sa_family;
68655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int sa_protocol;
70d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct pppol2tpin6_addr pppol2tp;
71655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng} __packed;
72655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct sockaddr_pppol2tpv3 {
73655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __kernel_sa_family_t sa_family;
75d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int sa_protocol;
76d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct pppol2tpv3_addr pppol2tp;
77655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng} __packed;
78655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct sockaddr_pppol2tpv3in6 {
80d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __kernel_sa_family_t sa_family;
81d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned int sa_protocol;
82d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct pppol2tpv3in6_addr pppol2tp;
83655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng} __packed;
85d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define PPPOEIOCSFWD _IOW(0xB1, 0, size_t)
86d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define PPPOEIOCDFWD _IO(0xB1, 1)
87655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PADI_CODE 0x09
88655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PADO_CODE 0x07
90655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PADR_CODE 0x19
91655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PADS_CODE 0x65
92655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PADT_CODE 0xa7
93655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct pppoe_tag {
95d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __be16 tag_type;
96d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __be16 tag_len;
97d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char tag_data[0];
98655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao} __attribute__((packed));
100655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_EOL __cpu_to_be16(0x0000)
101655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_SRV_NAME __cpu_to_be16(0x0101)
102655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_AC_NAME __cpu_to_be16(0x0102)
103655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_HOST_UNIQ __cpu_to_be16(0x0103)
105655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_AC_COOKIE __cpu_to_be16(0x0104)
106655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_VENDOR __cpu_to_be16(0x0105)
107655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_RELAY_SID __cpu_to_be16(0x0110)
108655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_SRV_ERR __cpu_to_be16(0x0201)
110655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_SYS_ERR __cpu_to_be16(0x0202)
111655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PTT_GEN_ERR __cpu_to_be16(0x0203)
112655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct pppoe_hdr {
113655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#ifdef __LITTLE_ENDIAN_BITFIELD
115d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 type : 4;
116d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 ver : 4;
117655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#elif defined(__BIG_ENDIAN_BITFIELD)
118655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 ver : 4;
120d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 type : 4;
121655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#else
122655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#error "Please fix <asm/byteorder.h>"
123655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#endif
125d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 code;
126d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __be16 sid;
127d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __be16 length;
128655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct pppoe_tag tag[0];
130655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng} __packed;
131655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define PPPOE_SES_HLEN 8
132655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#endif
133655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134