xref: /aosp_15_r20/external/libbpf/include/uapi/linux/if_link.h (revision f7c14bbac8cf49633f2740db462ea43457973ec4)
1*f7c14bbaSAndroid Build Coastguard Worker /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2*f7c14bbaSAndroid Build Coastguard Worker #ifndef _UAPI_LINUX_IF_LINK_H
3*f7c14bbaSAndroid Build Coastguard Worker #define _UAPI_LINUX_IF_LINK_H
4*f7c14bbaSAndroid Build Coastguard Worker 
5*f7c14bbaSAndroid Build Coastguard Worker #include <linux/types.h>
6*f7c14bbaSAndroid Build Coastguard Worker #include <linux/netlink.h>
7*f7c14bbaSAndroid Build Coastguard Worker 
8*f7c14bbaSAndroid Build Coastguard Worker /* This struct should be in sync with struct rtnl_link_stats64 */
9*f7c14bbaSAndroid Build Coastguard Worker struct rtnl_link_stats {
10*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_packets;
11*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_packets;
12*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_bytes;
13*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_bytes;
14*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_errors;
15*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_errors;
16*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_dropped;
17*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_dropped;
18*f7c14bbaSAndroid Build Coastguard Worker 	__u32	multicast;
19*f7c14bbaSAndroid Build Coastguard Worker 	__u32	collisions;
20*f7c14bbaSAndroid Build Coastguard Worker 	/* detailed rx_errors: */
21*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_length_errors;
22*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_over_errors;
23*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_crc_errors;
24*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_frame_errors;
25*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_fifo_errors;
26*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_missed_errors;
27*f7c14bbaSAndroid Build Coastguard Worker 
28*f7c14bbaSAndroid Build Coastguard Worker 	/* detailed tx_errors */
29*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_aborted_errors;
30*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_carrier_errors;
31*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_fifo_errors;
32*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_heartbeat_errors;
33*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_window_errors;
34*f7c14bbaSAndroid Build Coastguard Worker 
35*f7c14bbaSAndroid Build Coastguard Worker 	/* for cslip etc */
36*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_compressed;
37*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tx_compressed;
38*f7c14bbaSAndroid Build Coastguard Worker 
39*f7c14bbaSAndroid Build Coastguard Worker 	__u32	rx_nohandler;
40*f7c14bbaSAndroid Build Coastguard Worker };
41*f7c14bbaSAndroid Build Coastguard Worker 
42*f7c14bbaSAndroid Build Coastguard Worker /**
43*f7c14bbaSAndroid Build Coastguard Worker  * struct rtnl_link_stats64 - The main device statistics structure.
44*f7c14bbaSAndroid Build Coastguard Worker  *
45*f7c14bbaSAndroid Build Coastguard Worker  * @rx_packets: Number of good packets received by the interface.
46*f7c14bbaSAndroid Build Coastguard Worker  *   For hardware interfaces counts all good packets received from the device
47*f7c14bbaSAndroid Build Coastguard Worker  *   by the host, including packets which host had to drop at various stages
48*f7c14bbaSAndroid Build Coastguard Worker  *   of processing (even in the driver).
49*f7c14bbaSAndroid Build Coastguard Worker  *
50*f7c14bbaSAndroid Build Coastguard Worker  * @tx_packets: Number of packets successfully transmitted.
51*f7c14bbaSAndroid Build Coastguard Worker  *   For hardware interfaces counts packets which host was able to successfully
52*f7c14bbaSAndroid Build Coastguard Worker  *   hand over to the device, which does not necessarily mean that packets
53*f7c14bbaSAndroid Build Coastguard Worker  *   had been successfully transmitted out of the device, only that device
54*f7c14bbaSAndroid Build Coastguard Worker  *   acknowledged it copied them out of host memory.
55*f7c14bbaSAndroid Build Coastguard Worker  *
56*f7c14bbaSAndroid Build Coastguard Worker  * @rx_bytes: Number of good received bytes, corresponding to @rx_packets.
57*f7c14bbaSAndroid Build Coastguard Worker  *
58*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices should count the length of Ethernet Frames
59*f7c14bbaSAndroid Build Coastguard Worker  *   excluding the FCS.
60*f7c14bbaSAndroid Build Coastguard Worker  *
61*f7c14bbaSAndroid Build Coastguard Worker  * @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets.
62*f7c14bbaSAndroid Build Coastguard Worker  *
63*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices should count the length of Ethernet Frames
64*f7c14bbaSAndroid Build Coastguard Worker  *   excluding the FCS.
65*f7c14bbaSAndroid Build Coastguard Worker  *
66*f7c14bbaSAndroid Build Coastguard Worker  * @rx_errors: Total number of bad packets received on this network device.
67*f7c14bbaSAndroid Build Coastguard Worker  *   This counter must include events counted by @rx_length_errors,
68*f7c14bbaSAndroid Build Coastguard Worker  *   @rx_crc_errors, @rx_frame_errors and other errors not otherwise
69*f7c14bbaSAndroid Build Coastguard Worker  *   counted.
70*f7c14bbaSAndroid Build Coastguard Worker  *
71*f7c14bbaSAndroid Build Coastguard Worker  * @tx_errors: Total number of transmit problems.
72*f7c14bbaSAndroid Build Coastguard Worker  *   This counter must include events counter by @tx_aborted_errors,
73*f7c14bbaSAndroid Build Coastguard Worker  *   @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors,
74*f7c14bbaSAndroid Build Coastguard Worker  *   @tx_window_errors and other errors not otherwise counted.
75*f7c14bbaSAndroid Build Coastguard Worker  *
76*f7c14bbaSAndroid Build Coastguard Worker  * @rx_dropped: Number of packets received but not processed,
77*f7c14bbaSAndroid Build Coastguard Worker  *   e.g. due to lack of resources or unsupported protocol.
78*f7c14bbaSAndroid Build Coastguard Worker  *   For hardware interfaces this counter may include packets discarded
79*f7c14bbaSAndroid Build Coastguard Worker  *   due to L2 address filtering but should not include packets dropped
80*f7c14bbaSAndroid Build Coastguard Worker  *   by the device due to buffer exhaustion which are counted separately in
81*f7c14bbaSAndroid Build Coastguard Worker  *   @rx_missed_errors (since procfs folds those two counters together).
82*f7c14bbaSAndroid Build Coastguard Worker  *
83*f7c14bbaSAndroid Build Coastguard Worker  * @tx_dropped: Number of packets dropped on their way to transmission,
84*f7c14bbaSAndroid Build Coastguard Worker  *   e.g. due to lack of resources.
85*f7c14bbaSAndroid Build Coastguard Worker  *
86*f7c14bbaSAndroid Build Coastguard Worker  * @multicast: Multicast packets received.
87*f7c14bbaSAndroid Build Coastguard Worker  *   For hardware interfaces this statistic is commonly calculated
88*f7c14bbaSAndroid Build Coastguard Worker  *   at the device level (unlike @rx_packets) and therefore may include
89*f7c14bbaSAndroid Build Coastguard Worker  *   packets which did not reach the host.
90*f7c14bbaSAndroid Build Coastguard Worker  *
91*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices this counter may be equivalent to:
92*f7c14bbaSAndroid Build Coastguard Worker  *
93*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.21 aMulticastFramesReceivedOK
94*f7c14bbaSAndroid Build Coastguard Worker  *
95*f7c14bbaSAndroid Build Coastguard Worker  * @collisions: Number of collisions during packet transmissions.
96*f7c14bbaSAndroid Build Coastguard Worker  *
97*f7c14bbaSAndroid Build Coastguard Worker  * @rx_length_errors: Number of packets dropped due to invalid length.
98*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "frame" errors in `/proc/net/dev`.
99*f7c14bbaSAndroid Build Coastguard Worker  *
100*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices this counter should be equivalent to a sum
101*f7c14bbaSAndroid Build Coastguard Worker  *   of the following attributes:
102*f7c14bbaSAndroid Build Coastguard Worker  *
103*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.23 aInRangeLengthErrors
104*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.24 aOutOfRangeLengthField
105*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.25 aFrameTooLongErrors
106*f7c14bbaSAndroid Build Coastguard Worker  *
107*f7c14bbaSAndroid Build Coastguard Worker  * @rx_over_errors: Receiver FIFO overflow event counter.
108*f7c14bbaSAndroid Build Coastguard Worker  *
109*f7c14bbaSAndroid Build Coastguard Worker  *   Historically the count of overflow events. Such events may be
110*f7c14bbaSAndroid Build Coastguard Worker  *   reported in the receive descriptors or via interrupts, and may
111*f7c14bbaSAndroid Build Coastguard Worker  *   not correspond one-to-one with dropped packets.
112*f7c14bbaSAndroid Build Coastguard Worker  *
113*f7c14bbaSAndroid Build Coastguard Worker  *   The recommended interpretation for high speed interfaces is -
114*f7c14bbaSAndroid Build Coastguard Worker  *   number of packets dropped because they did not fit into buffers
115*f7c14bbaSAndroid Build Coastguard Worker  *   provided by the host, e.g. packets larger than MTU or next buffer
116*f7c14bbaSAndroid Build Coastguard Worker  *   in the ring was not available for a scatter transfer.
117*f7c14bbaSAndroid Build Coastguard Worker  *
118*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "frame" errors in `/proc/net/dev`.
119*f7c14bbaSAndroid Build Coastguard Worker  *
120*f7c14bbaSAndroid Build Coastguard Worker  *   This statistics was historically used interchangeably with
121*f7c14bbaSAndroid Build Coastguard Worker  *   @rx_fifo_errors.
122*f7c14bbaSAndroid Build Coastguard Worker  *
123*f7c14bbaSAndroid Build Coastguard Worker  *   This statistic corresponds to hardware events and is not commonly used
124*f7c14bbaSAndroid Build Coastguard Worker  *   on software devices.
125*f7c14bbaSAndroid Build Coastguard Worker  *
126*f7c14bbaSAndroid Build Coastguard Worker  * @rx_crc_errors: Number of packets received with a CRC error.
127*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "frame" errors in `/proc/net/dev`.
128*f7c14bbaSAndroid Build Coastguard Worker  *
129*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices this counter must be equivalent to:
130*f7c14bbaSAndroid Build Coastguard Worker  *
131*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.6 aFrameCheckSequenceErrors
132*f7c14bbaSAndroid Build Coastguard Worker  *
133*f7c14bbaSAndroid Build Coastguard Worker  * @rx_frame_errors: Receiver frame alignment errors.
134*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "frame" errors in `/proc/net/dev`.
135*f7c14bbaSAndroid Build Coastguard Worker  *
136*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices this counter should be equivalent to:
137*f7c14bbaSAndroid Build Coastguard Worker  *
138*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.7 aAlignmentErrors
139*f7c14bbaSAndroid Build Coastguard Worker  *
140*f7c14bbaSAndroid Build Coastguard Worker  * @rx_fifo_errors: Receiver FIFO error counter.
141*f7c14bbaSAndroid Build Coastguard Worker  *
142*f7c14bbaSAndroid Build Coastguard Worker  *   Historically the count of overflow events. Those events may be
143*f7c14bbaSAndroid Build Coastguard Worker  *   reported in the receive descriptors or via interrupts, and may
144*f7c14bbaSAndroid Build Coastguard Worker  *   not correspond one-to-one with dropped packets.
145*f7c14bbaSAndroid Build Coastguard Worker  *
146*f7c14bbaSAndroid Build Coastguard Worker  *   This statistics was used interchangeably with @rx_over_errors.
147*f7c14bbaSAndroid Build Coastguard Worker  *   Not recommended for use in drivers for high speed interfaces.
148*f7c14bbaSAndroid Build Coastguard Worker  *
149*f7c14bbaSAndroid Build Coastguard Worker  *   This statistic is used on software devices, e.g. to count software
150*f7c14bbaSAndroid Build Coastguard Worker  *   packet queue overflow (can) or sequencing errors (GRE).
151*f7c14bbaSAndroid Build Coastguard Worker  *
152*f7c14bbaSAndroid Build Coastguard Worker  * @rx_missed_errors: Count of packets missed by the host.
153*f7c14bbaSAndroid Build Coastguard Worker  *   Folded into the "drop" counter in `/proc/net/dev`.
154*f7c14bbaSAndroid Build Coastguard Worker  *
155*f7c14bbaSAndroid Build Coastguard Worker  *   Counts number of packets dropped by the device due to lack
156*f7c14bbaSAndroid Build Coastguard Worker  *   of buffer space. This usually indicates that the host interface
157*f7c14bbaSAndroid Build Coastguard Worker  *   is slower than the network interface, or host is not keeping up
158*f7c14bbaSAndroid Build Coastguard Worker  *   with the receive packet rate.
159*f7c14bbaSAndroid Build Coastguard Worker  *
160*f7c14bbaSAndroid Build Coastguard Worker  *   This statistic corresponds to hardware events and is not used
161*f7c14bbaSAndroid Build Coastguard Worker  *   on software devices.
162*f7c14bbaSAndroid Build Coastguard Worker  *
163*f7c14bbaSAndroid Build Coastguard Worker  * @tx_aborted_errors:
164*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "carrier" errors in `/proc/net/dev`.
165*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices capable of half-duplex operation this counter
166*f7c14bbaSAndroid Build Coastguard Worker  *   must be equivalent to:
167*f7c14bbaSAndroid Build Coastguard Worker  *
168*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.11 aFramesAbortedDueToXSColls
169*f7c14bbaSAndroid Build Coastguard Worker  *
170*f7c14bbaSAndroid Build Coastguard Worker  *   High speed interfaces may use this counter as a general device
171*f7c14bbaSAndroid Build Coastguard Worker  *   discard counter.
172*f7c14bbaSAndroid Build Coastguard Worker  *
173*f7c14bbaSAndroid Build Coastguard Worker  * @tx_carrier_errors: Number of frame transmission errors due to loss
174*f7c14bbaSAndroid Build Coastguard Worker  *   of carrier during transmission.
175*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "carrier" errors in `/proc/net/dev`.
176*f7c14bbaSAndroid Build Coastguard Worker  *
177*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices this counter must be equivalent to:
178*f7c14bbaSAndroid Build Coastguard Worker  *
179*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.13 aCarrierSenseErrors
180*f7c14bbaSAndroid Build Coastguard Worker  *
181*f7c14bbaSAndroid Build Coastguard Worker  * @tx_fifo_errors: Number of frame transmission errors due to device
182*f7c14bbaSAndroid Build Coastguard Worker  *   FIFO underrun / underflow. This condition occurs when the device
183*f7c14bbaSAndroid Build Coastguard Worker  *   begins transmission of a frame but is unable to deliver the
184*f7c14bbaSAndroid Build Coastguard Worker  *   entire frame to the transmitter in time for transmission.
185*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "carrier" errors in `/proc/net/dev`.
186*f7c14bbaSAndroid Build Coastguard Worker  *
187*f7c14bbaSAndroid Build Coastguard Worker  * @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for
188*f7c14bbaSAndroid Build Coastguard Worker  *   old half-duplex Ethernet.
189*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "carrier" errors in `/proc/net/dev`.
190*f7c14bbaSAndroid Build Coastguard Worker  *
191*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices possibly equivalent to:
192*f7c14bbaSAndroid Build Coastguard Worker  *
193*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.2.1.4 aSQETestErrors
194*f7c14bbaSAndroid Build Coastguard Worker  *
195*f7c14bbaSAndroid Build Coastguard Worker  * @tx_window_errors: Number of frame transmission errors due
196*f7c14bbaSAndroid Build Coastguard Worker  *   to late collisions (for Ethernet - after the first 64B of transmission).
197*f7c14bbaSAndroid Build Coastguard Worker  *   Part of aggregate "carrier" errors in `/proc/net/dev`.
198*f7c14bbaSAndroid Build Coastguard Worker  *
199*f7c14bbaSAndroid Build Coastguard Worker  *   For IEEE 802.3 devices this counter must be equivalent to:
200*f7c14bbaSAndroid Build Coastguard Worker  *
201*f7c14bbaSAndroid Build Coastguard Worker  *    - 30.3.1.1.10 aLateCollisions
202*f7c14bbaSAndroid Build Coastguard Worker  *
203*f7c14bbaSAndroid Build Coastguard Worker  * @rx_compressed: Number of correctly received compressed packets.
204*f7c14bbaSAndroid Build Coastguard Worker  *   This counters is only meaningful for interfaces which support
205*f7c14bbaSAndroid Build Coastguard Worker  *   packet compression (e.g. CSLIP, PPP).
206*f7c14bbaSAndroid Build Coastguard Worker  *
207*f7c14bbaSAndroid Build Coastguard Worker  * @tx_compressed: Number of transmitted compressed packets.
208*f7c14bbaSAndroid Build Coastguard Worker  *   This counters is only meaningful for interfaces which support
209*f7c14bbaSAndroid Build Coastguard Worker  *   packet compression (e.g. CSLIP, PPP).
210*f7c14bbaSAndroid Build Coastguard Worker  *
211*f7c14bbaSAndroid Build Coastguard Worker  * @rx_nohandler: Number of packets received on the interface
212*f7c14bbaSAndroid Build Coastguard Worker  *   but dropped by the networking stack because the device is
213*f7c14bbaSAndroid Build Coastguard Worker  *   not designated to receive packets (e.g. backup link in a bond).
214*f7c14bbaSAndroid Build Coastguard Worker  *
215*f7c14bbaSAndroid Build Coastguard Worker  * @rx_otherhost_dropped: Number of packets dropped due to mismatch
216*f7c14bbaSAndroid Build Coastguard Worker  *   in destination MAC address.
217*f7c14bbaSAndroid Build Coastguard Worker  */
218*f7c14bbaSAndroid Build Coastguard Worker struct rtnl_link_stats64 {
219*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_packets;
220*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_packets;
221*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_bytes;
222*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_bytes;
223*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_errors;
224*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_errors;
225*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_dropped;
226*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_dropped;
227*f7c14bbaSAndroid Build Coastguard Worker 	__u64	multicast;
228*f7c14bbaSAndroid Build Coastguard Worker 	__u64	collisions;
229*f7c14bbaSAndroid Build Coastguard Worker 
230*f7c14bbaSAndroid Build Coastguard Worker 	/* detailed rx_errors: */
231*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_length_errors;
232*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_over_errors;
233*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_crc_errors;
234*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_frame_errors;
235*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_fifo_errors;
236*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_missed_errors;
237*f7c14bbaSAndroid Build Coastguard Worker 
238*f7c14bbaSAndroid Build Coastguard Worker 	/* detailed tx_errors */
239*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_aborted_errors;
240*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_carrier_errors;
241*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_fifo_errors;
242*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_heartbeat_errors;
243*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_window_errors;
244*f7c14bbaSAndroid Build Coastguard Worker 
245*f7c14bbaSAndroid Build Coastguard Worker 	/* for cslip etc */
246*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_compressed;
247*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_compressed;
248*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_nohandler;
249*f7c14bbaSAndroid Build Coastguard Worker 
250*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_otherhost_dropped;
251*f7c14bbaSAndroid Build Coastguard Worker };
252*f7c14bbaSAndroid Build Coastguard Worker 
253*f7c14bbaSAndroid Build Coastguard Worker /* Subset of link stats useful for in-HW collection. Meaning of the fields is as
254*f7c14bbaSAndroid Build Coastguard Worker  * for struct rtnl_link_stats64.
255*f7c14bbaSAndroid Build Coastguard Worker  */
256*f7c14bbaSAndroid Build Coastguard Worker struct rtnl_hw_stats64 {
257*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_packets;
258*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_packets;
259*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_bytes;
260*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_bytes;
261*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_errors;
262*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_errors;
263*f7c14bbaSAndroid Build Coastguard Worker 	__u64	rx_dropped;
264*f7c14bbaSAndroid Build Coastguard Worker 	__u64	tx_dropped;
265*f7c14bbaSAndroid Build Coastguard Worker 	__u64	multicast;
266*f7c14bbaSAndroid Build Coastguard Worker };
267*f7c14bbaSAndroid Build Coastguard Worker 
268*f7c14bbaSAndroid Build Coastguard Worker /* The struct should be in sync with struct ifmap */
269*f7c14bbaSAndroid Build Coastguard Worker struct rtnl_link_ifmap {
270*f7c14bbaSAndroid Build Coastguard Worker 	__u64	mem_start;
271*f7c14bbaSAndroid Build Coastguard Worker 	__u64	mem_end;
272*f7c14bbaSAndroid Build Coastguard Worker 	__u64	base_addr;
273*f7c14bbaSAndroid Build Coastguard Worker 	__u16	irq;
274*f7c14bbaSAndroid Build Coastguard Worker 	__u8	dma;
275*f7c14bbaSAndroid Build Coastguard Worker 	__u8	port;
276*f7c14bbaSAndroid Build Coastguard Worker };
277*f7c14bbaSAndroid Build Coastguard Worker 
278*f7c14bbaSAndroid Build Coastguard Worker /*
279*f7c14bbaSAndroid Build Coastguard Worker  * IFLA_AF_SPEC
280*f7c14bbaSAndroid Build Coastguard Worker  *   Contains nested attributes for address family specific attributes.
281*f7c14bbaSAndroid Build Coastguard Worker  *   Each address family may create a attribute with the address family
282*f7c14bbaSAndroid Build Coastguard Worker  *   number as type and create its own attribute structure in it.
283*f7c14bbaSAndroid Build Coastguard Worker  *
284*f7c14bbaSAndroid Build Coastguard Worker  *   Example:
285*f7c14bbaSAndroid Build Coastguard Worker  *   [IFLA_AF_SPEC] = {
286*f7c14bbaSAndroid Build Coastguard Worker  *       [AF_INET] = {
287*f7c14bbaSAndroid Build Coastguard Worker  *           [IFLA_INET_CONF] = ...,
288*f7c14bbaSAndroid Build Coastguard Worker  *       },
289*f7c14bbaSAndroid Build Coastguard Worker  *       [AF_INET6] = {
290*f7c14bbaSAndroid Build Coastguard Worker  *           [IFLA_INET6_FLAGS] = ...,
291*f7c14bbaSAndroid Build Coastguard Worker  *           [IFLA_INET6_CONF] = ...,
292*f7c14bbaSAndroid Build Coastguard Worker  *       }
293*f7c14bbaSAndroid Build Coastguard Worker  *   }
294*f7c14bbaSAndroid Build Coastguard Worker  */
295*f7c14bbaSAndroid Build Coastguard Worker 
296*f7c14bbaSAndroid Build Coastguard Worker enum {
297*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_UNSPEC,
298*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_ADDRESS,
299*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BROADCAST,
300*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IFNAME,
301*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MTU,
302*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_LINK,
303*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_QDISC,
304*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS,
305*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_COST,
306*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_COST IFLA_COST
307*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PRIORITY,
308*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_PRIORITY IFLA_PRIORITY
309*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MASTER,
310*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_MASTER IFLA_MASTER
311*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_WIRELESS,		/* Wireless Extension event - see wireless.h */
312*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_WIRELESS IFLA_WIRELESS
313*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROTINFO,		/* Protocol specific information for a link */
314*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_PROTINFO IFLA_PROTINFO
315*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TXQLEN,
316*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_TXQLEN IFLA_TXQLEN
317*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MAP,
318*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_MAP IFLA_MAP
319*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_WEIGHT,
320*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_WEIGHT IFLA_WEIGHT
321*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_OPERSTATE,
322*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_LINKMODE,
323*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_LINKINFO,
324*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_LINKINFO IFLA_LINKINFO
325*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NET_NS_PID,
326*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IFALIAS,
327*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NUM_VF,		/* Number of VFs if device is SR-IOV PF */
328*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VFINFO_LIST,
329*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS64,
330*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_PORTS,
331*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_SELF,
332*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_AF_SPEC,
333*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GROUP,		/* Group the device belongs to */
334*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NET_NS_FD,
335*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EXT_MASK,		/* Extended info mask, VFs, etc */
336*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROMISCUITY,	/* Promiscuity count: > 0 means acts PROMISC */
337*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_PROMISCUITY IFLA_PROMISCUITY
338*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NUM_TX_QUEUES,
339*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NUM_RX_QUEUES,
340*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_CARRIER,
341*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PHYS_PORT_ID,
342*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_CARRIER_CHANGES,
343*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PHYS_SWITCH_ID,
344*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_LINK_NETNSID,
345*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PHYS_PORT_NAME,
346*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROTO_DOWN,
347*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GSO_MAX_SEGS,
348*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GSO_MAX_SIZE,
349*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PAD,
350*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP,
351*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EVENT,
352*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NEW_NETNSID,
353*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IF_NETNSID,
354*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, /* new alias */
355*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_CARRIER_UP_COUNT,
356*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_CARRIER_DOWN_COUNT,
357*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NEW_IFINDEX,
358*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MIN_MTU,
359*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MAX_MTU,
360*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROP_LIST,
361*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_ALT_IFNAME, /* Alternative ifname */
362*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PERM_ADDRESS,
363*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROTO_DOWN_REASON,
364*f7c14bbaSAndroid Build Coastguard Worker 
365*f7c14bbaSAndroid Build Coastguard Worker 	/* device (sysfs) name as parent, used instead
366*f7c14bbaSAndroid Build Coastguard Worker 	 * of IFLA_LINK where there's no parent netdev
367*f7c14bbaSAndroid Build Coastguard Worker 	 */
368*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PARENT_DEV_NAME,
369*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PARENT_DEV_BUS_NAME,
370*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GRO_MAX_SIZE,
371*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TSO_MAX_SIZE,
372*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TSO_MAX_SEGS,
373*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_ALLMULTI,		/* Allmulti count: > 0 means acts ALLMULTI */
374*f7c14bbaSAndroid Build Coastguard Worker 
375*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_DEVLINK_PORT,
376*f7c14bbaSAndroid Build Coastguard Worker 
377*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GSO_IPV4_MAX_SIZE,
378*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GRO_IPV4_MAX_SIZE,
379*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_DPLL_PIN,
380*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_MAX
381*f7c14bbaSAndroid Build Coastguard Worker };
382*f7c14bbaSAndroid Build Coastguard Worker 
383*f7c14bbaSAndroid Build Coastguard Worker 
384*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_MAX (__IFLA_MAX - 1)
385*f7c14bbaSAndroid Build Coastguard Worker 
386*f7c14bbaSAndroid Build Coastguard Worker enum {
387*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROTO_DOWN_REASON_UNSPEC,
388*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROTO_DOWN_REASON_MASK,	/* u32, mask for reason bits */
389*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROTO_DOWN_REASON_VALUE,   /* u32, reason bit value */
390*f7c14bbaSAndroid Build Coastguard Worker 
391*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_PROTO_DOWN_REASON_CNT,
392*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT - 1
393*f7c14bbaSAndroid Build Coastguard Worker };
394*f7c14bbaSAndroid Build Coastguard Worker 
395*f7c14bbaSAndroid Build Coastguard Worker /* backwards compatibility for userspace */
396*f7c14bbaSAndroid Build Coastguard Worker #ifndef __KERNEL__
397*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
398*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
399*f7c14bbaSAndroid Build Coastguard Worker #endif
400*f7c14bbaSAndroid Build Coastguard Worker 
401*f7c14bbaSAndroid Build Coastguard Worker enum {
402*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET_UNSPEC,
403*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET_CONF,
404*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_INET_MAX,
405*f7c14bbaSAndroid Build Coastguard Worker };
406*f7c14bbaSAndroid Build Coastguard Worker 
407*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_INET_MAX (__IFLA_INET_MAX - 1)
408*f7c14bbaSAndroid Build Coastguard Worker 
409*f7c14bbaSAndroid Build Coastguard Worker /* ifi_flags.
410*f7c14bbaSAndroid Build Coastguard Worker 
411*f7c14bbaSAndroid Build Coastguard Worker    IFF_* flags.
412*f7c14bbaSAndroid Build Coastguard Worker 
413*f7c14bbaSAndroid Build Coastguard Worker    The only change is:
414*f7c14bbaSAndroid Build Coastguard Worker    IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are
415*f7c14bbaSAndroid Build Coastguard Worker    more not changeable by user. They describe link media
416*f7c14bbaSAndroid Build Coastguard Worker    characteristics and set by device driver.
417*f7c14bbaSAndroid Build Coastguard Worker 
418*f7c14bbaSAndroid Build Coastguard Worker    Comments:
419*f7c14bbaSAndroid Build Coastguard Worker    - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid
420*f7c14bbaSAndroid Build Coastguard Worker    - If neither of these three flags are set;
421*f7c14bbaSAndroid Build Coastguard Worker      the interface is NBMA.
422*f7c14bbaSAndroid Build Coastguard Worker 
423*f7c14bbaSAndroid Build Coastguard Worker    - IFF_MULTICAST does not mean anything special:
424*f7c14bbaSAndroid Build Coastguard Worker    multicasts can be used on all not-NBMA links.
425*f7c14bbaSAndroid Build Coastguard Worker    IFF_MULTICAST means that this media uses special encapsulation
426*f7c14bbaSAndroid Build Coastguard Worker    for multicast frames. Apparently, all IFF_POINTOPOINT and
427*f7c14bbaSAndroid Build Coastguard Worker    IFF_BROADCAST devices are able to use multicasts too.
428*f7c14bbaSAndroid Build Coastguard Worker  */
429*f7c14bbaSAndroid Build Coastguard Worker 
430*f7c14bbaSAndroid Build Coastguard Worker /* IFLA_LINK.
431*f7c14bbaSAndroid Build Coastguard Worker    For usual devices it is equal ifi_index.
432*f7c14bbaSAndroid Build Coastguard Worker    If it is a "virtual interface" (f.e. tunnel), ifi_link
433*f7c14bbaSAndroid Build Coastguard Worker    can point to real physical interface (f.e. for bandwidth calculations),
434*f7c14bbaSAndroid Build Coastguard Worker    or maybe 0, what means, that real media is unknown (usual
435*f7c14bbaSAndroid Build Coastguard Worker    for IPIP tunnels, when route to endpoint is allowed to change)
436*f7c14bbaSAndroid Build Coastguard Worker  */
437*f7c14bbaSAndroid Build Coastguard Worker 
438*f7c14bbaSAndroid Build Coastguard Worker /* Subtype attributes for IFLA_PROTINFO */
439*f7c14bbaSAndroid Build Coastguard Worker enum {
440*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_UNSPEC,
441*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_FLAGS,	/* link flags			*/
442*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_CONF,	/* sysctl parameters		*/
443*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_STATS,	/* statistics			*/
444*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_MCAST,	/* MC things. What of them?	*/
445*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_CACHEINFO,	/* time values and max reasm size */
446*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_ICMP6STATS,	/* statistics (icmpv6)		*/
447*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_TOKEN,	/* device token			*/
448*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */
449*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INET6_RA_MTU,	/* mtu carried in the RA message */
450*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_INET6_MAX
451*f7c14bbaSAndroid Build Coastguard Worker };
452*f7c14bbaSAndroid Build Coastguard Worker 
453*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_INET6_MAX	(__IFLA_INET6_MAX - 1)
454*f7c14bbaSAndroid Build Coastguard Worker 
455*f7c14bbaSAndroid Build Coastguard Worker enum in6_addr_gen_mode {
456*f7c14bbaSAndroid Build Coastguard Worker 	IN6_ADDR_GEN_MODE_EUI64,
457*f7c14bbaSAndroid Build Coastguard Worker 	IN6_ADDR_GEN_MODE_NONE,
458*f7c14bbaSAndroid Build Coastguard Worker 	IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
459*f7c14bbaSAndroid Build Coastguard Worker 	IN6_ADDR_GEN_MODE_RANDOM,
460*f7c14bbaSAndroid Build Coastguard Worker };
461*f7c14bbaSAndroid Build Coastguard Worker 
462*f7c14bbaSAndroid Build Coastguard Worker /* Bridge section */
463*f7c14bbaSAndroid Build Coastguard Worker 
464*f7c14bbaSAndroid Build Coastguard Worker enum {
465*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_UNSPEC,
466*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_FORWARD_DELAY,
467*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_HELLO_TIME,
468*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MAX_AGE,
469*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_AGEING_TIME,
470*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_STP_STATE,
471*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_PRIORITY,
472*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_VLAN_FILTERING,
473*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_VLAN_PROTOCOL,
474*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_GROUP_FWD_MASK,
475*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_ROOT_ID,
476*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_BRIDGE_ID,
477*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_ROOT_PORT,
478*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_ROOT_PATH_COST,
479*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_TOPOLOGY_CHANGE,
480*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_TOPOLOGY_CHANGE_DETECTED,
481*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_HELLO_TIMER,
482*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_TCN_TIMER,
483*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_TOPOLOGY_CHANGE_TIMER,
484*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_GC_TIMER,
485*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_GROUP_ADDR,
486*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_FDB_FLUSH,
487*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_ROUTER,
488*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_SNOOPING,
489*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_QUERY_USE_IFADDR,
490*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_QUERIER,
491*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_HASH_ELASTICITY,
492*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_HASH_MAX,
493*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_LAST_MEMBER_CNT,
494*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_STARTUP_QUERY_CNT,
495*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_LAST_MEMBER_INTVL,
496*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_MEMBERSHIP_INTVL,
497*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_QUERIER_INTVL,
498*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_QUERY_INTVL,
499*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_QUERY_RESPONSE_INTVL,
500*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_STARTUP_QUERY_INTVL,
501*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_NF_CALL_IPTABLES,
502*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_NF_CALL_IP6TABLES,
503*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_NF_CALL_ARPTABLES,
504*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_VLAN_DEFAULT_PVID,
505*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_PAD,
506*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_VLAN_STATS_ENABLED,
507*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_STATS_ENABLED,
508*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_IGMP_VERSION,
509*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_MLD_VERSION,
510*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_VLAN_STATS_PER_PORT,
511*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MULTI_BOOLOPT,
512*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BR_MCAST_QUERIER_STATE,
513*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_BR_MAX,
514*f7c14bbaSAndroid Build Coastguard Worker };
515*f7c14bbaSAndroid Build Coastguard Worker 
516*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_BR_MAX	(__IFLA_BR_MAX - 1)
517*f7c14bbaSAndroid Build Coastguard Worker 
518*f7c14bbaSAndroid Build Coastguard Worker struct ifla_bridge_id {
519*f7c14bbaSAndroid Build Coastguard Worker 	__u8	prio[2];
520*f7c14bbaSAndroid Build Coastguard Worker 	__u8	addr[6]; /* ETH_ALEN */
521*f7c14bbaSAndroid Build Coastguard Worker };
522*f7c14bbaSAndroid Build Coastguard Worker 
523*f7c14bbaSAndroid Build Coastguard Worker enum {
524*f7c14bbaSAndroid Build Coastguard Worker 	BRIDGE_MODE_UNSPEC,
525*f7c14bbaSAndroid Build Coastguard Worker 	BRIDGE_MODE_HAIRPIN,
526*f7c14bbaSAndroid Build Coastguard Worker };
527*f7c14bbaSAndroid Build Coastguard Worker 
528*f7c14bbaSAndroid Build Coastguard Worker enum {
529*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_UNSPEC,
530*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_STATE,	/* Spanning tree state     */
531*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_PRIORITY,	/* "             priority  */
532*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_COST,	/* "             cost      */
533*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MODE,	/* mode (hairpin)          */
534*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_GUARD,	/* bpdu guard              */
535*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_PROTECT,	/* root port protection    */
536*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_FAST_LEAVE,	/* multicast fast leave    */
537*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_LEARNING,	/* mac learning */
538*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */
539*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_PROXYARP,	/* proxy ARP */
540*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */
541*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */
542*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_ROOT_ID,	/* designated root */
543*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_BRIDGE_ID,	/* designated bridge */
544*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_DESIGNATED_PORT,
545*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_DESIGNATED_COST,
546*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_ID,
547*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_NO,
548*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_TOPOLOGY_CHANGE_ACK,
549*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_CONFIG_PENDING,
550*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MESSAGE_AGE_TIMER,
551*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_FORWARD_DELAY_TIMER,
552*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_HOLD_TIMER,
553*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_FLUSH,
554*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MULTICAST_ROUTER,
555*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_PAD,
556*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MCAST_FLOOD,
557*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MCAST_TO_UCAST,
558*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_VLAN_TUNNEL,
559*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_BCAST_FLOOD,
560*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_GROUP_FWD_MASK,
561*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_NEIGH_SUPPRESS,
562*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_ISOLATED,
563*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_BACKUP_PORT,
564*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MRP_RING_OPEN,
565*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MRP_IN_OPEN,
566*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT,
567*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MCAST_EHT_HOSTS_CNT,
568*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_LOCKED,
569*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MAB,
570*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MCAST_N_GROUPS,
571*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_MCAST_MAX_GROUPS,
572*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_NEIGH_VLAN_SUPPRESS,
573*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BRPORT_BACKUP_NHID,
574*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_BRPORT_MAX
575*f7c14bbaSAndroid Build Coastguard Worker };
576*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
577*f7c14bbaSAndroid Build Coastguard Worker 
578*f7c14bbaSAndroid Build Coastguard Worker struct ifla_cacheinfo {
579*f7c14bbaSAndroid Build Coastguard Worker 	__u32	max_reasm_len;
580*f7c14bbaSAndroid Build Coastguard Worker 	__u32	tstamp;		/* ipv6InterfaceTable updated timestamp */
581*f7c14bbaSAndroid Build Coastguard Worker 	__u32	reachable_time;
582*f7c14bbaSAndroid Build Coastguard Worker 	__u32	retrans_time;
583*f7c14bbaSAndroid Build Coastguard Worker };
584*f7c14bbaSAndroid Build Coastguard Worker 
585*f7c14bbaSAndroid Build Coastguard Worker enum {
586*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INFO_UNSPEC,
587*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INFO_KIND,
588*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INFO_DATA,
589*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INFO_XSTATS,
590*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INFO_SLAVE_KIND,
591*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_INFO_SLAVE_DATA,
592*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_INFO_MAX,
593*f7c14bbaSAndroid Build Coastguard Worker };
594*f7c14bbaSAndroid Build Coastguard Worker 
595*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_INFO_MAX	(__IFLA_INFO_MAX - 1)
596*f7c14bbaSAndroid Build Coastguard Worker 
597*f7c14bbaSAndroid Build Coastguard Worker /* VLAN section */
598*f7c14bbaSAndroid Build Coastguard Worker 
599*f7c14bbaSAndroid Build Coastguard Worker enum {
600*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VLAN_UNSPEC,
601*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VLAN_ID,
602*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VLAN_FLAGS,
603*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VLAN_EGRESS_QOS,
604*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VLAN_INGRESS_QOS,
605*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VLAN_PROTOCOL,
606*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VLAN_MAX,
607*f7c14bbaSAndroid Build Coastguard Worker };
608*f7c14bbaSAndroid Build Coastguard Worker 
609*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VLAN_MAX	(__IFLA_VLAN_MAX - 1)
610*f7c14bbaSAndroid Build Coastguard Worker 
611*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vlan_flags {
612*f7c14bbaSAndroid Build Coastguard Worker 	__u32	flags;
613*f7c14bbaSAndroid Build Coastguard Worker 	__u32	mask;
614*f7c14bbaSAndroid Build Coastguard Worker };
615*f7c14bbaSAndroid Build Coastguard Worker 
616*f7c14bbaSAndroid Build Coastguard Worker enum {
617*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VLAN_QOS_UNSPEC,
618*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VLAN_QOS_MAPPING,
619*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VLAN_QOS_MAX
620*f7c14bbaSAndroid Build Coastguard Worker };
621*f7c14bbaSAndroid Build Coastguard Worker 
622*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VLAN_QOS_MAX	(__IFLA_VLAN_QOS_MAX - 1)
623*f7c14bbaSAndroid Build Coastguard Worker 
624*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vlan_qos_mapping {
625*f7c14bbaSAndroid Build Coastguard Worker 	__u32 from;
626*f7c14bbaSAndroid Build Coastguard Worker 	__u32 to;
627*f7c14bbaSAndroid Build Coastguard Worker };
628*f7c14bbaSAndroid Build Coastguard Worker 
629*f7c14bbaSAndroid Build Coastguard Worker /* MACVLAN section */
630*f7c14bbaSAndroid Build Coastguard Worker enum {
631*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_UNSPEC,
632*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_MODE,
633*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_FLAGS,
634*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_MACADDR_MODE,
635*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_MACADDR,
636*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_MACADDR_DATA,
637*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_MACADDR_COUNT,
638*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_BC_QUEUE_LEN,
639*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_BC_QUEUE_LEN_USED,
640*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACVLAN_BC_CUTOFF,
641*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_MACVLAN_MAX,
642*f7c14bbaSAndroid Build Coastguard Worker };
643*f7c14bbaSAndroid Build Coastguard Worker 
644*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
645*f7c14bbaSAndroid Build Coastguard Worker 
646*f7c14bbaSAndroid Build Coastguard Worker enum macvlan_mode {
647*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */
648*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MODE_VEPA    = 2, /* talk to other ports through ext bridge */
649*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MODE_BRIDGE  = 4, /* talk to bridge ports directly */
650*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */
651*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MODE_SOURCE  = 16,/* use source MAC address list to assign */
652*f7c14bbaSAndroid Build Coastguard Worker };
653*f7c14bbaSAndroid Build Coastguard Worker 
654*f7c14bbaSAndroid Build Coastguard Worker enum macvlan_macaddr_mode {
655*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MACADDR_ADD,
656*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MACADDR_DEL,
657*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MACADDR_FLUSH,
658*f7c14bbaSAndroid Build Coastguard Worker 	MACVLAN_MACADDR_SET,
659*f7c14bbaSAndroid Build Coastguard Worker };
660*f7c14bbaSAndroid Build Coastguard Worker 
661*f7c14bbaSAndroid Build Coastguard Worker #define MACVLAN_FLAG_NOPROMISC	1
662*f7c14bbaSAndroid Build Coastguard Worker #define MACVLAN_FLAG_NODST	2 /* skip dst macvlan if matching src macvlan */
663*f7c14bbaSAndroid Build Coastguard Worker 
664*f7c14bbaSAndroid Build Coastguard Worker /* VRF section */
665*f7c14bbaSAndroid Build Coastguard Worker enum {
666*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VRF_UNSPEC,
667*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VRF_TABLE,
668*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VRF_MAX
669*f7c14bbaSAndroid Build Coastguard Worker };
670*f7c14bbaSAndroid Build Coastguard Worker 
671*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
672*f7c14bbaSAndroid Build Coastguard Worker 
673*f7c14bbaSAndroid Build Coastguard Worker enum {
674*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VRF_PORT_UNSPEC,
675*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VRF_PORT_TABLE,
676*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VRF_PORT_MAX
677*f7c14bbaSAndroid Build Coastguard Worker };
678*f7c14bbaSAndroid Build Coastguard Worker 
679*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)
680*f7c14bbaSAndroid Build Coastguard Worker 
681*f7c14bbaSAndroid Build Coastguard Worker /* MACSEC section */
682*f7c14bbaSAndroid Build Coastguard Worker enum {
683*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_UNSPEC,
684*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_SCI,
685*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_PORT,
686*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_ICV_LEN,
687*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_CIPHER_SUITE,
688*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_WINDOW,
689*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_ENCODING_SA,
690*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_ENCRYPT,
691*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_PROTECT,
692*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_INC_SCI,
693*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_ES,
694*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_SCB,
695*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_REPLAY_PROTECT,
696*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_VALIDATION,
697*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_PAD,
698*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MACSEC_OFFLOAD,
699*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_MACSEC_MAX,
700*f7c14bbaSAndroid Build Coastguard Worker };
701*f7c14bbaSAndroid Build Coastguard Worker 
702*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)
703*f7c14bbaSAndroid Build Coastguard Worker 
704*f7c14bbaSAndroid Build Coastguard Worker /* XFRM section */
705*f7c14bbaSAndroid Build Coastguard Worker enum {
706*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XFRM_UNSPEC,
707*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XFRM_LINK,
708*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XFRM_IF_ID,
709*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XFRM_COLLECT_METADATA,
710*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_XFRM_MAX
711*f7c14bbaSAndroid Build Coastguard Worker };
712*f7c14bbaSAndroid Build Coastguard Worker 
713*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1)
714*f7c14bbaSAndroid Build Coastguard Worker 
715*f7c14bbaSAndroid Build Coastguard Worker enum macsec_validation_type {
716*f7c14bbaSAndroid Build Coastguard Worker 	MACSEC_VALIDATE_DISABLED = 0,
717*f7c14bbaSAndroid Build Coastguard Worker 	MACSEC_VALIDATE_CHECK = 1,
718*f7c14bbaSAndroid Build Coastguard Worker 	MACSEC_VALIDATE_STRICT = 2,
719*f7c14bbaSAndroid Build Coastguard Worker 	__MACSEC_VALIDATE_END,
720*f7c14bbaSAndroid Build Coastguard Worker 	MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
721*f7c14bbaSAndroid Build Coastguard Worker };
722*f7c14bbaSAndroid Build Coastguard Worker 
723*f7c14bbaSAndroid Build Coastguard Worker enum macsec_offload {
724*f7c14bbaSAndroid Build Coastguard Worker 	MACSEC_OFFLOAD_OFF = 0,
725*f7c14bbaSAndroid Build Coastguard Worker 	MACSEC_OFFLOAD_PHY = 1,
726*f7c14bbaSAndroid Build Coastguard Worker 	MACSEC_OFFLOAD_MAC = 2,
727*f7c14bbaSAndroid Build Coastguard Worker 	__MACSEC_OFFLOAD_END,
728*f7c14bbaSAndroid Build Coastguard Worker 	MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1,
729*f7c14bbaSAndroid Build Coastguard Worker };
730*f7c14bbaSAndroid Build Coastguard Worker 
731*f7c14bbaSAndroid Build Coastguard Worker /* IPVLAN section */
732*f7c14bbaSAndroid Build Coastguard Worker enum {
733*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IPVLAN_UNSPEC,
734*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IPVLAN_MODE,
735*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IPVLAN_FLAGS,
736*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_IPVLAN_MAX
737*f7c14bbaSAndroid Build Coastguard Worker };
738*f7c14bbaSAndroid Build Coastguard Worker 
739*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)
740*f7c14bbaSAndroid Build Coastguard Worker 
741*f7c14bbaSAndroid Build Coastguard Worker enum ipvlan_mode {
742*f7c14bbaSAndroid Build Coastguard Worker 	IPVLAN_MODE_L2 = 0,
743*f7c14bbaSAndroid Build Coastguard Worker 	IPVLAN_MODE_L3,
744*f7c14bbaSAndroid Build Coastguard Worker 	IPVLAN_MODE_L3S,
745*f7c14bbaSAndroid Build Coastguard Worker 	IPVLAN_MODE_MAX
746*f7c14bbaSAndroid Build Coastguard Worker };
747*f7c14bbaSAndroid Build Coastguard Worker 
748*f7c14bbaSAndroid Build Coastguard Worker #define IPVLAN_F_PRIVATE	0x01
749*f7c14bbaSAndroid Build Coastguard Worker #define IPVLAN_F_VEPA		0x02
750*f7c14bbaSAndroid Build Coastguard Worker 
751*f7c14bbaSAndroid Build Coastguard Worker /* Tunnel RTM header */
752*f7c14bbaSAndroid Build Coastguard Worker struct tunnel_msg {
753*f7c14bbaSAndroid Build Coastguard Worker 	__u8 family;
754*f7c14bbaSAndroid Build Coastguard Worker 	__u8 flags;
755*f7c14bbaSAndroid Build Coastguard Worker 	__u16 reserved2;
756*f7c14bbaSAndroid Build Coastguard Worker 	__u32 ifindex;
757*f7c14bbaSAndroid Build Coastguard Worker };
758*f7c14bbaSAndroid Build Coastguard Worker 
759*f7c14bbaSAndroid Build Coastguard Worker /* netkit section */
760*f7c14bbaSAndroid Build Coastguard Worker enum netkit_action {
761*f7c14bbaSAndroid Build Coastguard Worker 	NETKIT_NEXT	= -1,
762*f7c14bbaSAndroid Build Coastguard Worker 	NETKIT_PASS	= 0,
763*f7c14bbaSAndroid Build Coastguard Worker 	NETKIT_DROP	= 2,
764*f7c14bbaSAndroid Build Coastguard Worker 	NETKIT_REDIRECT	= 7,
765*f7c14bbaSAndroid Build Coastguard Worker };
766*f7c14bbaSAndroid Build Coastguard Worker 
767*f7c14bbaSAndroid Build Coastguard Worker enum netkit_mode {
768*f7c14bbaSAndroid Build Coastguard Worker 	NETKIT_L2,
769*f7c14bbaSAndroid Build Coastguard Worker 	NETKIT_L3,
770*f7c14bbaSAndroid Build Coastguard Worker };
771*f7c14bbaSAndroid Build Coastguard Worker 
772*f7c14bbaSAndroid Build Coastguard Worker enum {
773*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NETKIT_UNSPEC,
774*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NETKIT_PEER_INFO,
775*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NETKIT_PRIMARY,
776*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NETKIT_POLICY,
777*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NETKIT_PEER_POLICY,
778*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_NETKIT_MODE,
779*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_NETKIT_MAX,
780*f7c14bbaSAndroid Build Coastguard Worker };
781*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_NETKIT_MAX	(__IFLA_NETKIT_MAX - 1)
782*f7c14bbaSAndroid Build Coastguard Worker 
783*f7c14bbaSAndroid Build Coastguard Worker /* VXLAN section */
784*f7c14bbaSAndroid Build Coastguard Worker 
785*f7c14bbaSAndroid Build Coastguard Worker /* include statistics in the dump */
786*f7c14bbaSAndroid Build Coastguard Worker #define TUNNEL_MSG_FLAG_STATS	0x01
787*f7c14bbaSAndroid Build Coastguard Worker 
788*f7c14bbaSAndroid Build Coastguard Worker #define TUNNEL_MSG_VALID_USER_FLAGS TUNNEL_MSG_FLAG_STATS
789*f7c14bbaSAndroid Build Coastguard Worker 
790*f7c14bbaSAndroid Build Coastguard Worker /* Embedded inside VXLAN_VNIFILTER_ENTRY_STATS */
791*f7c14bbaSAndroid Build Coastguard Worker enum {
792*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_UNSPEC,
793*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_RX_BYTES,
794*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_RX_PKTS,
795*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_RX_DROPS,
796*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_RX_ERRORS,
797*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_TX_BYTES,
798*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_TX_PKTS,
799*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_TX_DROPS,
800*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_TX_ERRORS,
801*f7c14bbaSAndroid Build Coastguard Worker 	VNIFILTER_ENTRY_STATS_PAD,
802*f7c14bbaSAndroid Build Coastguard Worker 	__VNIFILTER_ENTRY_STATS_MAX
803*f7c14bbaSAndroid Build Coastguard Worker };
804*f7c14bbaSAndroid Build Coastguard Worker #define VNIFILTER_ENTRY_STATS_MAX (__VNIFILTER_ENTRY_STATS_MAX - 1)
805*f7c14bbaSAndroid Build Coastguard Worker 
806*f7c14bbaSAndroid Build Coastguard Worker enum {
807*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_VNIFILTER_ENTRY_UNSPEC,
808*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_VNIFILTER_ENTRY_START,
809*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_VNIFILTER_ENTRY_END,
810*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_VNIFILTER_ENTRY_GROUP,
811*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_VNIFILTER_ENTRY_GROUP6,
812*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_VNIFILTER_ENTRY_STATS,
813*f7c14bbaSAndroid Build Coastguard Worker 	__VXLAN_VNIFILTER_ENTRY_MAX
814*f7c14bbaSAndroid Build Coastguard Worker };
815*f7c14bbaSAndroid Build Coastguard Worker #define VXLAN_VNIFILTER_ENTRY_MAX	(__VXLAN_VNIFILTER_ENTRY_MAX - 1)
816*f7c14bbaSAndroid Build Coastguard Worker 
817*f7c14bbaSAndroid Build Coastguard Worker enum {
818*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_VNIFILTER_UNSPEC,
819*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_VNIFILTER_ENTRY,
820*f7c14bbaSAndroid Build Coastguard Worker 	__VXLAN_VNIFILTER_MAX
821*f7c14bbaSAndroid Build Coastguard Worker };
822*f7c14bbaSAndroid Build Coastguard Worker #define VXLAN_VNIFILTER_MAX	(__VXLAN_VNIFILTER_MAX - 1)
823*f7c14bbaSAndroid Build Coastguard Worker 
824*f7c14bbaSAndroid Build Coastguard Worker enum {
825*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_UNSPEC,
826*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_ID,
827*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_GROUP,	/* group or remote address */
828*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_LINK,
829*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_LOCAL,
830*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_TTL,
831*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_TOS,
832*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_LEARNING,
833*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_AGEING,
834*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_LIMIT,
835*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_PORT_RANGE,	/* source port */
836*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_PROXY,
837*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_RSC,
838*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_L2MISS,
839*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_L3MISS,
840*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_PORT,	/* destination port */
841*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_GROUP6,
842*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_LOCAL6,
843*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_UDP_CSUM,
844*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
845*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
846*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_REMCSUM_TX,
847*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_REMCSUM_RX,
848*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_GBP,
849*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_REMCSUM_NOPARTIAL,
850*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_COLLECT_METADATA,
851*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_LABEL,
852*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_GPE,
853*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_TTL_INHERIT,
854*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_DF,
855*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */
856*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VXLAN_LOCALBYPASS,
857*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VXLAN_MAX
858*f7c14bbaSAndroid Build Coastguard Worker };
859*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VXLAN_MAX	(__IFLA_VXLAN_MAX - 1)
860*f7c14bbaSAndroid Build Coastguard Worker 
861*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vxlan_port_range {
862*f7c14bbaSAndroid Build Coastguard Worker 	__be16	low;
863*f7c14bbaSAndroid Build Coastguard Worker 	__be16	high;
864*f7c14bbaSAndroid Build Coastguard Worker };
865*f7c14bbaSAndroid Build Coastguard Worker 
866*f7c14bbaSAndroid Build Coastguard Worker enum ifla_vxlan_df {
867*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_DF_UNSET = 0,
868*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_DF_SET,
869*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_DF_INHERIT,
870*f7c14bbaSAndroid Build Coastguard Worker 	__VXLAN_DF_END,
871*f7c14bbaSAndroid Build Coastguard Worker 	VXLAN_DF_MAX = __VXLAN_DF_END - 1,
872*f7c14bbaSAndroid Build Coastguard Worker };
873*f7c14bbaSAndroid Build Coastguard Worker 
874*f7c14bbaSAndroid Build Coastguard Worker /* GENEVE section */
875*f7c14bbaSAndroid Build Coastguard Worker enum {
876*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_UNSPEC,
877*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_ID,
878*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_REMOTE,
879*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_TTL,
880*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_TOS,
881*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_PORT,	/* destination port */
882*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_COLLECT_METADATA,
883*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_REMOTE6,
884*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_UDP_CSUM,
885*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
886*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
887*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_LABEL,
888*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_TTL_INHERIT,
889*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_DF,
890*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GENEVE_INNER_PROTO_INHERIT,
891*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_GENEVE_MAX
892*f7c14bbaSAndroid Build Coastguard Worker };
893*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_GENEVE_MAX	(__IFLA_GENEVE_MAX - 1)
894*f7c14bbaSAndroid Build Coastguard Worker 
895*f7c14bbaSAndroid Build Coastguard Worker enum ifla_geneve_df {
896*f7c14bbaSAndroid Build Coastguard Worker 	GENEVE_DF_UNSET = 0,
897*f7c14bbaSAndroid Build Coastguard Worker 	GENEVE_DF_SET,
898*f7c14bbaSAndroid Build Coastguard Worker 	GENEVE_DF_INHERIT,
899*f7c14bbaSAndroid Build Coastguard Worker 	__GENEVE_DF_END,
900*f7c14bbaSAndroid Build Coastguard Worker 	GENEVE_DF_MAX = __GENEVE_DF_END - 1,
901*f7c14bbaSAndroid Build Coastguard Worker };
902*f7c14bbaSAndroid Build Coastguard Worker 
903*f7c14bbaSAndroid Build Coastguard Worker /* Bareudp section  */
904*f7c14bbaSAndroid Build Coastguard Worker enum {
905*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BAREUDP_UNSPEC,
906*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BAREUDP_PORT,
907*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BAREUDP_ETHERTYPE,
908*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BAREUDP_SRCPORT_MIN,
909*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BAREUDP_MULTIPROTO_MODE,
910*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_BAREUDP_MAX
911*f7c14bbaSAndroid Build Coastguard Worker };
912*f7c14bbaSAndroid Build Coastguard Worker 
913*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX - 1)
914*f7c14bbaSAndroid Build Coastguard Worker 
915*f7c14bbaSAndroid Build Coastguard Worker /* PPP section */
916*f7c14bbaSAndroid Build Coastguard Worker enum {
917*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PPP_UNSPEC,
918*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PPP_DEV_FD,
919*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_PPP_MAX
920*f7c14bbaSAndroid Build Coastguard Worker };
921*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)
922*f7c14bbaSAndroid Build Coastguard Worker 
923*f7c14bbaSAndroid Build Coastguard Worker /* GTP section */
924*f7c14bbaSAndroid Build Coastguard Worker 
925*f7c14bbaSAndroid Build Coastguard Worker enum ifla_gtp_role {
926*f7c14bbaSAndroid Build Coastguard Worker 	GTP_ROLE_GGSN = 0,
927*f7c14bbaSAndroid Build Coastguard Worker 	GTP_ROLE_SGSN,
928*f7c14bbaSAndroid Build Coastguard Worker };
929*f7c14bbaSAndroid Build Coastguard Worker 
930*f7c14bbaSAndroid Build Coastguard Worker enum {
931*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GTP_UNSPEC,
932*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GTP_FD0,
933*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GTP_FD1,
934*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GTP_PDP_HASHSIZE,
935*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GTP_ROLE,
936*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GTP_CREATE_SOCKETS,
937*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_GTP_RESTART_COUNT,
938*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_GTP_MAX,
939*f7c14bbaSAndroid Build Coastguard Worker };
940*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
941*f7c14bbaSAndroid Build Coastguard Worker 
942*f7c14bbaSAndroid Build Coastguard Worker /* Bonding section */
943*f7c14bbaSAndroid Build Coastguard Worker 
944*f7c14bbaSAndroid Build Coastguard Worker enum {
945*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_UNSPEC,
946*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_MODE,
947*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_ACTIVE_SLAVE,
948*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_MIIMON,
949*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_UPDELAY,
950*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_DOWNDELAY,
951*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_USE_CARRIER,
952*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_ARP_INTERVAL,
953*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_ARP_IP_TARGET,
954*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_ARP_VALIDATE,
955*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_ARP_ALL_TARGETS,
956*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_PRIMARY,
957*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_PRIMARY_RESELECT,
958*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_FAIL_OVER_MAC,
959*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_XMIT_HASH_POLICY,
960*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_RESEND_IGMP,
961*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_NUM_PEER_NOTIF,
962*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_ALL_SLAVES_ACTIVE,
963*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_MIN_LINKS,
964*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_LP_INTERVAL,
965*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_PACKETS_PER_SLAVE,
966*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_LACP_RATE,
967*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_SELECT,
968*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_INFO,
969*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_ACTOR_SYS_PRIO,
970*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_USER_PORT_KEY,
971*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_ACTOR_SYSTEM,
972*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_TLB_DYNAMIC_LB,
973*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_PEER_NOTIF_DELAY,
974*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_LACP_ACTIVE,
975*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_MISSED_MAX,
976*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_NS_IP6_TARGET,
977*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_COUPLED_CONTROL,
978*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_BOND_MAX,
979*f7c14bbaSAndroid Build Coastguard Worker };
980*f7c14bbaSAndroid Build Coastguard Worker 
981*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_BOND_MAX	(__IFLA_BOND_MAX - 1)
982*f7c14bbaSAndroid Build Coastguard Worker 
983*f7c14bbaSAndroid Build Coastguard Worker enum {
984*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_INFO_UNSPEC,
985*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_INFO_AGGREGATOR,
986*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_INFO_NUM_PORTS,
987*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_INFO_ACTOR_KEY,
988*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_INFO_PARTNER_KEY,
989*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_AD_INFO_PARTNER_MAC,
990*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_BOND_AD_INFO_MAX,
991*f7c14bbaSAndroid Build Coastguard Worker };
992*f7c14bbaSAndroid Build Coastguard Worker 
993*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_BOND_AD_INFO_MAX	(__IFLA_BOND_AD_INFO_MAX - 1)
994*f7c14bbaSAndroid Build Coastguard Worker 
995*f7c14bbaSAndroid Build Coastguard Worker enum {
996*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_UNSPEC,
997*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_STATE,
998*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_MII_STATUS,
999*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
1000*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_PERM_HWADDR,
1001*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_QUEUE_ID,
1002*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
1003*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
1004*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
1005*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_BOND_SLAVE_PRIO,
1006*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_BOND_SLAVE_MAX,
1007*f7c14bbaSAndroid Build Coastguard Worker };
1008*f7c14bbaSAndroid Build Coastguard Worker 
1009*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_BOND_SLAVE_MAX	(__IFLA_BOND_SLAVE_MAX - 1)
1010*f7c14bbaSAndroid Build Coastguard Worker 
1011*f7c14bbaSAndroid Build Coastguard Worker /* SR-IOV virtual function management section */
1012*f7c14bbaSAndroid Build Coastguard Worker 
1013*f7c14bbaSAndroid Build Coastguard Worker enum {
1014*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_INFO_UNSPEC,
1015*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_INFO,
1016*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VF_INFO_MAX,
1017*f7c14bbaSAndroid Build Coastguard Worker };
1018*f7c14bbaSAndroid Build Coastguard Worker 
1019*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
1020*f7c14bbaSAndroid Build Coastguard Worker 
1021*f7c14bbaSAndroid Build Coastguard Worker enum {
1022*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_UNSPEC,
1023*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_MAC,		/* Hardware queue specific attributes */
1024*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_VLAN,		/* VLAN ID and QoS */
1025*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_TX_RATE,	/* Max TX Bandwidth Allocation */
1026*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_SPOOFCHK,	/* Spoof Checking on/off switch */
1027*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_LINK_STATE,	/* link state enable/disable/auto switch */
1028*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_RATE,		/* Min and Max TX Bandwidth Allocation */
1029*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_RSS_QUERY_EN,	/* RSS Redirection Table and Hash Key query
1030*f7c14bbaSAndroid Build Coastguard Worker 				 * on/off switch
1031*f7c14bbaSAndroid Build Coastguard Worker 				 */
1032*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS,		/* network device statistics */
1033*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_TRUST,		/* Trust VF */
1034*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_IB_NODE_GUID,	/* VF Infiniband node GUID */
1035*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_IB_PORT_GUID,	/* VF Infiniband port GUID */
1036*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_VLAN_LIST,	/* nested list of vlans, option for QinQ */
1037*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_BROADCAST,	/* VF broadcast */
1038*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VF_MAX,
1039*f7c14bbaSAndroid Build Coastguard Worker };
1040*f7c14bbaSAndroid Build Coastguard Worker 
1041*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
1042*f7c14bbaSAndroid Build Coastguard Worker 
1043*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_mac {
1044*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1045*f7c14bbaSAndroid Build Coastguard Worker 	__u8 mac[32]; /* MAX_ADDR_LEN */
1046*f7c14bbaSAndroid Build Coastguard Worker };
1047*f7c14bbaSAndroid Build Coastguard Worker 
1048*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_broadcast {
1049*f7c14bbaSAndroid Build Coastguard Worker 	__u8 broadcast[32];
1050*f7c14bbaSAndroid Build Coastguard Worker };
1051*f7c14bbaSAndroid Build Coastguard Worker 
1052*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_vlan {
1053*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1054*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vlan; /* 0 - 4095, 0 disables VLAN filter */
1055*f7c14bbaSAndroid Build Coastguard Worker 	__u32 qos;
1056*f7c14bbaSAndroid Build Coastguard Worker };
1057*f7c14bbaSAndroid Build Coastguard Worker 
1058*f7c14bbaSAndroid Build Coastguard Worker enum {
1059*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_VLAN_INFO_UNSPEC,
1060*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_VLAN_INFO,	/* VLAN ID, QoS and VLAN protocol */
1061*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VF_VLAN_INFO_MAX,
1062*f7c14bbaSAndroid Build Coastguard Worker };
1063*f7c14bbaSAndroid Build Coastguard Worker 
1064*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1)
1065*f7c14bbaSAndroid Build Coastguard Worker #define MAX_VLAN_LIST_LEN 1
1066*f7c14bbaSAndroid Build Coastguard Worker 
1067*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_vlan_info {
1068*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1069*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vlan; /* 0 - 4095, 0 disables VLAN filter */
1070*f7c14bbaSAndroid Build Coastguard Worker 	__u32 qos;
1071*f7c14bbaSAndroid Build Coastguard Worker 	__be16 vlan_proto; /* VLAN protocol either 802.1Q or 802.1ad */
1072*f7c14bbaSAndroid Build Coastguard Worker };
1073*f7c14bbaSAndroid Build Coastguard Worker 
1074*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_tx_rate {
1075*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1076*f7c14bbaSAndroid Build Coastguard Worker 	__u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
1077*f7c14bbaSAndroid Build Coastguard Worker };
1078*f7c14bbaSAndroid Build Coastguard Worker 
1079*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_rate {
1080*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1081*f7c14bbaSAndroid Build Coastguard Worker 	__u32 min_tx_rate; /* Min Bandwidth in Mbps */
1082*f7c14bbaSAndroid Build Coastguard Worker 	__u32 max_tx_rate; /* Max Bandwidth in Mbps */
1083*f7c14bbaSAndroid Build Coastguard Worker };
1084*f7c14bbaSAndroid Build Coastguard Worker 
1085*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_spoofchk {
1086*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1087*f7c14bbaSAndroid Build Coastguard Worker 	__u32 setting;
1088*f7c14bbaSAndroid Build Coastguard Worker };
1089*f7c14bbaSAndroid Build Coastguard Worker 
1090*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_guid {
1091*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1092*f7c14bbaSAndroid Build Coastguard Worker 	__u64 guid;
1093*f7c14bbaSAndroid Build Coastguard Worker };
1094*f7c14bbaSAndroid Build Coastguard Worker 
1095*f7c14bbaSAndroid Build Coastguard Worker enum {
1096*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_LINK_STATE_AUTO,	/* link state of the uplink */
1097*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_LINK_STATE_ENABLE,	/* link always up */
1098*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_LINK_STATE_DISABLE,	/* link always down */
1099*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VF_LINK_STATE_MAX,
1100*f7c14bbaSAndroid Build Coastguard Worker };
1101*f7c14bbaSAndroid Build Coastguard Worker 
1102*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_link_state {
1103*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1104*f7c14bbaSAndroid Build Coastguard Worker 	__u32 link_state;
1105*f7c14bbaSAndroid Build Coastguard Worker };
1106*f7c14bbaSAndroid Build Coastguard Worker 
1107*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_rss_query_en {
1108*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1109*f7c14bbaSAndroid Build Coastguard Worker 	__u32 setting;
1110*f7c14bbaSAndroid Build Coastguard Worker };
1111*f7c14bbaSAndroid Build Coastguard Worker 
1112*f7c14bbaSAndroid Build Coastguard Worker enum {
1113*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_RX_PACKETS,
1114*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_TX_PACKETS,
1115*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_RX_BYTES,
1116*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_TX_BYTES,
1117*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_BROADCAST,
1118*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_MULTICAST,
1119*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_PAD,
1120*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_RX_DROPPED,
1121*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_STATS_TX_DROPPED,
1122*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VF_STATS_MAX,
1123*f7c14bbaSAndroid Build Coastguard Worker };
1124*f7c14bbaSAndroid Build Coastguard Worker 
1125*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1)
1126*f7c14bbaSAndroid Build Coastguard Worker 
1127*f7c14bbaSAndroid Build Coastguard Worker struct ifla_vf_trust {
1128*f7c14bbaSAndroid Build Coastguard Worker 	__u32 vf;
1129*f7c14bbaSAndroid Build Coastguard Worker 	__u32 setting;
1130*f7c14bbaSAndroid Build Coastguard Worker };
1131*f7c14bbaSAndroid Build Coastguard Worker 
1132*f7c14bbaSAndroid Build Coastguard Worker /* VF ports management section
1133*f7c14bbaSAndroid Build Coastguard Worker  *
1134*f7c14bbaSAndroid Build Coastguard Worker  *	Nested layout of set/get msg is:
1135*f7c14bbaSAndroid Build Coastguard Worker  *
1136*f7c14bbaSAndroid Build Coastguard Worker  *		[IFLA_NUM_VF]
1137*f7c14bbaSAndroid Build Coastguard Worker  *		[IFLA_VF_PORTS]
1138*f7c14bbaSAndroid Build Coastguard Worker  *			[IFLA_VF_PORT]
1139*f7c14bbaSAndroid Build Coastguard Worker  *				[IFLA_PORT_*], ...
1140*f7c14bbaSAndroid Build Coastguard Worker  *			[IFLA_VF_PORT]
1141*f7c14bbaSAndroid Build Coastguard Worker  *				[IFLA_PORT_*], ...
1142*f7c14bbaSAndroid Build Coastguard Worker  *			...
1143*f7c14bbaSAndroid Build Coastguard Worker  *		[IFLA_PORT_SELF]
1144*f7c14bbaSAndroid Build Coastguard Worker  *			[IFLA_PORT_*], ...
1145*f7c14bbaSAndroid Build Coastguard Worker  */
1146*f7c14bbaSAndroid Build Coastguard Worker 
1147*f7c14bbaSAndroid Build Coastguard Worker enum {
1148*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_PORT_UNSPEC,
1149*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_VF_PORT,			/* nest */
1150*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_VF_PORT_MAX,
1151*f7c14bbaSAndroid Build Coastguard Worker };
1152*f7c14bbaSAndroid Build Coastguard Worker 
1153*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
1154*f7c14bbaSAndroid Build Coastguard Worker 
1155*f7c14bbaSAndroid Build Coastguard Worker enum {
1156*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_UNSPEC,
1157*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_VF,			/* __u32 */
1158*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_PROFILE,		/* string */
1159*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_VSI_TYPE,		/* 802.1Qbg (pre-)standard VDP */
1160*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_INSTANCE_UUID,	/* binary UUID */
1161*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_HOST_UUID,		/* binary UUID */
1162*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_REQUEST,		/* __u8 */
1163*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_PORT_RESPONSE,		/* __u16, output only */
1164*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_PORT_MAX,
1165*f7c14bbaSAndroid Build Coastguard Worker };
1166*f7c14bbaSAndroid Build Coastguard Worker 
1167*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
1168*f7c14bbaSAndroid Build Coastguard Worker 
1169*f7c14bbaSAndroid Build Coastguard Worker #define PORT_PROFILE_MAX	40
1170*f7c14bbaSAndroid Build Coastguard Worker #define PORT_UUID_MAX		16
1171*f7c14bbaSAndroid Build Coastguard Worker #define PORT_SELF_VF		-1
1172*f7c14bbaSAndroid Build Coastguard Worker 
1173*f7c14bbaSAndroid Build Coastguard Worker enum {
1174*f7c14bbaSAndroid Build Coastguard Worker 	PORT_REQUEST_PREASSOCIATE = 0,
1175*f7c14bbaSAndroid Build Coastguard Worker 	PORT_REQUEST_PREASSOCIATE_RR,
1176*f7c14bbaSAndroid Build Coastguard Worker 	PORT_REQUEST_ASSOCIATE,
1177*f7c14bbaSAndroid Build Coastguard Worker 	PORT_REQUEST_DISASSOCIATE,
1178*f7c14bbaSAndroid Build Coastguard Worker };
1179*f7c14bbaSAndroid Build Coastguard Worker 
1180*f7c14bbaSAndroid Build Coastguard Worker enum {
1181*f7c14bbaSAndroid Build Coastguard Worker 	PORT_VDP_RESPONSE_SUCCESS = 0,
1182*f7c14bbaSAndroid Build Coastguard Worker 	PORT_VDP_RESPONSE_INVALID_FORMAT,
1183*f7c14bbaSAndroid Build Coastguard Worker 	PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
1184*f7c14bbaSAndroid Build Coastguard Worker 	PORT_VDP_RESPONSE_UNUSED_VTID,
1185*f7c14bbaSAndroid Build Coastguard Worker 	PORT_VDP_RESPONSE_VTID_VIOLATION,
1186*f7c14bbaSAndroid Build Coastguard Worker 	PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
1187*f7c14bbaSAndroid Build Coastguard Worker 	PORT_VDP_RESPONSE_OUT_OF_SYNC,
1188*f7c14bbaSAndroid Build Coastguard Worker 	/* 0x08-0xFF reserved for future VDP use */
1189*f7c14bbaSAndroid Build Coastguard Worker 	PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
1190*f7c14bbaSAndroid Build Coastguard Worker 	PORT_PROFILE_RESPONSE_INPROGRESS,
1191*f7c14bbaSAndroid Build Coastguard Worker 	PORT_PROFILE_RESPONSE_INVALID,
1192*f7c14bbaSAndroid Build Coastguard Worker 	PORT_PROFILE_RESPONSE_BADSTATE,
1193*f7c14bbaSAndroid Build Coastguard Worker 	PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
1194*f7c14bbaSAndroid Build Coastguard Worker 	PORT_PROFILE_RESPONSE_ERROR,
1195*f7c14bbaSAndroid Build Coastguard Worker };
1196*f7c14bbaSAndroid Build Coastguard Worker 
1197*f7c14bbaSAndroid Build Coastguard Worker struct ifla_port_vsi {
1198*f7c14bbaSAndroid Build Coastguard Worker 	__u8 vsi_mgr_id;
1199*f7c14bbaSAndroid Build Coastguard Worker 	__u8 vsi_type_id[3];
1200*f7c14bbaSAndroid Build Coastguard Worker 	__u8 vsi_type_version;
1201*f7c14bbaSAndroid Build Coastguard Worker 	__u8 pad[3];
1202*f7c14bbaSAndroid Build Coastguard Worker };
1203*f7c14bbaSAndroid Build Coastguard Worker 
1204*f7c14bbaSAndroid Build Coastguard Worker 
1205*f7c14bbaSAndroid Build Coastguard Worker /* IPoIB section */
1206*f7c14bbaSAndroid Build Coastguard Worker 
1207*f7c14bbaSAndroid Build Coastguard Worker enum {
1208*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IPOIB_UNSPEC,
1209*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IPOIB_PKEY,
1210*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IPOIB_MODE,
1211*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_IPOIB_UMCAST,
1212*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_IPOIB_MAX
1213*f7c14bbaSAndroid Build Coastguard Worker };
1214*f7c14bbaSAndroid Build Coastguard Worker 
1215*f7c14bbaSAndroid Build Coastguard Worker enum {
1216*f7c14bbaSAndroid Build Coastguard Worker 	IPOIB_MODE_DATAGRAM  = 0, /* using unreliable datagram QPs */
1217*f7c14bbaSAndroid Build Coastguard Worker 	IPOIB_MODE_CONNECTED = 1, /* using connected QPs */
1218*f7c14bbaSAndroid Build Coastguard Worker };
1219*f7c14bbaSAndroid Build Coastguard Worker 
1220*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
1221*f7c14bbaSAndroid Build Coastguard Worker 
1222*f7c14bbaSAndroid Build Coastguard Worker 
1223*f7c14bbaSAndroid Build Coastguard Worker /* HSR/PRP section, both uses same interface */
1224*f7c14bbaSAndroid Build Coastguard Worker 
1225*f7c14bbaSAndroid Build Coastguard Worker /* Different redundancy protocols for hsr device */
1226*f7c14bbaSAndroid Build Coastguard Worker enum {
1227*f7c14bbaSAndroid Build Coastguard Worker 	HSR_PROTOCOL_HSR,
1228*f7c14bbaSAndroid Build Coastguard Worker 	HSR_PROTOCOL_PRP,
1229*f7c14bbaSAndroid Build Coastguard Worker 	HSR_PROTOCOL_MAX,
1230*f7c14bbaSAndroid Build Coastguard Worker };
1231*f7c14bbaSAndroid Build Coastguard Worker 
1232*f7c14bbaSAndroid Build Coastguard Worker enum {
1233*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_HSR_UNSPEC,
1234*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_HSR_SLAVE1,
1235*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_HSR_SLAVE2,
1236*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_HSR_MULTICAST_SPEC,	/* Last byte of supervision addr */
1237*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_HSR_SUPERVISION_ADDR,	/* Supervision frame multicast addr */
1238*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_HSR_SEQ_NR,
1239*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_HSR_VERSION,		/* HSR version */
1240*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_HSR_PROTOCOL,		/* Indicate different protocol than
1241*f7c14bbaSAndroid Build Coastguard Worker 					 * HSR. For example PRP.
1242*f7c14bbaSAndroid Build Coastguard Worker 					 */
1243*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_HSR_MAX,
1244*f7c14bbaSAndroid Build Coastguard Worker };
1245*f7c14bbaSAndroid Build Coastguard Worker 
1246*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
1247*f7c14bbaSAndroid Build Coastguard Worker 
1248*f7c14bbaSAndroid Build Coastguard Worker /* STATS section */
1249*f7c14bbaSAndroid Build Coastguard Worker 
1250*f7c14bbaSAndroid Build Coastguard Worker struct if_stats_msg {
1251*f7c14bbaSAndroid Build Coastguard Worker 	__u8  family;
1252*f7c14bbaSAndroid Build Coastguard Worker 	__u8  pad1;
1253*f7c14bbaSAndroid Build Coastguard Worker 	__u16 pad2;
1254*f7c14bbaSAndroid Build Coastguard Worker 	__u32 ifindex;
1255*f7c14bbaSAndroid Build Coastguard Worker 	__u32 filter_mask;
1256*f7c14bbaSAndroid Build Coastguard Worker };
1257*f7c14bbaSAndroid Build Coastguard Worker 
1258*f7c14bbaSAndroid Build Coastguard Worker /* A stats attribute can be netdev specific or a global stat.
1259*f7c14bbaSAndroid Build Coastguard Worker  * For netdev stats, lets use the prefix IFLA_STATS_LINK_*
1260*f7c14bbaSAndroid Build Coastguard Worker  */
1261*f7c14bbaSAndroid Build Coastguard Worker enum {
1262*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_UNSPEC, /* also used as 64bit pad attribute */
1263*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_LINK_64,
1264*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_LINK_XSTATS,
1265*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_LINK_XSTATS_SLAVE,
1266*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_LINK_OFFLOAD_XSTATS,
1267*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_AF_SPEC,
1268*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_STATS_MAX,
1269*f7c14bbaSAndroid Build Coastguard Worker };
1270*f7c14bbaSAndroid Build Coastguard Worker 
1271*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1)
1272*f7c14bbaSAndroid Build Coastguard Worker 
1273*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_STATS_FILTER_BIT(ATTR)	(1 << (ATTR - 1))
1274*f7c14bbaSAndroid Build Coastguard Worker 
1275*f7c14bbaSAndroid Build Coastguard Worker enum {
1276*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_GETSET_UNSPEC,
1277*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with
1278*f7c14bbaSAndroid Build Coastguard Worker 				 * a filter mask for the corresponding group.
1279*f7c14bbaSAndroid Build Coastguard Worker 				 */
1280*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, /* 0 or 1 as u8 */
1281*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_STATS_GETSET_MAX,
1282*f7c14bbaSAndroid Build Coastguard Worker };
1283*f7c14bbaSAndroid Build Coastguard Worker 
1284*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_STATS_GETSET_MAX (__IFLA_STATS_GETSET_MAX - 1)
1285*f7c14bbaSAndroid Build Coastguard Worker 
1286*f7c14bbaSAndroid Build Coastguard Worker /* These are embedded into IFLA_STATS_LINK_XSTATS:
1287*f7c14bbaSAndroid Build Coastguard Worker  * [IFLA_STATS_LINK_XSTATS]
1288*f7c14bbaSAndroid Build Coastguard Worker  * -> [LINK_XSTATS_TYPE_xxx]
1289*f7c14bbaSAndroid Build Coastguard Worker  *    -> [rtnl link type specific attributes]
1290*f7c14bbaSAndroid Build Coastguard Worker  */
1291*f7c14bbaSAndroid Build Coastguard Worker enum {
1292*f7c14bbaSAndroid Build Coastguard Worker 	LINK_XSTATS_TYPE_UNSPEC,
1293*f7c14bbaSAndroid Build Coastguard Worker 	LINK_XSTATS_TYPE_BRIDGE,
1294*f7c14bbaSAndroid Build Coastguard Worker 	LINK_XSTATS_TYPE_BOND,
1295*f7c14bbaSAndroid Build Coastguard Worker 	__LINK_XSTATS_TYPE_MAX
1296*f7c14bbaSAndroid Build Coastguard Worker };
1297*f7c14bbaSAndroid Build Coastguard Worker #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
1298*f7c14bbaSAndroid Build Coastguard Worker 
1299*f7c14bbaSAndroid Build Coastguard Worker /* These are stats embedded into IFLA_STATS_LINK_OFFLOAD_XSTATS */
1300*f7c14bbaSAndroid Build Coastguard Worker enum {
1301*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_OFFLOAD_XSTATS_UNSPEC,
1302*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_OFFLOAD_XSTATS_CPU_HIT, /* struct rtnl_link_stats64 */
1303*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_OFFLOAD_XSTATS_HW_S_INFO,	/* HW stats info. A nest */
1304*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_OFFLOAD_XSTATS_L3_STATS,	/* struct rtnl_hw_stats64 */
1305*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_OFFLOAD_XSTATS_MAX
1306*f7c14bbaSAndroid Build Coastguard Worker };
1307*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1)
1308*f7c14bbaSAndroid Build Coastguard Worker 
1309*f7c14bbaSAndroid Build Coastguard Worker enum {
1310*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC,
1311*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST,		/* u8 */
1312*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED,		/* u8 */
1313*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX,
1314*f7c14bbaSAndroid Build Coastguard Worker };
1315*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX \
1316*f7c14bbaSAndroid Build Coastguard Worker 	(__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX - 1)
1317*f7c14bbaSAndroid Build Coastguard Worker 
1318*f7c14bbaSAndroid Build Coastguard Worker /* XDP section */
1319*f7c14bbaSAndroid Build Coastguard Worker 
1320*f7c14bbaSAndroid Build Coastguard Worker #define XDP_FLAGS_UPDATE_IF_NOEXIST	(1U << 0)
1321*f7c14bbaSAndroid Build Coastguard Worker #define XDP_FLAGS_SKB_MODE		(1U << 1)
1322*f7c14bbaSAndroid Build Coastguard Worker #define XDP_FLAGS_DRV_MODE		(1U << 2)
1323*f7c14bbaSAndroid Build Coastguard Worker #define XDP_FLAGS_HW_MODE		(1U << 3)
1324*f7c14bbaSAndroid Build Coastguard Worker #define XDP_FLAGS_REPLACE		(1U << 4)
1325*f7c14bbaSAndroid Build Coastguard Worker #define XDP_FLAGS_MODES			(XDP_FLAGS_SKB_MODE | \
1326*f7c14bbaSAndroid Build Coastguard Worker 					 XDP_FLAGS_DRV_MODE | \
1327*f7c14bbaSAndroid Build Coastguard Worker 					 XDP_FLAGS_HW_MODE)
1328*f7c14bbaSAndroid Build Coastguard Worker #define XDP_FLAGS_MASK			(XDP_FLAGS_UPDATE_IF_NOEXIST | \
1329*f7c14bbaSAndroid Build Coastguard Worker 					 XDP_FLAGS_MODES | XDP_FLAGS_REPLACE)
1330*f7c14bbaSAndroid Build Coastguard Worker 
1331*f7c14bbaSAndroid Build Coastguard Worker /* These are stored into IFLA_XDP_ATTACHED on dump. */
1332*f7c14bbaSAndroid Build Coastguard Worker enum {
1333*f7c14bbaSAndroid Build Coastguard Worker 	XDP_ATTACHED_NONE = 0,
1334*f7c14bbaSAndroid Build Coastguard Worker 	XDP_ATTACHED_DRV,
1335*f7c14bbaSAndroid Build Coastguard Worker 	XDP_ATTACHED_SKB,
1336*f7c14bbaSAndroid Build Coastguard Worker 	XDP_ATTACHED_HW,
1337*f7c14bbaSAndroid Build Coastguard Worker 	XDP_ATTACHED_MULTI,
1338*f7c14bbaSAndroid Build Coastguard Worker };
1339*f7c14bbaSAndroid Build Coastguard Worker 
1340*f7c14bbaSAndroid Build Coastguard Worker enum {
1341*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_UNSPEC,
1342*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_FD,
1343*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_ATTACHED,
1344*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_FLAGS,
1345*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_PROG_ID,
1346*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_DRV_PROG_ID,
1347*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_SKB_PROG_ID,
1348*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_HW_PROG_ID,
1349*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_XDP_EXPECTED_FD,
1350*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_XDP_MAX,
1351*f7c14bbaSAndroid Build Coastguard Worker };
1352*f7c14bbaSAndroid Build Coastguard Worker 
1353*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
1354*f7c14bbaSAndroid Build Coastguard Worker 
1355*f7c14bbaSAndroid Build Coastguard Worker enum {
1356*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EVENT_NONE,
1357*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EVENT_REBOOT,		/* internal reset / reboot */
1358*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EVENT_FEATURES,		/* change in offload features */
1359*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EVENT_BONDING_FAILOVER,	/* change in active slave */
1360*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EVENT_NOTIFY_PEERS,	/* re-sent grat. arp/ndisc */
1361*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EVENT_IGMP_RESEND,		/* re-sent IGMP JOIN */
1362*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_EVENT_BONDING_OPTIONS,	/* change in bonding options */
1363*f7c14bbaSAndroid Build Coastguard Worker };
1364*f7c14bbaSAndroid Build Coastguard Worker 
1365*f7c14bbaSAndroid Build Coastguard Worker /* tun section */
1366*f7c14bbaSAndroid Build Coastguard Worker 
1367*f7c14bbaSAndroid Build Coastguard Worker enum {
1368*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_UNSPEC,
1369*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_OWNER,
1370*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_GROUP,
1371*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_TYPE,
1372*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_PI,
1373*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_VNET_HDR,
1374*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_PERSIST,
1375*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_MULTI_QUEUE,
1376*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_NUM_QUEUES,
1377*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_TUN_NUM_DISABLED_QUEUES,
1378*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_TUN_MAX,
1379*f7c14bbaSAndroid Build Coastguard Worker };
1380*f7c14bbaSAndroid Build Coastguard Worker 
1381*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1)
1382*f7c14bbaSAndroid Build Coastguard Worker 
1383*f7c14bbaSAndroid Build Coastguard Worker /* rmnet section */
1384*f7c14bbaSAndroid Build Coastguard Worker 
1385*f7c14bbaSAndroid Build Coastguard Worker #define RMNET_FLAGS_INGRESS_DEAGGREGATION         (1U << 0)
1386*f7c14bbaSAndroid Build Coastguard Worker #define RMNET_FLAGS_INGRESS_MAP_COMMANDS          (1U << 1)
1387*f7c14bbaSAndroid Build Coastguard Worker #define RMNET_FLAGS_INGRESS_MAP_CKSUMV4           (1U << 2)
1388*f7c14bbaSAndroid Build Coastguard Worker #define RMNET_FLAGS_EGRESS_MAP_CKSUMV4            (1U << 3)
1389*f7c14bbaSAndroid Build Coastguard Worker #define RMNET_FLAGS_INGRESS_MAP_CKSUMV5           (1U << 4)
1390*f7c14bbaSAndroid Build Coastguard Worker #define RMNET_FLAGS_EGRESS_MAP_CKSUMV5            (1U << 5)
1391*f7c14bbaSAndroid Build Coastguard Worker 
1392*f7c14bbaSAndroid Build Coastguard Worker enum {
1393*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_RMNET_UNSPEC,
1394*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_RMNET_MUX_ID,
1395*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_RMNET_FLAGS,
1396*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_RMNET_MAX,
1397*f7c14bbaSAndroid Build Coastguard Worker };
1398*f7c14bbaSAndroid Build Coastguard Worker 
1399*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_RMNET_MAX	(__IFLA_RMNET_MAX - 1)
1400*f7c14bbaSAndroid Build Coastguard Worker 
1401*f7c14bbaSAndroid Build Coastguard Worker struct ifla_rmnet_flags {
1402*f7c14bbaSAndroid Build Coastguard Worker 	__u32	flags;
1403*f7c14bbaSAndroid Build Coastguard Worker 	__u32	mask;
1404*f7c14bbaSAndroid Build Coastguard Worker };
1405*f7c14bbaSAndroid Build Coastguard Worker 
1406*f7c14bbaSAndroid Build Coastguard Worker /* MCTP section */
1407*f7c14bbaSAndroid Build Coastguard Worker 
1408*f7c14bbaSAndroid Build Coastguard Worker enum {
1409*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MCTP_UNSPEC,
1410*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_MCTP_NET,
1411*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_MCTP_MAX,
1412*f7c14bbaSAndroid Build Coastguard Worker };
1413*f7c14bbaSAndroid Build Coastguard Worker 
1414*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_MCTP_MAX (__IFLA_MCTP_MAX - 1)
1415*f7c14bbaSAndroid Build Coastguard Worker 
1416*f7c14bbaSAndroid Build Coastguard Worker /* DSA section */
1417*f7c14bbaSAndroid Build Coastguard Worker 
1418*f7c14bbaSAndroid Build Coastguard Worker enum {
1419*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_DSA_UNSPEC,
1420*f7c14bbaSAndroid Build Coastguard Worker 	IFLA_DSA_MASTER,
1421*f7c14bbaSAndroid Build Coastguard Worker 	__IFLA_DSA_MAX,
1422*f7c14bbaSAndroid Build Coastguard Worker };
1423*f7c14bbaSAndroid Build Coastguard Worker 
1424*f7c14bbaSAndroid Build Coastguard Worker #define IFLA_DSA_MAX	(__IFLA_DSA_MAX - 1)
1425*f7c14bbaSAndroid Build Coastguard Worker 
1426*f7c14bbaSAndroid Build Coastguard Worker #endif /* _UAPI_LINUX_IF_LINK_H */
1427