Update if.h, if_vlan,h and add in_route.h
Change-Id: I557a5ab71ea8dee18f5666b660fc73889c759851 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
b8faf0662b
commit
2a8245c914
3 changed files with 67 additions and 11 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <linux/compiler.h>
|
||||
|
||||
#define IFNAMSIZ 16
|
||||
#define IFALIASZ 256
|
||||
#include <linux/hdlc/ioctl.h>
|
||||
|
||||
#define IFF_UP 0x1
|
||||
|
@ -42,13 +43,24 @@
|
|||
#define IFF_LOWER_UP 0x10000
|
||||
#define IFF_DORMANT 0x20000
|
||||
|
||||
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
|
||||
#define IFF_ECHO 0x40000
|
||||
|
||||
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
|
||||
|
||||
#define IFF_802_1Q_VLAN 0x1
|
||||
#define IFF_EBRIDGE 0x2
|
||||
#define IFF_SLAVE_INACTIVE 0x4
|
||||
#define IFF_MASTER_8023AD 0x8
|
||||
#define IFF_MASTER_ALB 0x10
|
||||
#define IFF_BONDING 0x20
|
||||
#define IFF_SLAVE_NEEDARP 0x40
|
||||
#define IFF_ISATAP 0x80
|
||||
#define IFF_MASTER_ARPMON 0x100
|
||||
#define IFF_WAN_HDLC 0x200
|
||||
#define IFF_XMIT_DST_RELEASE 0x400
|
||||
#define IFF_DONT_BRIDGE 0x800
|
||||
#define IFF_IN_NETPOLL 0x1000
|
||||
#define IFF_DISABLE_NETPOLL 0x2000
|
||||
|
||||
#define IF_GET_IFACE 0x0001
|
||||
#define IF_GET_PROTO 0x0002
|
||||
|
@ -90,8 +102,7 @@ enum {
|
|||
IF_LINK_MODE_DORMANT,
|
||||
};
|
||||
|
||||
struct ifmap
|
||||
{
|
||||
struct ifmap {
|
||||
unsigned long mem_start;
|
||||
unsigned long mem_end;
|
||||
unsigned short base_addr;
|
||||
|
@ -101,8 +112,7 @@ struct ifmap
|
|||
|
||||
};
|
||||
|
||||
struct if_settings
|
||||
{
|
||||
struct if_settings {
|
||||
unsigned int type;
|
||||
unsigned int size;
|
||||
union {
|
||||
|
@ -118,8 +128,7 @@ struct if_settings
|
|||
} ifs_ifsu;
|
||||
};
|
||||
|
||||
struct ifreq
|
||||
{
|
||||
struct ifreq {
|
||||
#define IFHWADDRLEN 6
|
||||
union
|
||||
{
|
||||
|
@ -161,11 +170,9 @@ struct ifreq
|
|||
#define ifr_newname ifr_ifru.ifru_newname
|
||||
#define ifr_settings ifr_ifru.ifru_settings
|
||||
|
||||
struct ifconf
|
||||
{
|
||||
struct ifconf {
|
||||
int ifc_len;
|
||||
union
|
||||
{
|
||||
union {
|
||||
char __user *ifcu_buf;
|
||||
struct ifreq __user *ifcu_req;
|
||||
} ifc_ifcu;
|
||||
|
@ -174,3 +181,4 @@ struct ifconf
|
|||
#define ifc_req ifc_ifcu.ifcu_req
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,6 +25,12 @@ enum vlan_ioctl_cmds {
|
|||
GET_VLAN_VID_CMD
|
||||
};
|
||||
|
||||
enum vlan_flags {
|
||||
VLAN_FLAG_REORDER_HDR = 0x1,
|
||||
VLAN_FLAG_GVRP = 0x2,
|
||||
VLAN_FLAG_LOOSE_BINDING = 0x4,
|
||||
};
|
||||
|
||||
enum vlan_name_types {
|
||||
VLAN_NAME_TYPE_PLUS_VID,
|
||||
VLAN_NAME_TYPE_RAW_PLUS_VID,
|
||||
|
@ -50,3 +56,4 @@ struct vlan_ioctl_args {
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
41
libc/kernel/common/linux/in_route.h
Normal file
41
libc/kernel/common/linux/in_route.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/****************************************************************************
|
||||
****************************************************************************
|
||||
***
|
||||
*** This header was automatically generated from a Linux kernel header
|
||||
*** of the same name, to make information necessary for userspace to
|
||||
*** call into the kernel available to libc. It contains only constants,
|
||||
*** structures, and macros generated from the original header, and thus,
|
||||
*** contains no copyrightable information.
|
||||
***
|
||||
****************************************************************************
|
||||
****************************************************************************/
|
||||
#ifndef _LINUX_IN_ROUTE_H
|
||||
#define _LINUX_IN_ROUTE_H
|
||||
|
||||
#define RTCF_DEAD RTNH_F_DEAD
|
||||
#define RTCF_ONLINK RTNH_F_ONLINK
|
||||
|
||||
#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC
|
||||
|
||||
#define RTCF_NOTIFY 0x00010000
|
||||
#define RTCF_DIRECTDST 0x00020000
|
||||
#define RTCF_REDIRECTED 0x00040000
|
||||
#define RTCF_TPROXY 0x00080000
|
||||
|
||||
#define RTCF_FAST 0x00200000
|
||||
#define RTCF_MASQ 0x00400000
|
||||
#define RTCF_SNAT 0x00800000
|
||||
#define RTCF_DOREDIRECT 0x01000000
|
||||
#define RTCF_DIRECTSRC 0x04000000
|
||||
#define RTCF_DNAT 0x08000000
|
||||
#define RTCF_BROADCAST 0x10000000
|
||||
#define RTCF_MULTICAST 0x20000000
|
||||
#define RTCF_REJECT 0x40000000
|
||||
#define RTCF_LOCAL 0x80000000
|
||||
|
||||
#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
|
||||
|
||||
#define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK)
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in a new issue