Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 _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 Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 24 | #include <linux/in.h> |
| 25 | #include <linux/in6.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 26 | #define IPPROTO_L2TP 115 |
| 27 | #define __SOCK_SIZE__ 16 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 29 | struct sockaddr_l2tpip { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 30 | __kernel_sa_family_t l2tp_family; |
| 31 | __be16 l2tp_unused; |
| 32 | struct in_addr l2tp_addr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 34 | __u32 l2tp_conn_id; |
| 35 | unsigned char __pad[__SOCK_SIZE__ - sizeof(__kernel_sa_family_t) - sizeof(__be16) - sizeof(struct in_addr) - sizeof(__u32)]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 36 | }; |
| 37 | struct sockaddr_l2tpip6 { |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 39 | __kernel_sa_family_t l2tp_family; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 | __be16 l2tp_unused; |
| 41 | __be32 l2tp_flowinfo; |
| 42 | struct in6_addr l2tp_addr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 44 | __u32 l2tp_scope_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | __u32 l2tp_conn_id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | }; |
| 47 | enum { |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 49 | L2TP_CMD_NOOP, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 50 | L2TP_CMD_TUNNEL_CREATE, |
| 51 | L2TP_CMD_TUNNEL_DELETE, |
| 52 | L2TP_CMD_TUNNEL_MODIFY, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 54 | L2TP_CMD_TUNNEL_GET, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | L2TP_CMD_SESSION_CREATE, |
| 56 | L2TP_CMD_SESSION_DELETE, |
| 57 | L2TP_CMD_SESSION_MODIFY, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 59 | L2TP_CMD_SESSION_GET, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 | __L2TP_CMD_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | }; |
| 62 | #define L2TP_CMD_MAX (__L2TP_CMD_MAX - 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 64 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 65 | L2TP_ATTR_NONE, |
| 66 | L2TP_ATTR_PW_TYPE, |
| 67 | L2TP_ATTR_ENCAP_TYPE, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 69 | L2TP_ATTR_OFFSET, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 70 | L2TP_ATTR_DATA_SEQ, |
| 71 | L2TP_ATTR_L2SPEC_TYPE, |
| 72 | L2TP_ATTR_L2SPEC_LEN, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 74 | L2TP_ATTR_PROTO_VERSION, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | L2TP_ATTR_IFNAME, |
| 76 | L2TP_ATTR_CONN_ID, |
| 77 | L2TP_ATTR_PEER_CONN_ID, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 79 | L2TP_ATTR_SESSION_ID, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 80 | L2TP_ATTR_PEER_SESSION_ID, |
| 81 | L2TP_ATTR_UDP_CSUM, |
| 82 | L2TP_ATTR_VLAN_ID, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 84 | L2TP_ATTR_COOKIE, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 85 | L2TP_ATTR_PEER_COOKIE, |
| 86 | L2TP_ATTR_DEBUG, |
| 87 | L2TP_ATTR_RECV_SEQ, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 89 | L2TP_ATTR_SEND_SEQ, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 90 | L2TP_ATTR_LNS_MODE, |
| 91 | L2TP_ATTR_USING_IPSEC, |
| 92 | L2TP_ATTR_RECV_TIMEOUT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 94 | L2TP_ATTR_FD, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | L2TP_ATTR_IP_SADDR, |
| 96 | L2TP_ATTR_IP_DADDR, |
| 97 | L2TP_ATTR_UDP_SPORT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 99 | L2TP_ATTR_UDP_DPORT, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 | L2TP_ATTR_MTU, |
| 101 | L2TP_ATTR_MRU, |
| 102 | L2TP_ATTR_STATS, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 104 | L2TP_ATTR_IP6_SADDR, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 105 | L2TP_ATTR_IP6_DADDR, |
| 106 | L2TP_ATTR_UDP_ZERO_CSUM6_TX, |
| 107 | L2TP_ATTR_UDP_ZERO_CSUM6_RX, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 109 | L2TP_ATTR_PAD, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 110 | __L2TP_ATTR_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 111 | }; |
| 112 | #define L2TP_ATTR_MAX (__L2TP_ATTR_MAX - 1) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 114 | enum { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 115 | L2TP_ATTR_STATS_NONE, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 116 | L2TP_ATTR_TX_PACKETS, |
| 117 | L2TP_ATTR_TX_BYTES, |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 119 | L2TP_ATTR_TX_ERRORS, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 120 | L2TP_ATTR_RX_PACKETS, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 121 | L2TP_ATTR_RX_BYTES, |
| 122 | L2TP_ATTR_RX_SEQ_DISCARDS, |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 124 | L2TP_ATTR_RX_OOS_PACKETS, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 125 | L2TP_ATTR_RX_ERRORS, |
| 126 | L2TP_ATTR_STATS_PAD, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 127 | __L2TP_ATTR_STATS_MAX, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 129 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 130 | #define L2TP_ATTR_STATS_MAX (__L2TP_ATTR_STATS_MAX - 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | enum l2tp_pwtype { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 132 | L2TP_PWTYPE_NONE = 0x0000, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 134 | L2TP_PWTYPE_ETH_VLAN = 0x0004, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 135 | L2TP_PWTYPE_ETH = 0x0005, |
| 136 | L2TP_PWTYPE_PPP = 0x0007, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 137 | L2TP_PWTYPE_PPP_AC = 0x0008, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 139 | L2TP_PWTYPE_IP = 0x000b, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 140 | __L2TP_PWTYPE_MAX |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 141 | }; |
| 142 | enum l2tp_l2spec_type { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 144 | L2TP_L2SPECTYPE_NONE, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 145 | L2TP_L2SPECTYPE_DEFAULT, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 146 | }; |
| 147 | enum l2tp_encap_type { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 149 | L2TP_ENCAPTYPE_UDP, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 150 | L2TP_ENCAPTYPE_IP, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 151 | }; |
| 152 | enum l2tp_seqmode { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 154 | L2TP_SEQ_NONE = 0, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 155 | L2TP_SEQ_IP = 1, |
| 156 | L2TP_SEQ_ALL = 2, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 157 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 159 | enum 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 Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 167 | #define L2TP_GENL_VERSION 0x1 |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame^] | 168 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 169 | #define L2TP_GENL_MCGROUP "l2tp" |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 170 | #endif |