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 __LINUX_IF_PPPOX_H
20#define __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/if_pppol2tp.h>
25#include <linux/if_pppolac.h>
26#include <linux/if_pppopns.h>
27#ifndef AF_PPPOX
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define AF_PPPOX 24
30#define PF_PPPOX AF_PPPOX
31#endif
32typedef __be16 sid_t;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34struct pppoe_addr {
35 sid_t sid;
36 unsigned char remote[ETH_ALEN];
37 char dev[IFNAMSIZ];
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39};
40struct pptp_addr {
41 __be16 call_id;
42 struct in_addr sin_addr;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44};
45#define PX_PROTO_OE 0
46#define PX_PROTO_OL2TP 1
47#define PX_PROTO_PPTP 2
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define PX_PROTO_OLAC 3
50#define PX_PROTO_OPNS 4
51#define PX_MAX_PROTO 5
52struct sockaddr_pppox {
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 sa_family_t sa_family;
55 unsigned int sa_protocol;
56 union {
57 struct pppoe_addr pppoe;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 struct pptp_addr pptp;
60 } sa_addr;
61} __attribute__((packed));
62struct sockaddr_pppol2tp {
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 sa_family_t sa_family;
65 unsigned int sa_protocol;
66 struct pppol2tp_addr pppol2tp;
67} __attribute__((packed));
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69struct sockaddr_pppol2tpv3 {
70 sa_family_t sa_family;
71 unsigned int sa_protocol;
72 struct pppol2tpv3_addr pppol2tp;
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74} __attribute__((packed));
75#define PPPOEIOCSFWD _IOW(0xB1 ,0, size_t)
76#define PPPOEIOCDFWD _IO(0xB1 ,1)
77#define PADI_CODE 0x09
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define PADO_CODE 0x07
80#define PADR_CODE 0x19
81#define PADS_CODE 0x65
82#define PADT_CODE 0xa7
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84struct pppoe_tag {
85 __be16 tag_type;
86 __be16 tag_len;
87 char tag_data[0];
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89} __attribute__ ((packed));
90#define PTT_EOL __cpu_to_be16(0x0000)
91#define PTT_SRV_NAME __cpu_to_be16(0x0101)
92#define PTT_AC_NAME __cpu_to_be16(0x0102)
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define PTT_HOST_UNIQ __cpu_to_be16(0x0103)
95#define PTT_AC_COOKIE __cpu_to_be16(0x0104)
96#define PTT_VENDOR __cpu_to_be16(0x0105)
97#define PTT_RELAY_SID __cpu_to_be16(0x0110)
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#define PTT_SRV_ERR __cpu_to_be16(0x0201)
100#define PTT_SYS_ERR __cpu_to_be16(0x0202)
101#define PTT_GEN_ERR __cpu_to_be16(0x0203)
102struct pppoe_hdr {
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#ifdef __LITTLE_ENDIAN_BITFIELD
105 __u8 ver : 4;
106 __u8 type : 4;
107#elif defined(__BIG_ENDIAN_BITFIELD)
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 __u8 type : 4;
110 __u8 ver : 4;
111#else
112#error "Please fix <asm/byteorder.h>"
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#endif
115 __u8 code;
116 __be16 sid;
117 __be16 length;
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 struct pppoe_tag tag[0];
120} __attribute__((packed));
121#define PPPOE_SES_HLEN 8
122#endif
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124