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 _LINUX_IF_H 20#define _LINUX_IF_H 21#include <linux/types.h> 22#include <linux/socket.h> 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#include <linux/compiler.h> 25#define IFNAMSIZ 16 26#define IFALIASZ 256 27#include <linux/hdlc/ioctl.h> 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29#define IFF_UP 0x1 30#define IFF_BROADCAST 0x2 31#define IFF_DEBUG 0x4 32#define IFF_LOOPBACK 0x8 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34#define IFF_POINTOPOINT 0x10 35#define IFF_NOTRAILERS 0x20 36#define IFF_RUNNING 0x40 37#define IFF_NOARP 0x80 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39#define IFF_PROMISC 0x100 40#define IFF_ALLMULTI 0x200 41#define IFF_MASTER 0x400 42#define IFF_SLAVE 0x800 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44#define IFF_MULTICAST 0x1000 45#define IFF_PORTSEL 0x2000 46#define IFF_AUTOMEDIA 0x4000 47#define IFF_DYNAMIC 0x8000 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49#define IFF_LOWER_UP 0x10000 50#define IFF_DORMANT 0x20000 51#define IFF_ECHO 0x40000 52#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54#define IFF_802_1Q_VLAN 0x1 55#define IFF_EBRIDGE 0x2 56#define IFF_SLAVE_INACTIVE 0x4 57#define IFF_MASTER_8023AD 0x8 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59#define IFF_MASTER_ALB 0x10 60#define IFF_BONDING 0x20 61#define IFF_SLAVE_NEEDARP 0x40 62#define IFF_ISATAP 0x80 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64#define IFF_MASTER_ARPMON 0x100 65#define IFF_WAN_HDLC 0x200 66#define IFF_XMIT_DST_RELEASE 0x400 67#define IFF_DONT_BRIDGE 0x800 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69#define IFF_IN_NETPOLL 0x1000 70#define IFF_DISABLE_NETPOLL 0x2000 71#define IF_GET_IFACE 0x0001 72#define IF_GET_PROTO 0x0002 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74#define IF_IFACE_V35 0x1000 75#define IF_IFACE_V24 0x1001 76#define IF_IFACE_X21 0x1002 77#define IF_IFACE_T1 0x1003 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79#define IF_IFACE_E1 0x1004 80#define IF_IFACE_SYNC_SERIAL 0x1005 81#define IF_IFACE_X21D 0x1006 82#define IF_PROTO_HDLC 0x2000 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84#define IF_PROTO_PPP 0x2001 85#define IF_PROTO_CISCO 0x2002 86#define IF_PROTO_FR 0x2003 87#define IF_PROTO_FR_ADD_PVC 0x2004 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89#define IF_PROTO_FR_DEL_PVC 0x2005 90#define IF_PROTO_X25 0x2006 91#define IF_PROTO_HDLC_ETH 0x2007 92#define IF_PROTO_FR_ADD_ETH_PVC 0x2008 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94#define IF_PROTO_FR_DEL_ETH_PVC 0x2009 95#define IF_PROTO_FR_PVC 0x200A 96#define IF_PROTO_FR_ETH_PVC 0x200B 97#define IF_PROTO_RAW 0x200C 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99enum { 100 IF_OPER_UNKNOWN, 101 IF_OPER_NOTPRESENT, 102 IF_OPER_DOWN, 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 IF_OPER_LOWERLAYERDOWN, 105 IF_OPER_TESTING, 106 IF_OPER_DORMANT, 107 IF_OPER_UP, 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109}; 110enum { 111 IF_LINK_MODE_DEFAULT, 112 IF_LINK_MODE_DORMANT, 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114}; 115struct ifmap { 116 unsigned long mem_start; 117 unsigned long mem_end; 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 unsigned short base_addr; 120 unsigned char irq; 121 unsigned char dma; 122 unsigned char port; 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124}; 125struct if_settings { 126 unsigned int type; 127 unsigned int size; 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 union { 130 raw_hdlc_proto __user *raw_hdlc; 131 cisco_proto __user *cisco; 132 fr_proto __user *fr; 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 fr_proto_pvc __user *fr_pvc; 135 fr_proto_pvc_info __user *fr_pvc_info; 136 sync_serial_settings __user *sync; 137 te1_settings __user *te1; 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 } ifs_ifsu; 140}; 141struct ifreq { 142#define IFHWADDRLEN 6 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 union 145 { 146 char ifrn_name[IFNAMSIZ]; 147 } ifr_ifrn; 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 union { 150 struct sockaddr ifru_addr; 151 struct sockaddr ifru_dstaddr; 152 struct sockaddr ifru_broadaddr; 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 struct sockaddr ifru_netmask; 155 struct sockaddr ifru_hwaddr; 156 short ifru_flags; 157 int ifru_ivalue; 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 int ifru_mtu; 160 struct ifmap ifru_map; 161 char ifru_slave[IFNAMSIZ]; 162 char ifru_newname[IFNAMSIZ]; 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 void __user * ifru_data; 165 struct if_settings ifru_settings; 166 } ifr_ifru; 167}; 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169#define ifr_name ifr_ifrn.ifrn_name 170#define ifr_hwaddr ifr_ifru.ifru_hwaddr 171#define ifr_addr ifr_ifru.ifru_addr 172#define ifr_dstaddr ifr_ifru.ifru_dstaddr 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174#define ifr_broadaddr ifr_ifru.ifru_broadaddr 175#define ifr_netmask ifr_ifru.ifru_netmask 176#define ifr_flags ifr_ifru.ifru_flags 177#define ifr_metric ifr_ifru.ifru_ivalue 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179#define ifr_mtu ifr_ifru.ifru_mtu 180#define ifr_map ifr_ifru.ifru_map 181#define ifr_slave ifr_ifru.ifru_slave 182#define ifr_data ifr_ifru.ifru_data 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184#define ifr_ifindex ifr_ifru.ifru_ivalue 185#define ifr_bandwidth ifr_ifru.ifru_ivalue 186#define ifr_qlen ifr_ifru.ifru_ivalue 187#define ifr_newname ifr_ifru.ifru_newname 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189#define ifr_settings ifr_ifru.ifru_settings 190struct ifconf { 191 int ifc_len; 192 union { 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 char __user *ifcu_buf; 195 struct ifreq __user *ifcu_req; 196 } ifc_ifcu; 197}; 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199#define ifc_buf ifc_ifcu.ifcu_buf 200#define ifc_req ifc_ifcu.ifcu_req 201#endif 202