blob: f71fe19e03f1cc6edff89fd1f08f18e02a231f6f [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>
Christopher Ferris49f525c2016-12-12 14:55:36 -080025#include <linux/if.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070026#include <linux/if_ether.h>
27#include <linux/if_pppol2tp.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris49f525c2016-12-12 14:55:36 -080029#include <linux/in.h>
30#include <linux/in6.h>
31#ifndef AF_PPPOX
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define AF_PPPOX 24
Christopher Ferris49f525c2016-12-12 14:55:36 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070034#define PF_PPPOX AF_PPPOX
35#endif
36typedef __be16 sid_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070037struct pppoe_addr {
Christopher Ferris49f525c2016-12-12 14:55:36 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 sid_t sid;
40 unsigned char remote[ETH_ALEN];
41 char dev[IFNAMSIZ];
Ben Cheng655a7c02013-10-16 16:09:24 -070042};
Christopher Ferris49f525c2016-12-12 14:55:36 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070044struct pptp_addr {
Tao Baod7db5942015-01-28 10:07:51 -080045 __u16 call_id;
46 struct in_addr sin_addr;
Ben Cheng655a7c02013-10-16 16:09:24 -070047};
Christopher Ferris49f525c2016-12-12 14:55:36 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define PX_PROTO_OE 0
50#define PX_PROTO_OL2TP 1
51#define PX_PROTO_PPTP 2
Christopher Ferris38062f92014-07-09 15:33:25 -070052#define PX_MAX_PROTO 3
Christopher Ferris49f525c2016-12-12 14:55:36 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070054struct sockaddr_pppox {
Tao Baod7db5942015-01-28 10:07:51 -080055 __kernel_sa_family_t sa_family;
56 unsigned int sa_protocol;
Tao Baod7db5942015-01-28 10:07:51 -080057 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 struct pppoe_addr pppoe;
60 struct pptp_addr pptp;
61 } sa_addr;
Ben Cheng655a7c02013-10-16 16:09:24 -070062} __packed;
Christopher Ferris49f525c2016-12-12 14:55:36 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070064struct sockaddr_pppol2tp {
Tao Baod7db5942015-01-28 10:07:51 -080065 __kernel_sa_family_t sa_family;
66 unsigned int sa_protocol;
Tao Baod7db5942015-01-28 10:07:51 -080067 struct pppol2tp_addr pppol2tp;
Christopher Ferris49f525c2016-12-12 14:55:36 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070069} __packed;
70struct sockaddr_pppol2tpin6 {
Tao Baod7db5942015-01-28 10:07:51 -080071 __kernel_sa_family_t sa_family;
Tao Baod7db5942015-01-28 10:07:51 -080072 unsigned int sa_protocol;
Christopher Ferris49f525c2016-12-12 14:55:36 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 struct pppol2tpin6_addr pppol2tp;
Ben Cheng655a7c02013-10-16 16:09:24 -070075} __packed;
76struct sockaddr_pppol2tpv3 {
Tao Baod7db5942015-01-28 10:07:51 -080077 __kernel_sa_family_t sa_family;
Christopher Ferris49f525c2016-12-12 14:55:36 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 unsigned int sa_protocol;
80 struct pppol2tpv3_addr pppol2tp;
Ben Cheng655a7c02013-10-16 16:09:24 -070081} __packed;
Ben Cheng655a7c02013-10-16 16:09:24 -070082struct sockaddr_pppol2tpv3in6 {
Christopher Ferris49f525c2016-12-12 14:55:36 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 __kernel_sa_family_t sa_family;
85 unsigned int sa_protocol;
86 struct pppol2tpv3in6_addr pppol2tp;
Ben Cheng655a7c02013-10-16 16:09:24 -070087} __packed;
Christopher Ferris49f525c2016-12-12 14:55:36 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089#define PPPOEIOCSFWD _IOW(0xB1, 0, size_t)
90#define PPPOEIOCDFWD _IO(0xB1, 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070091#define PADI_CODE 0x09
Ben Cheng655a7c02013-10-16 16:09:24 -070092#define PADO_CODE 0x07
Christopher Ferris49f525c2016-12-12 14:55:36 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define PADR_CODE 0x19
95#define PADS_CODE 0x65
96#define PADT_CODE 0xa7
Ben Cheng655a7c02013-10-16 16:09:24 -070097struct pppoe_tag {
Christopher Ferris49f525c2016-12-12 14:55:36 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 __be16 tag_type;
100 __be16 tag_len;
101 char tag_data[0];
Tao Baod7db5942015-01-28 10:07:51 -0800102} __attribute__((packed));
Christopher Ferris49f525c2016-12-12 14:55:36 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700104#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 Cheng655a7c02013-10-16 16:09:24 -0700107#define PTT_HOST_UNIQ __cpu_to_be16(0x0103)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700109#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 Cheng655a7c02013-10-16 16:09:24 -0700112#define PTT_SRV_ERR __cpu_to_be16(0x0201)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define PTT_SYS_ERR __cpu_to_be16(0x0202)
115#define PTT_GEN_ERR __cpu_to_be16(0x0203)
116struct pppoe_hdr {
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#ifdef __LITTLE_ENDIAN_BITFIELD
Christopher Ferris49f525c2016-12-12 14:55:36 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 __u8 type : 4;
120 __u8 ver : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700121#elif defined(__BIG_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -0800122 __u8 ver : 4;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 __u8 type : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700125#else
126#error "Please fix <asm/byteorder.h>"
Ben Cheng655a7c02013-10-16 16:09:24 -0700127#endif
Christopher Ferris49f525c2016-12-12 14:55:36 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 __u8 code;
130 __be16 sid;
131 __be16 length;
Tao Baod7db5942015-01-28 10:07:51 -0800132 struct pppoe_tag tag[0];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700134} __packed;
135#define PPPOE_SES_HLEN 8
136#endif