blob: 3ca799feda642c875bb9d3059588c91703f755ad [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 _LINUX_IF_H
20#define _LINUX_IF_H
Christopher Ferris82ef6a12016-05-19 16:36:40 -070021#include <linux/libc-compat.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -070024#include <linux/socket.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070025#include <linux/compiler.h>
Christopher Ferris82ef6a12016-05-19 16:36:40 -070026#if __UAPI_DEF_IF_IFNAMSIZ
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define IFNAMSIZ 16
Christopher Ferris82ef6a12016-05-19 16:36:40 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070030#define IFALIASZ 256
31#include <linux/hdlc/ioctl.h>
Christopher Ferris6a9755d2017-01-13 14:09:31 -080032#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070034enum net_device_flags {
Christopher Ferris82ef6a12016-05-19 16:36:40 -070035#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
36 IFF_UP = 1 << 0, IFF_BROADCAST = 1 << 1, IFF_DEBUG = 1 << 2, IFF_LOOPBACK = 1 << 3, IFF_POINTOPOINT = 1 << 4, IFF_NOTRAILERS = 1 << 5, IFF_RUNNING = 1 << 6, IFF_NOARP = 1 << 7, IFF_PROMISC = 1 << 8, IFF_ALLMULTI = 1 << 9, IFF_MASTER = 1 << 10, IFF_SLAVE = 1 << 11, IFF_MULTICAST = 1 << 12, IFF_PORTSEL = 1 << 13, IFF_AUTOMEDIA = 1 << 14, IFF_DYNAMIC = 1 << 15,
37#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -070039#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
40 IFF_LOWER_UP = 1 << 16, IFF_DORMANT = 1 << 17, IFF_ECHO = 1 << 18,
41#endif
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070042};
Christopher Ferris82ef6a12016-05-19 16:36:40 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#endif
45#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070046#define IFF_UP IFF_UP
47#define IFF_BROADCAST IFF_BROADCAST
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -070049#define IFF_DEBUG IFF_DEBUG
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070050#define IFF_LOOPBACK IFF_LOOPBACK
51#define IFF_POINTOPOINT IFF_POINTOPOINT
52#define IFF_NOTRAILERS IFF_NOTRAILERS
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -070054#define IFF_RUNNING IFF_RUNNING
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070055#define IFF_NOARP IFF_NOARP
56#define IFF_PROMISC IFF_PROMISC
57#define IFF_ALLMULTI IFF_ALLMULTI
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -070059#define IFF_MASTER IFF_MASTER
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070060#define IFF_SLAVE IFF_SLAVE
61#define IFF_MULTICAST IFF_MULTICAST
62#define IFF_PORTSEL IFF_PORTSEL
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -070064#define IFF_AUTOMEDIA IFF_AUTOMEDIA
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070065#define IFF_DYNAMIC IFF_DYNAMIC
Christopher Ferris82ef6a12016-05-19 16:36:40 -070066#endif
67#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070069#define IFF_LOWER_UP IFF_LOWER_UP
70#define IFF_DORMANT IFF_DORMANT
71#define IFF_ECHO IFF_ECHO
Christopher Ferris82ef6a12016-05-19 16:36:40 -070072#endif
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074#define IFF_VOLATILE (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST | IFF_ECHO | IFF_MASTER | IFF_SLAVE | IFF_RUNNING | IFF_LOWER_UP | IFF_DORMANT)
Ben Cheng655a7c02013-10-16 16:09:24 -070075#define IF_GET_IFACE 0x0001
76#define IF_GET_PROTO 0x0002
Christopher Ferris38062f92014-07-09 15:33:25 -070077#define IF_IFACE_V35 0x1000
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define IF_IFACE_V24 0x1001
80#define IF_IFACE_X21 0x1002
81#define IF_IFACE_T1 0x1003
Christopher Ferris38062f92014-07-09 15:33:25 -070082#define IF_IFACE_E1 0x1004
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define IF_IFACE_SYNC_SERIAL 0x1005
85#define IF_IFACE_X21D 0x1006
86#define IF_PROTO_HDLC 0x2000
Christopher Ferris38062f92014-07-09 15:33:25 -070087#define IF_PROTO_PPP 0x2001
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070089#define IF_PROTO_CISCO 0x2002
90#define IF_PROTO_FR 0x2003
91#define IF_PROTO_FR_ADD_PVC 0x2004
Christopher Ferris38062f92014-07-09 15:33:25 -070092#define IF_PROTO_FR_DEL_PVC 0x2005
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define IF_PROTO_X25 0x2006
95#define IF_PROTO_HDLC_ETH 0x2007
96#define IF_PROTO_FR_ADD_ETH_PVC 0x2008
Christopher Ferris38062f92014-07-09 15:33:25 -070097#define IF_PROTO_FR_DEL_ETH_PVC 0x2009
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070099#define IF_PROTO_FR_PVC 0x200A
100#define IF_PROTO_FR_ETH_PVC 0x200B
101#define IF_PROTO_RAW 0x200C
Christopher Ferris38062f92014-07-09 15:33:25 -0700102enum {
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 IF_OPER_UNKNOWN,
105 IF_OPER_NOTPRESENT,
106 IF_OPER_DOWN,
107 IF_OPER_LOWERLAYERDOWN,
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 IF_OPER_TESTING,
110 IF_OPER_DORMANT,
111 IF_OPER_UP,
Christopher Ferris38062f92014-07-09 15:33:25 -0700112};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700114enum {
Tao Baod7db5942015-01-28 10:07:51 -0800115 IF_LINK_MODE_DEFAULT,
116 IF_LINK_MODE_DORMANT,
Christopher Ferris38062f92014-07-09 15:33:25 -0700117};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700119#if __UAPI_DEF_IF_IFMAP
Ben Cheng655a7c02013-10-16 16:09:24 -0700120struct ifmap {
Tao Baod7db5942015-01-28 10:07:51 -0800121 unsigned long mem_start;
122 unsigned long mem_end;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700124 unsigned short base_addr;
Tao Baod7db5942015-01-28 10:07:51 -0800125 unsigned char irq;
126 unsigned char dma;
127 unsigned char port;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700129};
130#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700131struct if_settings {
Tao Baod7db5942015-01-28 10:07:51 -0800132 unsigned int type;
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 unsigned int size;
135 union {
Tao Baod7db5942015-01-28 10:07:51 -0800136 raw_hdlc_proto __user * raw_hdlc;
137 cisco_proto __user * cisco;
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139 fr_proto __user * fr;
140 fr_proto_pvc __user * fr_pvc;
Tao Baod7db5942015-01-28 10:07:51 -0800141 fr_proto_pvc_info __user * fr_pvc_info;
142 sync_serial_settings __user * sync;
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 te1_settings __user * te1;
145 } ifs_ifsu;
Ben Cheng655a7c02013-10-16 16:09:24 -0700146};
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700147#if __UAPI_DEF_IF_IFREQ
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700149struct ifreq {
150#define IFHWADDRLEN 6
Tao Baod7db5942015-01-28 10:07:51 -0800151 union {
Tao Baod7db5942015-01-28 10:07:51 -0800152 char ifrn_name[IFNAMSIZ];
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 } ifr_ifrn;
155 union {
156 struct sockaddr ifru_addr;
Tao Baod7db5942015-01-28 10:07:51 -0800157 struct sockaddr ifru_dstaddr;
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 struct sockaddr ifru_broadaddr;
160 struct sockaddr ifru_netmask;
161 struct sockaddr ifru_hwaddr;
Tao Baod7db5942015-01-28 10:07:51 -0800162 short ifru_flags;
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 int ifru_ivalue;
165 int ifru_mtu;
166 struct ifmap ifru_map;
Tao Baod7db5942015-01-28 10:07:51 -0800167 char ifru_slave[IFNAMSIZ];
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800169 char ifru_newname[IFNAMSIZ];
170 void __user * ifru_data;
171 struct if_settings ifru_settings;
Tao Baod7db5942015-01-28 10:07:51 -0800172 } ifr_ifru;
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700174};
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700175#endif
Christopher Ferris38062f92014-07-09 15:33:25 -0700176#define ifr_name ifr_ifrn.ifrn_name
Ben Cheng655a7c02013-10-16 16:09:24 -0700177#define ifr_hwaddr ifr_ifru.ifru_hwaddr
Tao Baod7db5942015-01-28 10:07:51 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700179#define ifr_addr ifr_ifru.ifru_addr
180#define ifr_dstaddr ifr_ifru.ifru_dstaddr
Christopher Ferris38062f92014-07-09 15:33:25 -0700181#define ifr_broadaddr ifr_ifru.ifru_broadaddr
Ben Cheng655a7c02013-10-16 16:09:24 -0700182#define ifr_netmask ifr_ifru.ifru_netmask
Tao Baod7db5942015-01-28 10:07:51 -0800183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700184#define ifr_flags ifr_ifru.ifru_flags
185#define ifr_metric ifr_ifru.ifru_ivalue
Christopher Ferris38062f92014-07-09 15:33:25 -0700186#define ifr_mtu ifr_ifru.ifru_mtu
Ben Cheng655a7c02013-10-16 16:09:24 -0700187#define ifr_map ifr_ifru.ifru_map
Tao Baod7db5942015-01-28 10:07:51 -0800188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700189#define ifr_slave ifr_ifru.ifru_slave
190#define ifr_data ifr_ifru.ifru_data
Christopher Ferris38062f92014-07-09 15:33:25 -0700191#define ifr_ifindex ifr_ifru.ifru_ivalue
Ben Cheng655a7c02013-10-16 16:09:24 -0700192#define ifr_bandwidth ifr_ifru.ifru_ivalue
Tao Baod7db5942015-01-28 10:07:51 -0800193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700194#define ifr_qlen ifr_ifru.ifru_ivalue
195#define ifr_newname ifr_ifru.ifru_newname
Christopher Ferris38062f92014-07-09 15:33:25 -0700196#define ifr_settings ifr_ifru.ifru_settings
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700197#if __UAPI_DEF_IF_IFCONF
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700199struct ifconf {
Tao Baod7db5942015-01-28 10:07:51 -0800200 int ifc_len;
201 union {
202 char __user * ifcu_buf;
Tao Baod7db5942015-01-28 10:07:51 -0800203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700204 struct ifreq __user * ifcu_req;
Tao Baod7db5942015-01-28 10:07:51 -0800205 } ifc_ifcu;
Ben Cheng655a7c02013-10-16 16:09:24 -0700206};
Christopher Ferris82ef6a12016-05-19 16:36:40 -0700207#endif
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700209#define ifc_buf ifc_ifcu.ifcu_buf
Ben Cheng655a7c02013-10-16 16:09:24 -0700210#define ifc_req ifc_ifcu.ifcu_req
Ben Cheng655a7c02013-10-16 16:09:24 -0700211#endif