• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _LINUX_IF_LINK_H
13 #define _LINUX_IF_LINK_H
14 
15 #include <linux/types.h>
16 #include <linux/netlink.h>
17 
18 struct rtnl_link_stats
19 {
20  __u32 rx_packets;
21  __u32 tx_packets;
22  __u32 rx_bytes;
23  __u32 tx_bytes;
24  __u32 rx_errors;
25  __u32 tx_errors;
26  __u32 rx_dropped;
27  __u32 tx_dropped;
28  __u32 multicast;
29  __u32 collisions;
30 
31  __u32 rx_length_errors;
32  __u32 rx_over_errors;
33  __u32 rx_crc_errors;
34  __u32 rx_frame_errors;
35  __u32 rx_fifo_errors;
36  __u32 rx_missed_errors;
37 
38  __u32 tx_aborted_errors;
39  __u32 tx_carrier_errors;
40  __u32 tx_fifo_errors;
41  __u32 tx_heartbeat_errors;
42  __u32 tx_window_errors;
43 
44  __u32 rx_compressed;
45  __u32 tx_compressed;
46 };
47 
48 struct rtnl_link_ifmap
49 {
50  __u64 mem_start;
51  __u64 mem_end;
52  __u64 base_addr;
53  __u16 irq;
54  __u8 dma;
55  __u8 port;
56 };
57 
58 enum
59 {
60  IFLA_UNSPEC,
61  IFLA_ADDRESS,
62  IFLA_BROADCAST,
63  IFLA_IFNAME,
64  IFLA_MTU,
65  IFLA_LINK,
66  IFLA_QDISC,
67  IFLA_STATS,
68  IFLA_COST,
69 #define IFLA_COST IFLA_COST
70  IFLA_PRIORITY,
71 #define IFLA_PRIORITY IFLA_PRIORITY
72  IFLA_MASTER,
73 #define IFLA_MASTER IFLA_MASTER
74  IFLA_WIRELESS,
75 #define IFLA_WIRELESS IFLA_WIRELESS
76  IFLA_PROTINFO,
77 #define IFLA_PROTINFO IFLA_PROTINFO
78  IFLA_TXQLEN,
79 #define IFLA_TXQLEN IFLA_TXQLEN
80  IFLA_MAP,
81 #define IFLA_MAP IFLA_MAP
82  IFLA_WEIGHT,
83 #define IFLA_WEIGHT IFLA_WEIGHT
84  IFLA_OPERSTATE,
85  IFLA_LINKMODE,
86  IFLA_LINKINFO,
87 #define IFLA_LINKINFO IFLA_LINKINFO
88  IFLA_NET_NS_PID,
89  IFLA_IFALIAS,
90  __IFLA_MAX
91 };
92 
93 #define IFLA_MAX (__IFLA_MAX - 1)
94 
95 #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
96 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
97 
98 enum
99 {
100  IFLA_INET6_UNSPEC,
101  IFLA_INET6_FLAGS,
102  IFLA_INET6_CONF,
103  IFLA_INET6_STATS,
104  IFLA_INET6_MCAST,
105  IFLA_INET6_CACHEINFO,
106  IFLA_INET6_ICMP6STATS,
107  __IFLA_INET6_MAX
108 };
109 
110 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
111 
112 struct ifla_cacheinfo
113 {
114  __u32 max_reasm_len;
115  __u32 tstamp;
116  __u32 reachable_time;
117  __u32 retrans_time;
118 };
119 
120 enum
121 {
122  IFLA_INFO_UNSPEC,
123  IFLA_INFO_KIND,
124  IFLA_INFO_DATA,
125  IFLA_INFO_XSTATS,
126  __IFLA_INFO_MAX,
127 };
128 
129 #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1)
130 
131 enum
132 {
133  IFLA_VLAN_UNSPEC,
134  IFLA_VLAN_ID,
135  IFLA_VLAN_FLAGS,
136  IFLA_VLAN_EGRESS_QOS,
137  IFLA_VLAN_INGRESS_QOS,
138  __IFLA_VLAN_MAX,
139 };
140 
141 #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1)
142 
143 struct ifla_vlan_flags {
144  __u32 flags;
145  __u32 mask;
146 };
147 
148 enum
149 {
150  IFLA_VLAN_QOS_UNSPEC,
151  IFLA_VLAN_QOS_MAPPING,
152  __IFLA_VLAN_QOS_MAX
153 };
154 
155 #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
156 
157 struct ifla_vlan_qos_mapping
158 {
159  __u32 from;
160  __u32 to;
161 };
162 
163 #endif
164