blob: 7b4dbd288814460851a21f11789aed428d098293 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
25#include <linux/if_ether.h>
26#include <linux/if_pppol2tp.h>
Elliott Hughes8cb52b02013-11-21 13:43:23 -080027#ifndef AF_PPPOX
Christopher Ferris38062f92014-07-09 15:33:25 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define AF_PPPOX 24
30#define PF_PPPOX AF_PPPOX
31#endif
32typedef __be16 sid_t;
Christopher Ferris38062f92014-07-09 15:33:25 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070034struct pppoe_addr {
Tao Baod7db5942015-01-28 10:07:51 -080035 sid_t sid;
36 unsigned char remote[ETH_ALEN];
37 char dev[IFNAMSIZ];
Christopher Ferris38062f92014-07-09 15:33:25 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070039};
40struct pptp_addr {
Tao Baod7db5942015-01-28 10:07:51 -080041 __u16 call_id;
42 struct in_addr sin_addr;
Christopher Ferris38062f92014-07-09 15:33:25 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070044};
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 */
Christopher Ferris38062f92014-07-09 15:33:25 -070049#define PX_MAX_PROTO 3
Ben Cheng655a7c02013-10-16 16:09:24 -070050struct sockaddr_pppox {
Tao Baod7db5942015-01-28 10:07:51 -080051 __kernel_sa_family_t sa_family;
52 unsigned int sa_protocol;
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 union {
55 struct pppoe_addr pppoe;
56 struct pptp_addr pptp;
57 } sa_addr;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59} __packed;
60struct sockaddr_pppol2tp {
Tao Baod7db5942015-01-28 10:07:51 -080061 __kernel_sa_family_t sa_family;
62 unsigned int sa_protocol;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 struct pppol2tp_addr pppol2tp;
Ben Cheng655a7c02013-10-16 16:09:24 -070065} __packed;
66struct sockaddr_pppol2tpin6 {
Tao Baod7db5942015-01-28 10:07:51 -080067 __kernel_sa_family_t sa_family;
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 unsigned int sa_protocol;
70 struct pppol2tpin6_addr pppol2tp;
Ben Cheng655a7c02013-10-16 16:09:24 -070071} __packed;
72struct sockaddr_pppol2tpv3 {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 __kernel_sa_family_t sa_family;
75 unsigned int sa_protocol;
76 struct pppol2tpv3_addr pppol2tp;
Ben Cheng655a7c02013-10-16 16:09:24 -070077} __packed;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79struct sockaddr_pppol2tpv3in6 {
Tao Baod7db5942015-01-28 10:07:51 -080080 __kernel_sa_family_t sa_family;
81 unsigned int sa_protocol;
82 struct pppol2tpv3in6_addr pppol2tp;
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84} __packed;
Tao Baod7db5942015-01-28 10:07:51 -080085#define PPPOEIOCSFWD _IOW(0xB1, 0, size_t)
86#define PPPOEIOCDFWD _IO(0xB1, 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070087#define PADI_CODE 0x09
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define PADO_CODE 0x07
90#define PADR_CODE 0x19
91#define PADS_CODE 0x65
92#define PADT_CODE 0xa7
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94struct pppoe_tag {
Tao Baod7db5942015-01-28 10:07:51 -080095 __be16 tag_type;
96 __be16 tag_len;
97 char tag_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -0700100#define PTT_EOL __cpu_to_be16(0x0000)
101#define PTT_SRV_NAME __cpu_to_be16(0x0101)
102#define PTT_AC_NAME __cpu_to_be16(0x0102)
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define PTT_HOST_UNIQ __cpu_to_be16(0x0103)
105#define PTT_AC_COOKIE __cpu_to_be16(0x0104)
106#define PTT_VENDOR __cpu_to_be16(0x0105)
107#define PTT_RELAY_SID __cpu_to_be16(0x0110)
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define PTT_SRV_ERR __cpu_to_be16(0x0201)
110#define PTT_SYS_ERR __cpu_to_be16(0x0202)
111#define PTT_GEN_ERR __cpu_to_be16(0x0203)
112struct pppoe_hdr {
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#ifdef __LITTLE_ENDIAN_BITFIELD
Tao Baod7db5942015-01-28 10:07:51 -0800115 __u8 type : 4;
116 __u8 ver : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#elif defined(__BIG_ENDIAN_BITFIELD)
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 __u8 ver : 4;
120 __u8 type : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700121#else
122#error "Please fix <asm/byteorder.h>"
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124#endif
Tao Baod7db5942015-01-28 10:07:51 -0800125 __u8 code;
126 __be16 sid;
127 __be16 length;
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 struct pppoe_tag tag[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700130} __packed;
131#define PPPOE_SES_HLEN 8
132#endif
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */