blob: fd247fdc1eeeee2903b0db31a2d03b87c9396409 [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_L2TP_H_
20#define _UAPI_LINUX_L2TP_H_
21#include <linux/types.h>
22#include <linux/socket.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080024#include <linux/in.h>
25#include <linux/in6.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070026#define IPPROTO_L2TP 115
27#define __SOCK_SIZE__ 16
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080029struct sockaddr_l2tpip {
Tao Baod7db5942015-01-28 10:07:51 -080030 __kernel_sa_family_t l2tp_family;
31 __be16 l2tp_unused;
32 struct in_addr l2tp_addr;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080034 __u32 l2tp_conn_id;
35 unsigned char __pad[__SOCK_SIZE__ - sizeof(__kernel_sa_family_t) - sizeof(__be16) - sizeof(struct in_addr) - sizeof(__u32)];
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
37struct sockaddr_l2tpip6 {
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080039 __kernel_sa_family_t l2tp_family;
Tao Baod7db5942015-01-28 10:07:51 -080040 __be16 l2tp_unused;
41 __be32 l2tp_flowinfo;
42 struct in6_addr l2tp_addr;
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080044 __u32 l2tp_scope_id;
Tao Baod7db5942015-01-28 10:07:51 -080045 __u32 l2tp_conn_id;
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
47enum {
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080049 L2TP_CMD_NOOP,
Tao Baod7db5942015-01-28 10:07:51 -080050 L2TP_CMD_TUNNEL_CREATE,
51 L2TP_CMD_TUNNEL_DELETE,
52 L2TP_CMD_TUNNEL_MODIFY,
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080054 L2TP_CMD_TUNNEL_GET,
Tao Baod7db5942015-01-28 10:07:51 -080055 L2TP_CMD_SESSION_CREATE,
56 L2TP_CMD_SESSION_DELETE,
57 L2TP_CMD_SESSION_MODIFY,
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080059 L2TP_CMD_SESSION_GET,
Tao Baod7db5942015-01-28 10:07:51 -080060 __L2TP_CMD_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -070061};
62#define L2TP_CMD_MAX (__L2TP_CMD_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080064enum {
Tao Baod7db5942015-01-28 10:07:51 -080065 L2TP_ATTR_NONE,
66 L2TP_ATTR_PW_TYPE,
67 L2TP_ATTR_ENCAP_TYPE,
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080069 L2TP_ATTR_OFFSET,
Tao Baod7db5942015-01-28 10:07:51 -080070 L2TP_ATTR_DATA_SEQ,
71 L2TP_ATTR_L2SPEC_TYPE,
72 L2TP_ATTR_L2SPEC_LEN,
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080074 L2TP_ATTR_PROTO_VERSION,
Tao Baod7db5942015-01-28 10:07:51 -080075 L2TP_ATTR_IFNAME,
76 L2TP_ATTR_CONN_ID,
77 L2TP_ATTR_PEER_CONN_ID,
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080079 L2TP_ATTR_SESSION_ID,
Tao Baod7db5942015-01-28 10:07:51 -080080 L2TP_ATTR_PEER_SESSION_ID,
81 L2TP_ATTR_UDP_CSUM,
82 L2TP_ATTR_VLAN_ID,
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080084 L2TP_ATTR_COOKIE,
Tao Baod7db5942015-01-28 10:07:51 -080085 L2TP_ATTR_PEER_COOKIE,
86 L2TP_ATTR_DEBUG,
87 L2TP_ATTR_RECV_SEQ,
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080089 L2TP_ATTR_SEND_SEQ,
Tao Baod7db5942015-01-28 10:07:51 -080090 L2TP_ATTR_LNS_MODE,
91 L2TP_ATTR_USING_IPSEC,
92 L2TP_ATTR_RECV_TIMEOUT,
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080094 L2TP_ATTR_FD,
Tao Baod7db5942015-01-28 10:07:51 -080095 L2TP_ATTR_IP_SADDR,
96 L2TP_ATTR_IP_DADDR,
97 L2TP_ATTR_UDP_SPORT,
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080099 L2TP_ATTR_UDP_DPORT,
Tao Baod7db5942015-01-28 10:07:51 -0800100 L2TP_ATTR_MTU,
101 L2TP_ATTR_MRU,
102 L2TP_ATTR_STATS,
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800104 L2TP_ATTR_IP6_SADDR,
Tao Baod7db5942015-01-28 10:07:51 -0800105 L2TP_ATTR_IP6_DADDR,
106 L2TP_ATTR_UDP_ZERO_CSUM6_TX,
107 L2TP_ATTR_UDP_ZERO_CSUM6_RX,
Tao Baod7db5942015-01-28 10:07:51 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800109 L2TP_ATTR_PAD,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700110 __L2TP_ATTR_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700111};
112#define L2TP_ATTR_MAX (__L2TP_ATTR_MAX - 1)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800114enum {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700115 L2TP_ATTR_STATS_NONE,
Tao Baod7db5942015-01-28 10:07:51 -0800116 L2TP_ATTR_TX_PACKETS,
117 L2TP_ATTR_TX_BYTES,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800119 L2TP_ATTR_TX_ERRORS,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700120 L2TP_ATTR_RX_PACKETS,
Tao Baod7db5942015-01-28 10:07:51 -0800121 L2TP_ATTR_RX_BYTES,
122 L2TP_ATTR_RX_SEQ_DISCARDS,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800124 L2TP_ATTR_RX_OOS_PACKETS,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700125 L2TP_ATTR_RX_ERRORS,
126 L2TP_ATTR_STATS_PAD,
Tao Baod7db5942015-01-28 10:07:51 -0800127 __L2TP_ATTR_STATS_MAX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800129};
Ben Cheng655a7c02013-10-16 16:09:24 -0700130#define L2TP_ATTR_STATS_MAX (__L2TP_ATTR_STATS_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700131enum l2tp_pwtype {
Tao Baod7db5942015-01-28 10:07:51 -0800132 L2TP_PWTYPE_NONE = 0x0000,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800134 L2TP_PWTYPE_ETH_VLAN = 0x0004,
Tao Baod7db5942015-01-28 10:07:51 -0800135 L2TP_PWTYPE_ETH = 0x0005,
136 L2TP_PWTYPE_PPP = 0x0007,
Tao Baod7db5942015-01-28 10:07:51 -0800137 L2TP_PWTYPE_PPP_AC = 0x0008,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800139 L2TP_PWTYPE_IP = 0x000b,
Tao Baod7db5942015-01-28 10:07:51 -0800140 __L2TP_PWTYPE_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700141};
142enum l2tp_l2spec_type {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800144 L2TP_L2SPECTYPE_NONE,
Tao Baod7db5942015-01-28 10:07:51 -0800145 L2TP_L2SPECTYPE_DEFAULT,
Ben Cheng655a7c02013-10-16 16:09:24 -0700146};
147enum l2tp_encap_type {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800149 L2TP_ENCAPTYPE_UDP,
Tao Baod7db5942015-01-28 10:07:51 -0800150 L2TP_ENCAPTYPE_IP,
Ben Cheng655a7c02013-10-16 16:09:24 -0700151};
152enum l2tp_seqmode {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800154 L2TP_SEQ_NONE = 0,
Tao Baod7db5942015-01-28 10:07:51 -0800155 L2TP_SEQ_IP = 1,
156 L2TP_SEQ_ALL = 2,
Ben Cheng655a7c02013-10-16 16:09:24 -0700157};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800159enum l2tp_debug_flags {
160 L2TP_MSG_DEBUG = (1 << 0),
161 L2TP_MSG_CONTROL = (1 << 1),
162 L2TP_MSG_SEQ = (1 << 2),
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 L2TP_MSG_DATA = (1 << 3),
165};
166#define L2TP_GENL_NAME "l2tp"
Ben Cheng655a7c02013-10-16 16:09:24 -0700167#define L2TP_GENL_VERSION 0x1
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800169#define L2TP_GENL_MCGROUP "l2tp"
Christopher Ferris05d08e92016-02-04 13:16:38 -0800170#endif