1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef _UAPI_LINUX_IF_LINK_H 2 #ifndef _UAPI_LINUX_IF_LINK_H 3 #define _UAPI_LINUX_IF_LINK_H 3 #define _UAPI_LINUX_IF_LINK_H 4 4 5 #include <linux/types.h> 5 #include <linux/types.h> 6 #include <linux/netlink.h> 6 #include <linux/netlink.h> 7 7 8 /* This struct should be in sync with struct r 8 /* This struct should be in sync with struct rtnl_link_stats64 */ 9 struct rtnl_link_stats { 9 struct rtnl_link_stats { 10 __u32 rx_packets; 10 __u32 rx_packets; 11 __u32 tx_packets; 11 __u32 tx_packets; 12 __u32 rx_bytes; 12 __u32 rx_bytes; 13 __u32 tx_bytes; 13 __u32 tx_bytes; 14 __u32 rx_errors; 14 __u32 rx_errors; 15 __u32 tx_errors; 15 __u32 tx_errors; 16 __u32 rx_dropped; 16 __u32 rx_dropped; 17 __u32 tx_dropped; 17 __u32 tx_dropped; 18 __u32 multicast; 18 __u32 multicast; 19 __u32 collisions; 19 __u32 collisions; 20 /* detailed rx_errors: */ 20 /* detailed rx_errors: */ 21 __u32 rx_length_errors; 21 __u32 rx_length_errors; 22 __u32 rx_over_errors; 22 __u32 rx_over_errors; 23 __u32 rx_crc_errors; 23 __u32 rx_crc_errors; 24 __u32 rx_frame_errors; 24 __u32 rx_frame_errors; 25 __u32 rx_fifo_errors; 25 __u32 rx_fifo_errors; 26 __u32 rx_missed_errors; 26 __u32 rx_missed_errors; 27 27 28 /* detailed tx_errors */ 28 /* detailed tx_errors */ 29 __u32 tx_aborted_errors; 29 __u32 tx_aborted_errors; 30 __u32 tx_carrier_errors; 30 __u32 tx_carrier_errors; 31 __u32 tx_fifo_errors; 31 __u32 tx_fifo_errors; 32 __u32 tx_heartbeat_errors; 32 __u32 tx_heartbeat_errors; 33 __u32 tx_window_errors; 33 __u32 tx_window_errors; 34 34 35 /* for cslip etc */ 35 /* for cslip etc */ 36 __u32 rx_compressed; 36 __u32 rx_compressed; 37 __u32 tx_compressed; 37 __u32 tx_compressed; 38 38 39 __u32 rx_nohandler; 39 __u32 rx_nohandler; 40 }; 40 }; 41 41 42 /** 42 /** 43 * struct rtnl_link_stats64 - The main device 43 * struct rtnl_link_stats64 - The main device statistics structure. 44 * 44 * 45 * @rx_packets: Number of good packets receive 45 * @rx_packets: Number of good packets received by the interface. 46 * For hardware interfaces counts all good p 46 * For hardware interfaces counts all good packets received from the device 47 * by the host, including packets which host 47 * by the host, including packets which host had to drop at various stages 48 * of processing (even in the driver). 48 * of processing (even in the driver). 49 * 49 * 50 * @tx_packets: Number of packets successfully 50 * @tx_packets: Number of packets successfully transmitted. 51 * For hardware interfaces counts packets wh 51 * For hardware interfaces counts packets which host was able to successfully 52 * hand over to the device, which does not n 52 * hand over to the device, which does not necessarily mean that packets 53 * had been successfully transmitted out of 53 * had been successfully transmitted out of the device, only that device 54 * acknowledged it copied them out of host m 54 * acknowledged it copied them out of host memory. 55 * 55 * 56 * @rx_bytes: Number of good received bytes, c 56 * @rx_bytes: Number of good received bytes, corresponding to @rx_packets. 57 * 57 * 58 * For IEEE 802.3 devices should count the l 58 * For IEEE 802.3 devices should count the length of Ethernet Frames 59 * excluding the FCS. 59 * excluding the FCS. 60 * 60 * 61 * @tx_bytes: Number of good transmitted bytes 61 * @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets. 62 * 62 * 63 * For IEEE 802.3 devices should count the l 63 * For IEEE 802.3 devices should count the length of Ethernet Frames 64 * excluding the FCS. 64 * excluding the FCS. 65 * 65 * 66 * @rx_errors: Total number of bad packets rec 66 * @rx_errors: Total number of bad packets received on this network device. 67 * This counter must include events counted 67 * This counter must include events counted by @rx_length_errors, 68 * @rx_crc_errors, @rx_frame_errors and othe 68 * @rx_crc_errors, @rx_frame_errors and other errors not otherwise 69 * counted. 69 * counted. 70 * 70 * 71 * @tx_errors: Total number of transmit proble 71 * @tx_errors: Total number of transmit problems. 72 * This counter must include events counter 72 * This counter must include events counter by @tx_aborted_errors, 73 * @tx_carrier_errors, @tx_fifo_errors, @tx_ 73 * @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors, 74 * @tx_window_errors and other errors not ot 74 * @tx_window_errors and other errors not otherwise counted. 75 * 75 * 76 * @rx_dropped: Number of packets received but 76 * @rx_dropped: Number of packets received but not processed, 77 * e.g. due to lack of resources or unsuppor 77 * e.g. due to lack of resources or unsupported protocol. 78 * For hardware interfaces this counter may 78 * For hardware interfaces this counter may include packets discarded 79 * due to L2 address filtering but should no 79 * due to L2 address filtering but should not include packets dropped 80 * by the device due to buffer exhaustion wh 80 * by the device due to buffer exhaustion which are counted separately in 81 * @rx_missed_errors (since procfs folds tho 81 * @rx_missed_errors (since procfs folds those two counters together). 82 * 82 * 83 * @tx_dropped: Number of packets dropped on t 83 * @tx_dropped: Number of packets dropped on their way to transmission, 84 * e.g. due to lack of resources. 84 * e.g. due to lack of resources. 85 * 85 * 86 * @multicast: Multicast packets received. 86 * @multicast: Multicast packets received. 87 * For hardware interfaces this statistic is 87 * For hardware interfaces this statistic is commonly calculated 88 * at the device level (unlike @rx_packets) 88 * at the device level (unlike @rx_packets) and therefore may include 89 * packets which did not reach the host. 89 * packets which did not reach the host. 90 * 90 * 91 * For IEEE 802.3 devices this counter may b 91 * For IEEE 802.3 devices this counter may be equivalent to: 92 * 92 * 93 * - 30.3.1.1.21 aMulticastFramesReceivedOK 93 * - 30.3.1.1.21 aMulticastFramesReceivedOK 94 * 94 * 95 * @collisions: Number of collisions during pa 95 * @collisions: Number of collisions during packet transmissions. 96 * 96 * 97 * @rx_length_errors: Number of packets droppe 97 * @rx_length_errors: Number of packets dropped due to invalid length. 98 * Part of aggregate "frame" errors in `/pro 98 * Part of aggregate "frame" errors in `/proc/net/dev`. 99 * 99 * 100 * For IEEE 802.3 devices this counter shoul 100 * For IEEE 802.3 devices this counter should be equivalent to a sum 101 * of the following attributes: 101 * of the following attributes: 102 * 102 * 103 * - 30.3.1.1.23 aInRangeLengthErrors 103 * - 30.3.1.1.23 aInRangeLengthErrors 104 * - 30.3.1.1.24 aOutOfRangeLengthField 104 * - 30.3.1.1.24 aOutOfRangeLengthField 105 * - 30.3.1.1.25 aFrameTooLongErrors 105 * - 30.3.1.1.25 aFrameTooLongErrors 106 * 106 * 107 * @rx_over_errors: Receiver FIFO overflow eve 107 * @rx_over_errors: Receiver FIFO overflow event counter. 108 * 108 * 109 * Historically the count of overflow events 109 * Historically the count of overflow events. Such events may be 110 * reported in the receive descriptors or vi 110 * reported in the receive descriptors or via interrupts, and may 111 * not correspond one-to-one with dropped pa 111 * not correspond one-to-one with dropped packets. 112 * 112 * 113 * The recommended interpretation for high s 113 * The recommended interpretation for high speed interfaces is - 114 * number of packets dropped because they di 114 * number of packets dropped because they did not fit into buffers 115 * provided by the host, e.g. packets larger 115 * provided by the host, e.g. packets larger than MTU or next buffer 116 * in the ring was not available for a scatt 116 * in the ring was not available for a scatter transfer. 117 * 117 * 118 * Part of aggregate "frame" errors in `/pro 118 * Part of aggregate "frame" errors in `/proc/net/dev`. 119 * 119 * 120 * This statistics was historically used int 120 * This statistics was historically used interchangeably with 121 * @rx_fifo_errors. 121 * @rx_fifo_errors. 122 * 122 * 123 * This statistic corresponds to hardware ev 123 * This statistic corresponds to hardware events and is not commonly used 124 * on software devices. 124 * on software devices. 125 * 125 * 126 * @rx_crc_errors: Number of packets received 126 * @rx_crc_errors: Number of packets received with a CRC error. 127 * Part of aggregate "frame" errors in `/pro 127 * Part of aggregate "frame" errors in `/proc/net/dev`. 128 * 128 * 129 * For IEEE 802.3 devices this counter must 129 * For IEEE 802.3 devices this counter must be equivalent to: 130 * 130 * 131 * - 30.3.1.1.6 aFrameCheckSequenceErrors 131 * - 30.3.1.1.6 aFrameCheckSequenceErrors 132 * 132 * 133 * @rx_frame_errors: Receiver frame alignment 133 * @rx_frame_errors: Receiver frame alignment errors. 134 * Part of aggregate "frame" errors in `/pro 134 * Part of aggregate "frame" errors in `/proc/net/dev`. 135 * 135 * 136 * For IEEE 802.3 devices this counter shoul 136 * For IEEE 802.3 devices this counter should be equivalent to: 137 * 137 * 138 * - 30.3.1.1.7 aAlignmentErrors 138 * - 30.3.1.1.7 aAlignmentErrors 139 * 139 * 140 * @rx_fifo_errors: Receiver FIFO error counte 140 * @rx_fifo_errors: Receiver FIFO error counter. 141 * 141 * 142 * Historically the count of overflow events 142 * Historically the count of overflow events. Those events may be 143 * reported in the receive descriptors or vi 143 * reported in the receive descriptors or via interrupts, and may 144 * not correspond one-to-one with dropped pa 144 * not correspond one-to-one with dropped packets. 145 * 145 * 146 * This statistics was used interchangeably 146 * This statistics was used interchangeably with @rx_over_errors. 147 * Not recommended for use in drivers for hi 147 * Not recommended for use in drivers for high speed interfaces. 148 * 148 * 149 * This statistic is used on software device 149 * This statistic is used on software devices, e.g. to count software 150 * packet queue overflow (can) or sequencing 150 * packet queue overflow (can) or sequencing errors (GRE). 151 * 151 * 152 * @rx_missed_errors: Count of packets missed 152 * @rx_missed_errors: Count of packets missed by the host. 153 * Folded into the "drop" counter in `/proc/ 153 * Folded into the "drop" counter in `/proc/net/dev`. 154 * 154 * 155 * Counts number of packets dropped by the d 155 * Counts number of packets dropped by the device due to lack 156 * of buffer space. This usually indicates t 156 * of buffer space. This usually indicates that the host interface 157 * is slower than the network interface, or 157 * is slower than the network interface, or host is not keeping up 158 * with the receive packet rate. 158 * with the receive packet rate. 159 * 159 * 160 * This statistic corresponds to hardware ev 160 * This statistic corresponds to hardware events and is not used 161 * on software devices. 161 * on software devices. 162 * 162 * 163 * @tx_aborted_errors: 163 * @tx_aborted_errors: 164 * Part of aggregate "carrier" errors in `/p 164 * Part of aggregate "carrier" errors in `/proc/net/dev`. 165 * For IEEE 802.3 devices capable of half-du 165 * For IEEE 802.3 devices capable of half-duplex operation this counter 166 * must be equivalent to: 166 * must be equivalent to: 167 * 167 * 168 * - 30.3.1.1.11 aFramesAbortedDueToXSColls 168 * - 30.3.1.1.11 aFramesAbortedDueToXSColls 169 * 169 * 170 * High speed interfaces may use this counte 170 * High speed interfaces may use this counter as a general device 171 * discard counter. 171 * discard counter. 172 * 172 * 173 * @tx_carrier_errors: Number of frame transmi 173 * @tx_carrier_errors: Number of frame transmission errors due to loss 174 * of carrier during transmission. 174 * of carrier during transmission. 175 * Part of aggregate "carrier" errors in `/p 175 * Part of aggregate "carrier" errors in `/proc/net/dev`. 176 * 176 * 177 * For IEEE 802.3 devices this counter must 177 * For IEEE 802.3 devices this counter must be equivalent to: 178 * 178 * 179 * - 30.3.1.1.13 aCarrierSenseErrors 179 * - 30.3.1.1.13 aCarrierSenseErrors 180 * 180 * 181 * @tx_fifo_errors: Number of frame transmissi 181 * @tx_fifo_errors: Number of frame transmission errors due to device 182 * FIFO underrun / underflow. This condition 182 * FIFO underrun / underflow. This condition occurs when the device 183 * begins transmission of a frame but is una 183 * begins transmission of a frame but is unable to deliver the 184 * entire frame to the transmitter in time f 184 * entire frame to the transmitter in time for transmission. 185 * Part of aggregate "carrier" errors in `/p 185 * Part of aggregate "carrier" errors in `/proc/net/dev`. 186 * 186 * 187 * @tx_heartbeat_errors: Number of Heartbeat / 187 * @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for 188 * old half-duplex Ethernet. 188 * old half-duplex Ethernet. 189 * Part of aggregate "carrier" errors in `/p 189 * Part of aggregate "carrier" errors in `/proc/net/dev`. 190 * 190 * 191 * For IEEE 802.3 devices possibly equivalen 191 * For IEEE 802.3 devices possibly equivalent to: 192 * 192 * 193 * - 30.3.2.1.4 aSQETestErrors 193 * - 30.3.2.1.4 aSQETestErrors 194 * 194 * 195 * @tx_window_errors: Number of frame transmis 195 * @tx_window_errors: Number of frame transmission errors due 196 * to late collisions (for Ethernet - after 196 * to late collisions (for Ethernet - after the first 64B of transmission). 197 * Part of aggregate "carrier" errors in `/p 197 * Part of aggregate "carrier" errors in `/proc/net/dev`. 198 * 198 * 199 * For IEEE 802.3 devices this counter must 199 * For IEEE 802.3 devices this counter must be equivalent to: 200 * 200 * 201 * - 30.3.1.1.10 aLateCollisions 201 * - 30.3.1.1.10 aLateCollisions 202 * 202 * 203 * @rx_compressed: Number of correctly receive 203 * @rx_compressed: Number of correctly received compressed packets. 204 * This counters is only meaningful for inte 204 * This counters is only meaningful for interfaces which support 205 * packet compression (e.g. CSLIP, PPP). 205 * packet compression (e.g. CSLIP, PPP). 206 * 206 * 207 * @tx_compressed: Number of transmitted compr 207 * @tx_compressed: Number of transmitted compressed packets. 208 * This counters is only meaningful for inte 208 * This counters is only meaningful for interfaces which support 209 * packet compression (e.g. CSLIP, PPP). 209 * packet compression (e.g. CSLIP, PPP). 210 * 210 * 211 * @rx_nohandler: Number of packets received o 211 * @rx_nohandler: Number of packets received on the interface 212 * but dropped by the networking stack becau 212 * but dropped by the networking stack because the device is 213 * not designated to receive packets (e.g. b 213 * not designated to receive packets (e.g. backup link in a bond). 214 * 214 * 215 * @rx_otherhost_dropped: Number of packets dr 215 * @rx_otherhost_dropped: Number of packets dropped due to mismatch 216 * in destination MAC address. 216 * in destination MAC address. 217 */ 217 */ 218 struct rtnl_link_stats64 { 218 struct rtnl_link_stats64 { 219 __u64 rx_packets; 219 __u64 rx_packets; 220 __u64 tx_packets; 220 __u64 tx_packets; 221 __u64 rx_bytes; 221 __u64 rx_bytes; 222 __u64 tx_bytes; 222 __u64 tx_bytes; 223 __u64 rx_errors; 223 __u64 rx_errors; 224 __u64 tx_errors; 224 __u64 tx_errors; 225 __u64 rx_dropped; 225 __u64 rx_dropped; 226 __u64 tx_dropped; 226 __u64 tx_dropped; 227 __u64 multicast; 227 __u64 multicast; 228 __u64 collisions; 228 __u64 collisions; 229 229 230 /* detailed rx_errors: */ 230 /* detailed rx_errors: */ 231 __u64 rx_length_errors; 231 __u64 rx_length_errors; 232 __u64 rx_over_errors; 232 __u64 rx_over_errors; 233 __u64 rx_crc_errors; 233 __u64 rx_crc_errors; 234 __u64 rx_frame_errors; 234 __u64 rx_frame_errors; 235 __u64 rx_fifo_errors; 235 __u64 rx_fifo_errors; 236 __u64 rx_missed_errors; 236 __u64 rx_missed_errors; 237 237 238 /* detailed tx_errors */ 238 /* detailed tx_errors */ 239 __u64 tx_aborted_errors; 239 __u64 tx_aborted_errors; 240 __u64 tx_carrier_errors; 240 __u64 tx_carrier_errors; 241 __u64 tx_fifo_errors; 241 __u64 tx_fifo_errors; 242 __u64 tx_heartbeat_errors; 242 __u64 tx_heartbeat_errors; 243 __u64 tx_window_errors; 243 __u64 tx_window_errors; 244 244 245 /* for cslip etc */ 245 /* for cslip etc */ 246 __u64 rx_compressed; 246 __u64 rx_compressed; 247 __u64 tx_compressed; 247 __u64 tx_compressed; 248 __u64 rx_nohandler; 248 __u64 rx_nohandler; 249 249 250 __u64 rx_otherhost_dropped; 250 __u64 rx_otherhost_dropped; 251 }; 251 }; 252 252 253 /* Subset of link stats useful for in-HW colle 253 /* Subset of link stats useful for in-HW collection. Meaning of the fields is as 254 * for struct rtnl_link_stats64. 254 * for struct rtnl_link_stats64. 255 */ 255 */ 256 struct rtnl_hw_stats64 { 256 struct rtnl_hw_stats64 { 257 __u64 rx_packets; 257 __u64 rx_packets; 258 __u64 tx_packets; 258 __u64 tx_packets; 259 __u64 rx_bytes; 259 __u64 rx_bytes; 260 __u64 tx_bytes; 260 __u64 tx_bytes; 261 __u64 rx_errors; 261 __u64 rx_errors; 262 __u64 tx_errors; 262 __u64 tx_errors; 263 __u64 rx_dropped; 263 __u64 rx_dropped; 264 __u64 tx_dropped; 264 __u64 tx_dropped; 265 __u64 multicast; 265 __u64 multicast; 266 }; 266 }; 267 267 268 /* The struct should be in sync with struct if 268 /* The struct should be in sync with struct ifmap */ 269 struct rtnl_link_ifmap { 269 struct rtnl_link_ifmap { 270 __u64 mem_start; 270 __u64 mem_start; 271 __u64 mem_end; 271 __u64 mem_end; 272 __u64 base_addr; 272 __u64 base_addr; 273 __u16 irq; 273 __u16 irq; 274 __u8 dma; 274 __u8 dma; 275 __u8 port; 275 __u8 port; 276 }; 276 }; 277 277 278 /* 278 /* 279 * IFLA_AF_SPEC 279 * IFLA_AF_SPEC 280 * Contains nested attributes for address fa 280 * Contains nested attributes for address family specific attributes. 281 * Each address family may create a attribut 281 * Each address family may create a attribute with the address family 282 * number as type and create its own attribu 282 * number as type and create its own attribute structure in it. 283 * 283 * 284 * Example: 284 * Example: 285 * [IFLA_AF_SPEC] = { 285 * [IFLA_AF_SPEC] = { 286 * [AF_INET] = { 286 * [AF_INET] = { 287 * [IFLA_INET_CONF] = ..., 287 * [IFLA_INET_CONF] = ..., 288 * }, 288 * }, 289 * [AF_INET6] = { 289 * [AF_INET6] = { 290 * [IFLA_INET6_FLAGS] = ..., 290 * [IFLA_INET6_FLAGS] = ..., 291 * [IFLA_INET6_CONF] = ..., 291 * [IFLA_INET6_CONF] = ..., 292 * } 292 * } 293 * } 293 * } 294 */ 294 */ 295 295 296 enum { 296 enum { 297 IFLA_UNSPEC, 297 IFLA_UNSPEC, 298 IFLA_ADDRESS, 298 IFLA_ADDRESS, 299 IFLA_BROADCAST, 299 IFLA_BROADCAST, 300 IFLA_IFNAME, 300 IFLA_IFNAME, 301 IFLA_MTU, 301 IFLA_MTU, 302 IFLA_LINK, 302 IFLA_LINK, 303 IFLA_QDISC, 303 IFLA_QDISC, 304 IFLA_STATS, 304 IFLA_STATS, 305 IFLA_COST, 305 IFLA_COST, 306 #define IFLA_COST IFLA_COST 306 #define IFLA_COST IFLA_COST 307 IFLA_PRIORITY, 307 IFLA_PRIORITY, 308 #define IFLA_PRIORITY IFLA_PRIORITY 308 #define IFLA_PRIORITY IFLA_PRIORITY 309 IFLA_MASTER, 309 IFLA_MASTER, 310 #define IFLA_MASTER IFLA_MASTER 310 #define IFLA_MASTER IFLA_MASTER 311 IFLA_WIRELESS, /* Wireless Ex 311 IFLA_WIRELESS, /* Wireless Extension event - see wireless.h */ 312 #define IFLA_WIRELESS IFLA_WIRELESS 312 #define IFLA_WIRELESS IFLA_WIRELESS 313 IFLA_PROTINFO, /* Protocol sp 313 IFLA_PROTINFO, /* Protocol specific information for a link */ 314 #define IFLA_PROTINFO IFLA_PROTINFO 314 #define IFLA_PROTINFO IFLA_PROTINFO 315 IFLA_TXQLEN, 315 IFLA_TXQLEN, 316 #define IFLA_TXQLEN IFLA_TXQLEN 316 #define IFLA_TXQLEN IFLA_TXQLEN 317 IFLA_MAP, 317 IFLA_MAP, 318 #define IFLA_MAP IFLA_MAP 318 #define IFLA_MAP IFLA_MAP 319 IFLA_WEIGHT, 319 IFLA_WEIGHT, 320 #define IFLA_WEIGHT IFLA_WEIGHT 320 #define IFLA_WEIGHT IFLA_WEIGHT 321 IFLA_OPERSTATE, 321 IFLA_OPERSTATE, 322 IFLA_LINKMODE, 322 IFLA_LINKMODE, 323 IFLA_LINKINFO, 323 IFLA_LINKINFO, 324 #define IFLA_LINKINFO IFLA_LINKINFO 324 #define IFLA_LINKINFO IFLA_LINKINFO 325 IFLA_NET_NS_PID, 325 IFLA_NET_NS_PID, 326 IFLA_IFALIAS, 326 IFLA_IFALIAS, 327 IFLA_NUM_VF, /* Number of V 327 IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ 328 IFLA_VFINFO_LIST, 328 IFLA_VFINFO_LIST, 329 IFLA_STATS64, 329 IFLA_STATS64, 330 IFLA_VF_PORTS, 330 IFLA_VF_PORTS, 331 IFLA_PORT_SELF, 331 IFLA_PORT_SELF, 332 IFLA_AF_SPEC, 332 IFLA_AF_SPEC, 333 IFLA_GROUP, /* Group the d 333 IFLA_GROUP, /* Group the device belongs to */ 334 IFLA_NET_NS_FD, 334 IFLA_NET_NS_FD, 335 IFLA_EXT_MASK, /* Extended in 335 IFLA_EXT_MASK, /* Extended info mask, VFs, etc */ 336 IFLA_PROMISCUITY, /* Promiscuity 336 IFLA_PROMISCUITY, /* Promiscuity count: > 0 means acts PROMISC */ 337 #define IFLA_PROMISCUITY IFLA_PROMISCUITY 337 #define IFLA_PROMISCUITY IFLA_PROMISCUITY 338 IFLA_NUM_TX_QUEUES, 338 IFLA_NUM_TX_QUEUES, 339 IFLA_NUM_RX_QUEUES, 339 IFLA_NUM_RX_QUEUES, 340 IFLA_CARRIER, 340 IFLA_CARRIER, 341 IFLA_PHYS_PORT_ID, 341 IFLA_PHYS_PORT_ID, 342 IFLA_CARRIER_CHANGES, 342 IFLA_CARRIER_CHANGES, 343 IFLA_PHYS_SWITCH_ID, 343 IFLA_PHYS_SWITCH_ID, 344 IFLA_LINK_NETNSID, 344 IFLA_LINK_NETNSID, 345 IFLA_PHYS_PORT_NAME, 345 IFLA_PHYS_PORT_NAME, 346 IFLA_PROTO_DOWN, 346 IFLA_PROTO_DOWN, 347 IFLA_GSO_MAX_SEGS, 347 IFLA_GSO_MAX_SEGS, 348 IFLA_GSO_MAX_SIZE, 348 IFLA_GSO_MAX_SIZE, 349 IFLA_PAD, 349 IFLA_PAD, 350 IFLA_XDP, 350 IFLA_XDP, 351 IFLA_EVENT, 351 IFLA_EVENT, 352 IFLA_NEW_NETNSID, 352 IFLA_NEW_NETNSID, 353 IFLA_IF_NETNSID, 353 IFLA_IF_NETNSID, 354 IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, 354 IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, /* new alias */ 355 IFLA_CARRIER_UP_COUNT, 355 IFLA_CARRIER_UP_COUNT, 356 IFLA_CARRIER_DOWN_COUNT, 356 IFLA_CARRIER_DOWN_COUNT, 357 IFLA_NEW_IFINDEX, 357 IFLA_NEW_IFINDEX, 358 IFLA_MIN_MTU, 358 IFLA_MIN_MTU, 359 IFLA_MAX_MTU, 359 IFLA_MAX_MTU, 360 IFLA_PROP_LIST, 360 IFLA_PROP_LIST, 361 IFLA_ALT_IFNAME, /* Alternative ifname 361 IFLA_ALT_IFNAME, /* Alternative ifname */ 362 IFLA_PERM_ADDRESS, 362 IFLA_PERM_ADDRESS, 363 IFLA_PROTO_DOWN_REASON, 363 IFLA_PROTO_DOWN_REASON, 364 364 365 /* device (sysfs) name as parent, used 365 /* device (sysfs) name as parent, used instead 366 * of IFLA_LINK where there's no paren 366 * of IFLA_LINK where there's no parent netdev 367 */ 367 */ 368 IFLA_PARENT_DEV_NAME, 368 IFLA_PARENT_DEV_NAME, 369 IFLA_PARENT_DEV_BUS_NAME, 369 IFLA_PARENT_DEV_BUS_NAME, 370 IFLA_GRO_MAX_SIZE, 370 IFLA_GRO_MAX_SIZE, 371 IFLA_TSO_MAX_SIZE, 371 IFLA_TSO_MAX_SIZE, 372 IFLA_TSO_MAX_SEGS, 372 IFLA_TSO_MAX_SEGS, 373 IFLA_ALLMULTI, /* Allmulti co 373 IFLA_ALLMULTI, /* Allmulti count: > 0 means acts ALLMULTI */ 374 374 375 IFLA_DEVLINK_PORT, 375 IFLA_DEVLINK_PORT, 376 376 377 IFLA_GSO_IPV4_MAX_SIZE, 377 IFLA_GSO_IPV4_MAX_SIZE, 378 IFLA_GRO_IPV4_MAX_SIZE, 378 IFLA_GRO_IPV4_MAX_SIZE, 379 IFLA_DPLL_PIN, 379 IFLA_DPLL_PIN, 380 __IFLA_MAX 380 __IFLA_MAX 381 }; 381 }; 382 382 383 383 384 #define IFLA_MAX (__IFLA_MAX - 1) 384 #define IFLA_MAX (__IFLA_MAX - 1) 385 385 386 enum { 386 enum { 387 IFLA_PROTO_DOWN_REASON_UNSPEC, 387 IFLA_PROTO_DOWN_REASON_UNSPEC, 388 IFLA_PROTO_DOWN_REASON_MASK, /* u32 388 IFLA_PROTO_DOWN_REASON_MASK, /* u32, mask for reason bits */ 389 IFLA_PROTO_DOWN_REASON_VALUE, /* u32 389 IFLA_PROTO_DOWN_REASON_VALUE, /* u32, reason bit value */ 390 390 391 __IFLA_PROTO_DOWN_REASON_CNT, 391 __IFLA_PROTO_DOWN_REASON_CNT, 392 IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PR 392 IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT - 1 393 }; 393 }; 394 394 395 /* backwards compatibility for userspace */ 395 /* backwards compatibility for userspace */ 396 #ifndef __KERNEL__ 396 #ifndef __KERNEL__ 397 #define IFLA_RTA(r) ((struct rtattr*)(((char* 397 #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) 398 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof 398 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) 399 #endif 399 #endif 400 400 401 enum { 401 enum { 402 IFLA_INET_UNSPEC, 402 IFLA_INET_UNSPEC, 403 IFLA_INET_CONF, 403 IFLA_INET_CONF, 404 __IFLA_INET_MAX, 404 __IFLA_INET_MAX, 405 }; 405 }; 406 406 407 #define IFLA_INET_MAX (__IFLA_INET_MAX - 1) 407 #define IFLA_INET_MAX (__IFLA_INET_MAX - 1) 408 408 409 /* ifi_flags. 409 /* ifi_flags. 410 410 411 IFF_* flags. 411 IFF_* flags. 412 412 413 The only change is: 413 The only change is: 414 IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOP 414 IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are 415 more not changeable by user. They describe 415 more not changeable by user. They describe link media 416 characteristics and set by device driver. 416 characteristics and set by device driver. 417 417 418 Comments: 418 Comments: 419 - Combination IFF_BROADCAST|IFF_POINTOPOINT 419 - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid 420 - If neither of these three flags are set; 420 - If neither of these three flags are set; 421 the interface is NBMA. 421 the interface is NBMA. 422 422 423 - IFF_MULTICAST does not mean anything spec 423 - IFF_MULTICAST does not mean anything special: 424 multicasts can be used on all not-NBMA link 424 multicasts can be used on all not-NBMA links. 425 IFF_MULTICAST means that this media uses sp 425 IFF_MULTICAST means that this media uses special encapsulation 426 for multicast frames. Apparently, all IFF_P 426 for multicast frames. Apparently, all IFF_POINTOPOINT and 427 IFF_BROADCAST devices are able to use multi 427 IFF_BROADCAST devices are able to use multicasts too. 428 */ 428 */ 429 429 430 /* IFLA_LINK. 430 /* IFLA_LINK. 431 For usual devices it is equal ifi_index. 431 For usual devices it is equal ifi_index. 432 If it is a "virtual interface" (f.e. tunnel 432 If it is a "virtual interface" (f.e. tunnel), ifi_link 433 can point to real physical interface (f.e. 433 can point to real physical interface (f.e. for bandwidth calculations), 434 or maybe 0, what means, that real media is 434 or maybe 0, what means, that real media is unknown (usual 435 for IPIP tunnels, when route to endpoint is 435 for IPIP tunnels, when route to endpoint is allowed to change) 436 */ 436 */ 437 437 438 /* Subtype attributes for IFLA_PROTINFO */ 438 /* Subtype attributes for IFLA_PROTINFO */ 439 enum { 439 enum { 440 IFLA_INET6_UNSPEC, 440 IFLA_INET6_UNSPEC, 441 IFLA_INET6_FLAGS, /* link flags 441 IFLA_INET6_FLAGS, /* link flags */ 442 IFLA_INET6_CONF, /* sysctl para 442 IFLA_INET6_CONF, /* sysctl parameters */ 443 IFLA_INET6_STATS, /* statistics 443 IFLA_INET6_STATS, /* statistics */ 444 IFLA_INET6_MCAST, /* MC things. 444 IFLA_INET6_MCAST, /* MC things. What of them? */ 445 IFLA_INET6_CACHEINFO, /* time values 445 IFLA_INET6_CACHEINFO, /* time values and max reasm size */ 446 IFLA_INET6_ICMP6STATS, /* statistics 446 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */ 447 IFLA_INET6_TOKEN, /* device toke 447 IFLA_INET6_TOKEN, /* device token */ 448 IFLA_INET6_ADDR_GEN_MODE, /* implicit 448 IFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */ 449 IFLA_INET6_RA_MTU, /* mtu carried 449 IFLA_INET6_RA_MTU, /* mtu carried in the RA message */ 450 __IFLA_INET6_MAX 450 __IFLA_INET6_MAX 451 }; 451 }; 452 452 453 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) 453 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) 454 454 455 enum in6_addr_gen_mode { 455 enum in6_addr_gen_mode { 456 IN6_ADDR_GEN_MODE_EUI64, 456 IN6_ADDR_GEN_MODE_EUI64, 457 IN6_ADDR_GEN_MODE_NONE, 457 IN6_ADDR_GEN_MODE_NONE, 458 IN6_ADDR_GEN_MODE_STABLE_PRIVACY, 458 IN6_ADDR_GEN_MODE_STABLE_PRIVACY, 459 IN6_ADDR_GEN_MODE_RANDOM, 459 IN6_ADDR_GEN_MODE_RANDOM, 460 }; 460 }; 461 461 462 /* Bridge section */ 462 /* Bridge section */ 463 463 464 /** 464 /** 465 * DOC: Bridge enum definition 465 * DOC: Bridge enum definition 466 * 466 * 467 * Please *note* that the timer values in the 467 * Please *note* that the timer values in the following section are expected 468 * in clock_t format, which is seconds multipl 468 * in clock_t format, which is seconds multiplied by USER_HZ (generally 469 * defined as 100). 469 * defined as 100). 470 * 470 * 471 * @IFLA_BR_FORWARD_DELAY 471 * @IFLA_BR_FORWARD_DELAY 472 * The bridge forwarding delay is the time s 472 * The bridge forwarding delay is the time spent in LISTENING state 473 * (before moving to LEARNING) and in LEARNI 473 * (before moving to LEARNING) and in LEARNING state (before moving 474 * to FORWARDING). Only relevant if STP is e 474 * to FORWARDING). Only relevant if STP is enabled. 475 * 475 * 476 * The valid values are between (2 * USER_HZ 476 * The valid values are between (2 * USER_HZ) and (30 * USER_HZ). 477 * The default value is (15 * USER_HZ). 477 * The default value is (15 * USER_HZ). 478 * 478 * 479 * @IFLA_BR_HELLO_TIME 479 * @IFLA_BR_HELLO_TIME 480 * The time between hello packets sent by th 480 * The time between hello packets sent by the bridge, when it is a root 481 * bridge or a designated bridge. Only relev 481 * bridge or a designated bridge. Only relevant if STP is enabled. 482 * 482 * 483 * The valid values are between (1 * USER_HZ 483 * The valid values are between (1 * USER_HZ) and (10 * USER_HZ). 484 * The default value is (2 * USER_HZ). 484 * The default value is (2 * USER_HZ). 485 * 485 * 486 * @IFLA_BR_MAX_AGE 486 * @IFLA_BR_MAX_AGE 487 * The hello packet timeout is the time unti 487 * The hello packet timeout is the time until another bridge in the 488 * spanning tree is assumed to be dead, afte 488 * spanning tree is assumed to be dead, after reception of its last hello 489 * message. Only relevant if STP is enabled. 489 * message. Only relevant if STP is enabled. 490 * 490 * 491 * The valid values are between (6 * USER_HZ 491 * The valid values are between (6 * USER_HZ) and (40 * USER_HZ). 492 * The default value is (20 * USER_HZ). 492 * The default value is (20 * USER_HZ). 493 * 493 * 494 * @IFLA_BR_AGEING_TIME 494 * @IFLA_BR_AGEING_TIME 495 * Configure the bridge's FDB entries aging 495 * Configure the bridge's FDB entries aging time. It is the time a MAC 496 * address will be kept in the FDB after a p 496 * address will be kept in the FDB after a packet has been received from 497 * that address. After this time has passed, 497 * that address. After this time has passed, entries are cleaned up. 498 * Allow values outside the 802.1 standard s 498 * Allow values outside the 802.1 standard specification for special cases: 499 * 499 * 500 * * 0 - entry never ages (all permanent) 500 * * 0 - entry never ages (all permanent) 501 * * 1 - entry disappears (no persistence) 501 * * 1 - entry disappears (no persistence) 502 * 502 * 503 * The default value is (300 * USER_HZ). 503 * The default value is (300 * USER_HZ). 504 * 504 * 505 * @IFLA_BR_STP_STATE 505 * @IFLA_BR_STP_STATE 506 * Turn spanning tree protocol on (*IFLA_BR_ 506 * Turn spanning tree protocol on (*IFLA_BR_STP_STATE* > 0) or off 507 * (*IFLA_BR_STP_STATE* == 0) for this bridg 507 * (*IFLA_BR_STP_STATE* == 0) for this bridge. 508 * 508 * 509 * The default value is 0 (disabled). 509 * The default value is 0 (disabled). 510 * 510 * 511 * @IFLA_BR_PRIORITY 511 * @IFLA_BR_PRIORITY 512 * Set this bridge's spanning tree priority, 512 * Set this bridge's spanning tree priority, used during STP root bridge 513 * election. 513 * election. 514 * 514 * 515 * The valid values are between 0 and 65535. 515 * The valid values are between 0 and 65535. 516 * 516 * 517 * @IFLA_BR_VLAN_FILTERING 517 * @IFLA_BR_VLAN_FILTERING 518 * Turn VLAN filtering on (*IFLA_BR_VLAN_FIL 518 * Turn VLAN filtering on (*IFLA_BR_VLAN_FILTERING* > 0) or off 519 * (*IFLA_BR_VLAN_FILTERING* == 0). When dis 519 * (*IFLA_BR_VLAN_FILTERING* == 0). When disabled, the bridge will not 520 * consider the VLAN tag when handling packe 520 * consider the VLAN tag when handling packets. 521 * 521 * 522 * The default value is 0 (disabled). 522 * The default value is 0 (disabled). 523 * 523 * 524 * @IFLA_BR_VLAN_PROTOCOL 524 * @IFLA_BR_VLAN_PROTOCOL 525 * Set the protocol used for VLAN filtering. 525 * Set the protocol used for VLAN filtering. 526 * 526 * 527 * The valid values are 0x8100(802.1Q) or 0x 527 * The valid values are 0x8100(802.1Q) or 0x88A8(802.1AD). The default value 528 * is 0x8100(802.1Q). 528 * is 0x8100(802.1Q). 529 * 529 * 530 * @IFLA_BR_GROUP_FWD_MASK 530 * @IFLA_BR_GROUP_FWD_MASK 531 * The group forwarding mask. This is the bi 531 * The group forwarding mask. This is the bitmask that is applied to 532 * decide whether to forward incoming frames 532 * decide whether to forward incoming frames destined to link-local 533 * addresses (of the form 01:80:C2:00:00:0X) 533 * addresses (of the form 01:80:C2:00:00:0X). 534 * 534 * 535 * The default value is 0, which means the b 535 * The default value is 0, which means the bridge does not forward any 536 * link-local frames coming on this port. 536 * link-local frames coming on this port. 537 * 537 * 538 * @IFLA_BR_ROOT_ID 538 * @IFLA_BR_ROOT_ID 539 * The bridge root id, read only. 539 * The bridge root id, read only. 540 * 540 * 541 * @IFLA_BR_BRIDGE_ID 541 * @IFLA_BR_BRIDGE_ID 542 * The bridge id, read only. 542 * The bridge id, read only. 543 * 543 * 544 * @IFLA_BR_ROOT_PORT 544 * @IFLA_BR_ROOT_PORT 545 * The bridge root port, read only. 545 * The bridge root port, read only. 546 * 546 * 547 * @IFLA_BR_ROOT_PATH_COST 547 * @IFLA_BR_ROOT_PATH_COST 548 * The bridge root path cost, read only. 548 * The bridge root path cost, read only. 549 * 549 * 550 * @IFLA_BR_TOPOLOGY_CHANGE 550 * @IFLA_BR_TOPOLOGY_CHANGE 551 * The bridge topology change, read only. 551 * The bridge topology change, read only. 552 * 552 * 553 * @IFLA_BR_TOPOLOGY_CHANGE_DETECTED 553 * @IFLA_BR_TOPOLOGY_CHANGE_DETECTED 554 * The bridge topology change detected, read 554 * The bridge topology change detected, read only. 555 * 555 * 556 * @IFLA_BR_HELLO_TIMER 556 * @IFLA_BR_HELLO_TIMER 557 * The bridge hello timer, read only. 557 * The bridge hello timer, read only. 558 * 558 * 559 * @IFLA_BR_TCN_TIMER 559 * @IFLA_BR_TCN_TIMER 560 * The bridge tcn timer, read only. 560 * The bridge tcn timer, read only. 561 * 561 * 562 * @IFLA_BR_TOPOLOGY_CHANGE_TIMER 562 * @IFLA_BR_TOPOLOGY_CHANGE_TIMER 563 * The bridge topology change timer, read on 563 * The bridge topology change timer, read only. 564 * 564 * 565 * @IFLA_BR_GC_TIMER 565 * @IFLA_BR_GC_TIMER 566 * The bridge gc timer, read only. 566 * The bridge gc timer, read only. 567 * 567 * 568 * @IFLA_BR_GROUP_ADDR 568 * @IFLA_BR_GROUP_ADDR 569 * Set the MAC address of the multicast grou 569 * Set the MAC address of the multicast group this bridge uses for STP. 570 * The address must be a link-local address 570 * The address must be a link-local address in standard Ethernet MAC address 571 * format. It is an address of the form 01:8 571 * format. It is an address of the form 01:80:C2:00:00:0X, with X in [0, 4..f]. 572 * 572 * 573 * The default value is 0. 573 * The default value is 0. 574 * 574 * 575 * @IFLA_BR_FDB_FLUSH 575 * @IFLA_BR_FDB_FLUSH 576 * Flush bridge's fdb dynamic entries. 576 * Flush bridge's fdb dynamic entries. 577 * 577 * 578 * @IFLA_BR_MCAST_ROUTER 578 * @IFLA_BR_MCAST_ROUTER 579 * Set bridge's multicast router if IGMP sno 579 * Set bridge's multicast router if IGMP snooping is enabled. 580 * The valid values are: 580 * The valid values are: 581 * 581 * 582 * * 0 - disabled. 582 * * 0 - disabled. 583 * * 1 - automatic (queried). 583 * * 1 - automatic (queried). 584 * * 2 - permanently enabled. 584 * * 2 - permanently enabled. 585 * 585 * 586 * The default value is 1. 586 * The default value is 1. 587 * 587 * 588 * @IFLA_BR_MCAST_SNOOPING 588 * @IFLA_BR_MCAST_SNOOPING 589 * Turn multicast snooping on (*IFLA_BR_MCAS 589 * Turn multicast snooping on (*IFLA_BR_MCAST_SNOOPING* > 0) or off 590 * (*IFLA_BR_MCAST_SNOOPING* == 0). 590 * (*IFLA_BR_MCAST_SNOOPING* == 0). 591 * 591 * 592 * The default value is 1. 592 * The default value is 1. 593 * 593 * 594 * @IFLA_BR_MCAST_QUERY_USE_IFADDR 594 * @IFLA_BR_MCAST_QUERY_USE_IFADDR 595 * If enabled use the bridge's own IP addres 595 * If enabled use the bridge's own IP address as source address for IGMP 596 * queries (*IFLA_BR_MCAST_QUERY_USE_IFADDR* 596 * queries (*IFLA_BR_MCAST_QUERY_USE_IFADDR* > 0) or the default of 0.0.0.0 597 * (*IFLA_BR_MCAST_QUERY_USE_IFADDR* == 0). 597 * (*IFLA_BR_MCAST_QUERY_USE_IFADDR* == 0). 598 * 598 * 599 * The default value is 0 (disabled). 599 * The default value is 0 (disabled). 600 * 600 * 601 * @IFLA_BR_MCAST_QUERIER 601 * @IFLA_BR_MCAST_QUERIER 602 * Enable (*IFLA_BR_MULTICAST_QUERIER* > 0) 602 * Enable (*IFLA_BR_MULTICAST_QUERIER* > 0) or disable 603 * (*IFLA_BR_MULTICAST_QUERIER* == 0) IGMP q 603 * (*IFLA_BR_MULTICAST_QUERIER* == 0) IGMP querier, ie sending of multicast 604 * queries by the bridge. 604 * queries by the bridge. 605 * 605 * 606 * The default value is 0 (disabled). 606 * The default value is 0 (disabled). 607 * 607 * 608 * @IFLA_BR_MCAST_HASH_ELASTICITY 608 * @IFLA_BR_MCAST_HASH_ELASTICITY 609 * Set multicast database hash elasticity, I 609 * Set multicast database hash elasticity, It is the maximum chain length in 610 * the multicast hash table. This attribute 610 * the multicast hash table. This attribute is *deprecated* and the value 611 * is always 16. 611 * is always 16. 612 * 612 * 613 * @IFLA_BR_MCAST_HASH_MAX 613 * @IFLA_BR_MCAST_HASH_MAX 614 * Set maximum size of the multicast hash ta 614 * Set maximum size of the multicast hash table 615 * 615 * 616 * The default value is 4096, the value must 616 * The default value is 4096, the value must be a power of 2. 617 * 617 * 618 * @IFLA_BR_MCAST_LAST_MEMBER_CNT 618 * @IFLA_BR_MCAST_LAST_MEMBER_CNT 619 * The Last Member Query Count is the number 619 * The Last Member Query Count is the number of Group-Specific Queries 620 * sent before the router assumes there are 620 * sent before the router assumes there are no local members. The Last 621 * Member Query Count is also the number of 621 * Member Query Count is also the number of Group-and-Source-Specific 622 * Queries sent before the router assumes th 622 * Queries sent before the router assumes there are no listeners for a 623 * particular source. 623 * particular source. 624 * 624 * 625 * The default value is 2. 625 * The default value is 2. 626 * 626 * 627 * @IFLA_BR_MCAST_STARTUP_QUERY_CNT 627 * @IFLA_BR_MCAST_STARTUP_QUERY_CNT 628 * The Startup Query Count is the number of 628 * The Startup Query Count is the number of Queries sent out on startup, 629 * separated by the Startup Query Interval. 629 * separated by the Startup Query Interval. 630 * 630 * 631 * The default value is 2. 631 * The default value is 2. 632 * 632 * 633 * @IFLA_BR_MCAST_LAST_MEMBER_INTVL 633 * @IFLA_BR_MCAST_LAST_MEMBER_INTVL 634 * The Last Member Query Interval is the Max 634 * The Last Member Query Interval is the Max Response Time inserted into 635 * Group-Specific Queries sent in response t 635 * Group-Specific Queries sent in response to Leave Group messages, and 636 * is also the amount of time between Group- 636 * is also the amount of time between Group-Specific Query messages. 637 * 637 * 638 * The default value is (1 * USER_HZ). 638 * The default value is (1 * USER_HZ). 639 * 639 * 640 * @IFLA_BR_MCAST_MEMBERSHIP_INTVL 640 * @IFLA_BR_MCAST_MEMBERSHIP_INTVL 641 * The interval after which the bridge will 641 * The interval after which the bridge will leave a group, if no membership 642 * reports for this group are received. 642 * reports for this group are received. 643 * 643 * 644 * The default value is (260 * USER_HZ). 644 * The default value is (260 * USER_HZ). 645 * 645 * 646 * @IFLA_BR_MCAST_QUERIER_INTVL 646 * @IFLA_BR_MCAST_QUERIER_INTVL 647 * The interval between queries sent by othe 647 * The interval between queries sent by other routers. if no queries are 648 * seen after this delay has passed, the bri 648 * seen after this delay has passed, the bridge will start to send its own 649 * queries (as if *IFLA_BR_MCAST_QUERIER_INT 649 * queries (as if *IFLA_BR_MCAST_QUERIER_INTVL* was enabled). 650 * 650 * 651 * The default value is (255 * USER_HZ). 651 * The default value is (255 * USER_HZ). 652 * 652 * 653 * @IFLA_BR_MCAST_QUERY_INTVL 653 * @IFLA_BR_MCAST_QUERY_INTVL 654 * The Query Interval is the interval betwee 654 * The Query Interval is the interval between General Queries sent by 655 * the Querier. 655 * the Querier. 656 * 656 * 657 * The default value is (125 * USER_HZ). The 657 * The default value is (125 * USER_HZ). The minimum value is (1 * USER_HZ). 658 * 658 * 659 * @IFLA_BR_MCAST_QUERY_RESPONSE_INTVL 659 * @IFLA_BR_MCAST_QUERY_RESPONSE_INTVL 660 * The Max Response Time used to calculate t 660 * The Max Response Time used to calculate the Max Resp Code inserted 661 * into the periodic General Queries. 661 * into the periodic General Queries. 662 * 662 * 663 * The default value is (10 * USER_HZ). 663 * The default value is (10 * USER_HZ). 664 * 664 * 665 * @IFLA_BR_MCAST_STARTUP_QUERY_INTVL 665 * @IFLA_BR_MCAST_STARTUP_QUERY_INTVL 666 * The interval between queries in the start 666 * The interval between queries in the startup phase. 667 * 667 * 668 * The default value is (125 * USER_HZ) / 4. 668 * The default value is (125 * USER_HZ) / 4. The minimum value is (1 * USER_HZ). 669 * 669 * 670 * @IFLA_BR_NF_CALL_IPTABLES 670 * @IFLA_BR_NF_CALL_IPTABLES 671 * Enable (*NF_CALL_IPTABLES* > 0) or disabl 671 * Enable (*NF_CALL_IPTABLES* > 0) or disable (*NF_CALL_IPTABLES* == 0) 672 * iptables hooks on the bridge. 672 * iptables hooks on the bridge. 673 * 673 * 674 * The default value is 0 (disabled). 674 * The default value is 0 (disabled). 675 * 675 * 676 * @IFLA_BR_NF_CALL_IP6TABLES 676 * @IFLA_BR_NF_CALL_IP6TABLES 677 * Enable (*NF_CALL_IP6TABLES* > 0) or disab 677 * Enable (*NF_CALL_IP6TABLES* > 0) or disable (*NF_CALL_IP6TABLES* == 0) 678 * ip6tables hooks on the bridge. 678 * ip6tables hooks on the bridge. 679 * 679 * 680 * The default value is 0 (disabled). 680 * The default value is 0 (disabled). 681 * 681 * 682 * @IFLA_BR_NF_CALL_ARPTABLES 682 * @IFLA_BR_NF_CALL_ARPTABLES 683 * Enable (*NF_CALL_ARPTABLES* > 0) or disab 683 * Enable (*NF_CALL_ARPTABLES* > 0) or disable (*NF_CALL_ARPTABLES* == 0) 684 * arptables hooks on the bridge. 684 * arptables hooks on the bridge. 685 * 685 * 686 * The default value is 0 (disabled). 686 * The default value is 0 (disabled). 687 * 687 * 688 * @IFLA_BR_VLAN_DEFAULT_PVID 688 * @IFLA_BR_VLAN_DEFAULT_PVID 689 * VLAN ID applied to untagged and priority- 689 * VLAN ID applied to untagged and priority-tagged incoming packets. 690 * 690 * 691 * The default value is 1. Setting to the sp 691 * The default value is 1. Setting to the special value 0 makes all ports of 692 * this bridge not have a PVID by default, w 692 * this bridge not have a PVID by default, which means that they will 693 * not accept VLAN-untagged traffic. 693 * not accept VLAN-untagged traffic. 694 * 694 * 695 * @IFLA_BR_PAD 695 * @IFLA_BR_PAD 696 * Bridge attribute padding type for netlink 696 * Bridge attribute padding type for netlink message. 697 * 697 * 698 * @IFLA_BR_VLAN_STATS_ENABLED 698 * @IFLA_BR_VLAN_STATS_ENABLED 699 * Enable (*IFLA_BR_VLAN_STATS_ENABLED* == 1 699 * Enable (*IFLA_BR_VLAN_STATS_ENABLED* == 1) or disable 700 * (*IFLA_BR_VLAN_STATS_ENABLED* == 0) per-V 700 * (*IFLA_BR_VLAN_STATS_ENABLED* == 0) per-VLAN stats accounting. 701 * 701 * 702 * The default value is 0 (disabled). 702 * The default value is 0 (disabled). 703 * 703 * 704 * @IFLA_BR_MCAST_STATS_ENABLED 704 * @IFLA_BR_MCAST_STATS_ENABLED 705 * Enable (*IFLA_BR_MCAST_STATS_ENABLED* > 0 705 * Enable (*IFLA_BR_MCAST_STATS_ENABLED* > 0) or disable 706 * (*IFLA_BR_MCAST_STATS_ENABLED* == 0) mult 706 * (*IFLA_BR_MCAST_STATS_ENABLED* == 0) multicast (IGMP/MLD) stats 707 * accounting. 707 * accounting. 708 * 708 * 709 * The default value is 0 (disabled). 709 * The default value is 0 (disabled). 710 * 710 * 711 * @IFLA_BR_MCAST_IGMP_VERSION 711 * @IFLA_BR_MCAST_IGMP_VERSION 712 * Set the IGMP version. 712 * Set the IGMP version. 713 * 713 * 714 * The valid values are 2 and 3. The default 714 * The valid values are 2 and 3. The default value is 2. 715 * 715 * 716 * @IFLA_BR_MCAST_MLD_VERSION 716 * @IFLA_BR_MCAST_MLD_VERSION 717 * Set the MLD version. 717 * Set the MLD version. 718 * 718 * 719 * The valid values are 1 and 2. The default 719 * The valid values are 1 and 2. The default value is 1. 720 * 720 * 721 * @IFLA_BR_VLAN_STATS_PER_PORT 721 * @IFLA_BR_VLAN_STATS_PER_PORT 722 * Enable (*IFLA_BR_VLAN_STATS_PER_PORT* == 722 * Enable (*IFLA_BR_VLAN_STATS_PER_PORT* == 1) or disable 723 * (*IFLA_BR_VLAN_STATS_PER_PORT* == 0) per- 723 * (*IFLA_BR_VLAN_STATS_PER_PORT* == 0) per-VLAN per-port stats accounting. 724 * Can be changed only when there are no por 724 * Can be changed only when there are no port VLANs configured. 725 * 725 * 726 * The default value is 0 (disabled). 726 * The default value is 0 (disabled). 727 * 727 * 728 * @IFLA_BR_MULTI_BOOLOPT 728 * @IFLA_BR_MULTI_BOOLOPT 729 * The multi_boolopt is used to control new 729 * The multi_boolopt is used to control new boolean options to avoid adding 730 * new netlink attributes. You can look at ` 730 * new netlink attributes. You can look at ``enum br_boolopt_id`` for those 731 * options. 731 * options. 732 * 732 * 733 * @IFLA_BR_MCAST_QUERIER_STATE 733 * @IFLA_BR_MCAST_QUERIER_STATE 734 * Bridge mcast querier states, read only. 734 * Bridge mcast querier states, read only. 735 * 735 * 736 * @IFLA_BR_FDB_N_LEARNED 736 * @IFLA_BR_FDB_N_LEARNED 737 * The number of dynamically learned FDB ent 737 * The number of dynamically learned FDB entries for the current bridge, 738 * read only. 738 * read only. 739 * 739 * 740 * @IFLA_BR_FDB_MAX_LEARNED 740 * @IFLA_BR_FDB_MAX_LEARNED 741 * Set the number of max dynamically learned 741 * Set the number of max dynamically learned FDB entries for the current 742 * bridge. 742 * bridge. 743 */ 743 */ 744 enum { 744 enum { 745 IFLA_BR_UNSPEC, 745 IFLA_BR_UNSPEC, 746 IFLA_BR_FORWARD_DELAY, 746 IFLA_BR_FORWARD_DELAY, 747 IFLA_BR_HELLO_TIME, 747 IFLA_BR_HELLO_TIME, 748 IFLA_BR_MAX_AGE, 748 IFLA_BR_MAX_AGE, 749 IFLA_BR_AGEING_TIME, 749 IFLA_BR_AGEING_TIME, 750 IFLA_BR_STP_STATE, 750 IFLA_BR_STP_STATE, 751 IFLA_BR_PRIORITY, 751 IFLA_BR_PRIORITY, 752 IFLA_BR_VLAN_FILTERING, 752 IFLA_BR_VLAN_FILTERING, 753 IFLA_BR_VLAN_PROTOCOL, 753 IFLA_BR_VLAN_PROTOCOL, 754 IFLA_BR_GROUP_FWD_MASK, 754 IFLA_BR_GROUP_FWD_MASK, 755 IFLA_BR_ROOT_ID, 755 IFLA_BR_ROOT_ID, 756 IFLA_BR_BRIDGE_ID, 756 IFLA_BR_BRIDGE_ID, 757 IFLA_BR_ROOT_PORT, 757 IFLA_BR_ROOT_PORT, 758 IFLA_BR_ROOT_PATH_COST, 758 IFLA_BR_ROOT_PATH_COST, 759 IFLA_BR_TOPOLOGY_CHANGE, 759 IFLA_BR_TOPOLOGY_CHANGE, 760 IFLA_BR_TOPOLOGY_CHANGE_DETECTED, 760 IFLA_BR_TOPOLOGY_CHANGE_DETECTED, 761 IFLA_BR_HELLO_TIMER, 761 IFLA_BR_HELLO_TIMER, 762 IFLA_BR_TCN_TIMER, 762 IFLA_BR_TCN_TIMER, 763 IFLA_BR_TOPOLOGY_CHANGE_TIMER, 763 IFLA_BR_TOPOLOGY_CHANGE_TIMER, 764 IFLA_BR_GC_TIMER, 764 IFLA_BR_GC_TIMER, 765 IFLA_BR_GROUP_ADDR, 765 IFLA_BR_GROUP_ADDR, 766 IFLA_BR_FDB_FLUSH, 766 IFLA_BR_FDB_FLUSH, 767 IFLA_BR_MCAST_ROUTER, 767 IFLA_BR_MCAST_ROUTER, 768 IFLA_BR_MCAST_SNOOPING, 768 IFLA_BR_MCAST_SNOOPING, 769 IFLA_BR_MCAST_QUERY_USE_IFADDR, 769 IFLA_BR_MCAST_QUERY_USE_IFADDR, 770 IFLA_BR_MCAST_QUERIER, 770 IFLA_BR_MCAST_QUERIER, 771 IFLA_BR_MCAST_HASH_ELASTICITY, 771 IFLA_BR_MCAST_HASH_ELASTICITY, 772 IFLA_BR_MCAST_HASH_MAX, 772 IFLA_BR_MCAST_HASH_MAX, 773 IFLA_BR_MCAST_LAST_MEMBER_CNT, 773 IFLA_BR_MCAST_LAST_MEMBER_CNT, 774 IFLA_BR_MCAST_STARTUP_QUERY_CNT, 774 IFLA_BR_MCAST_STARTUP_QUERY_CNT, 775 IFLA_BR_MCAST_LAST_MEMBER_INTVL, 775 IFLA_BR_MCAST_LAST_MEMBER_INTVL, 776 IFLA_BR_MCAST_MEMBERSHIP_INTVL, 776 IFLA_BR_MCAST_MEMBERSHIP_INTVL, 777 IFLA_BR_MCAST_QUERIER_INTVL, 777 IFLA_BR_MCAST_QUERIER_INTVL, 778 IFLA_BR_MCAST_QUERY_INTVL, 778 IFLA_BR_MCAST_QUERY_INTVL, 779 IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, 779 IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, 780 IFLA_BR_MCAST_STARTUP_QUERY_INTVL, 780 IFLA_BR_MCAST_STARTUP_QUERY_INTVL, 781 IFLA_BR_NF_CALL_IPTABLES, 781 IFLA_BR_NF_CALL_IPTABLES, 782 IFLA_BR_NF_CALL_IP6TABLES, 782 IFLA_BR_NF_CALL_IP6TABLES, 783 IFLA_BR_NF_CALL_ARPTABLES, 783 IFLA_BR_NF_CALL_ARPTABLES, 784 IFLA_BR_VLAN_DEFAULT_PVID, 784 IFLA_BR_VLAN_DEFAULT_PVID, 785 IFLA_BR_PAD, 785 IFLA_BR_PAD, 786 IFLA_BR_VLAN_STATS_ENABLED, 786 IFLA_BR_VLAN_STATS_ENABLED, 787 IFLA_BR_MCAST_STATS_ENABLED, 787 IFLA_BR_MCAST_STATS_ENABLED, 788 IFLA_BR_MCAST_IGMP_VERSION, 788 IFLA_BR_MCAST_IGMP_VERSION, 789 IFLA_BR_MCAST_MLD_VERSION, 789 IFLA_BR_MCAST_MLD_VERSION, 790 IFLA_BR_VLAN_STATS_PER_PORT, 790 IFLA_BR_VLAN_STATS_PER_PORT, 791 IFLA_BR_MULTI_BOOLOPT, 791 IFLA_BR_MULTI_BOOLOPT, 792 IFLA_BR_MCAST_QUERIER_STATE, 792 IFLA_BR_MCAST_QUERIER_STATE, 793 IFLA_BR_FDB_N_LEARNED, 793 IFLA_BR_FDB_N_LEARNED, 794 IFLA_BR_FDB_MAX_LEARNED, 794 IFLA_BR_FDB_MAX_LEARNED, 795 __IFLA_BR_MAX, 795 __IFLA_BR_MAX, 796 }; 796 }; 797 797 798 #define IFLA_BR_MAX (__IFLA_BR_MAX - 1) 798 #define IFLA_BR_MAX (__IFLA_BR_MAX - 1) 799 799 800 struct ifla_bridge_id { 800 struct ifla_bridge_id { 801 __u8 prio[2]; 801 __u8 prio[2]; 802 __u8 addr[6]; /* ETH_ALEN */ 802 __u8 addr[6]; /* ETH_ALEN */ 803 }; 803 }; 804 804 805 /** 805 /** 806 * DOC: Bridge mode enum definition 806 * DOC: Bridge mode enum definition 807 * 807 * 808 * @BRIDGE_MODE_HAIRPIN 808 * @BRIDGE_MODE_HAIRPIN 809 * Controls whether traffic may be sent back 809 * Controls whether traffic may be sent back out of the port on which it 810 * was received. This option is also called 810 * was received. This option is also called reflective relay mode, and is 811 * used to support basic VEPA (Virtual Ether 811 * used to support basic VEPA (Virtual Ethernet Port Aggregator) 812 * capabilities. By default, this flag is tu 812 * capabilities. By default, this flag is turned off and the bridge will 813 * not forward traffic back out of the recei 813 * not forward traffic back out of the receiving port. 814 */ 814 */ 815 enum { 815 enum { 816 BRIDGE_MODE_UNSPEC, 816 BRIDGE_MODE_UNSPEC, 817 BRIDGE_MODE_HAIRPIN, 817 BRIDGE_MODE_HAIRPIN, 818 }; 818 }; 819 819 820 /** 820 /** 821 * DOC: Bridge port enum definition 821 * DOC: Bridge port enum definition 822 * 822 * 823 * @IFLA_BRPORT_STATE 823 * @IFLA_BRPORT_STATE 824 * The operation state of the port. Here are 824 * The operation state of the port. Here are the valid values. 825 * 825 * 826 * * 0 - port is in STP *DISABLED* state. 826 * * 0 - port is in STP *DISABLED* state. Make this port completely 827 * inactive for STP. This is also called 827 * inactive for STP. This is also called BPDU filter and could be used 828 * to disable STP on an untrusted port, 828 * to disable STP on an untrusted port, like a leaf virtual device. 829 * The traffic forwarding is also stoppe 829 * The traffic forwarding is also stopped on this port. 830 * * 1 - port is in STP *LISTENING* state. 830 * * 1 - port is in STP *LISTENING* state. Only valid if STP is enabled 831 * on the bridge. In this state the port 831 * on the bridge. In this state the port listens for STP BPDUs and 832 * drops all other traffic frames. 832 * drops all other traffic frames. 833 * * 2 - port is in STP *LEARNING* state. 833 * * 2 - port is in STP *LEARNING* state. Only valid if STP is enabled on 834 * the bridge. In this state the port wi 834 * the bridge. In this state the port will accept traffic only for the 835 * purpose of updating MAC address table 835 * purpose of updating MAC address tables. 836 * * 3 - port is in STP *FORWARDING* state 836 * * 3 - port is in STP *FORWARDING* state. Port is fully active. 837 * * 4 - port is in STP *BLOCKING* state. 837 * * 4 - port is in STP *BLOCKING* state. Only valid if STP is enabled on 838 * the bridge. This state is used during 838 * the bridge. This state is used during the STP election process. 839 * In this state, port will only process 839 * In this state, port will only process STP BPDUs. 840 * 840 * 841 * @IFLA_BRPORT_PRIORITY 841 * @IFLA_BRPORT_PRIORITY 842 * The STP port priority. The valid values a 842 * The STP port priority. The valid values are between 0 and 255. 843 * 843 * 844 * @IFLA_BRPORT_COST 844 * @IFLA_BRPORT_COST 845 * The STP path cost of the port. The valid 845 * The STP path cost of the port. The valid values are between 1 and 65535. 846 * 846 * 847 * @IFLA_BRPORT_MODE 847 * @IFLA_BRPORT_MODE 848 * Set the bridge port mode. See *BRIDGE_MOD 848 * Set the bridge port mode. See *BRIDGE_MODE_HAIRPIN* for more details. 849 * 849 * 850 * @IFLA_BRPORT_GUARD 850 * @IFLA_BRPORT_GUARD 851 * Controls whether STP BPDUs will be proces 851 * Controls whether STP BPDUs will be processed by the bridge port. By 852 * default, the flag is turned off to allow 852 * default, the flag is turned off to allow BPDU processing. Turning this 853 * flag on will disable the bridge port if a 853 * flag on will disable the bridge port if a STP BPDU packet is received. 854 * 854 * 855 * If the bridge has Spanning Tree enabled, 855 * If the bridge has Spanning Tree enabled, hostile devices on the network 856 * may send BPDU on a port and cause network 856 * may send BPDU on a port and cause network failure. Setting *guard on* 857 * will detect and stop this by disabling th 857 * will detect and stop this by disabling the port. The port will be 858 * restarted if the link is brought down, or 858 * restarted if the link is brought down, or removed and reattached. 859 * 859 * 860 * @IFLA_BRPORT_PROTECT 860 * @IFLA_BRPORT_PROTECT 861 * Controls whether a given port is allowed 861 * Controls whether a given port is allowed to become a root port or not. 862 * Only used when STP is enabled on the brid 862 * Only used when STP is enabled on the bridge. By default the flag is off. 863 * 863 * 864 * This feature is also called root port gua 864 * This feature is also called root port guard. If BPDU is received from a 865 * leaf (edge) port, it should not be electe 865 * leaf (edge) port, it should not be elected as root port. This could 866 * be used if using STP on a bridge and the 866 * be used if using STP on a bridge and the downstream bridges are not fully 867 * trusted; this prevents a hostile guest fr 867 * trusted; this prevents a hostile guest from rerouting traffic. 868 * 868 * 869 * @IFLA_BRPORT_FAST_LEAVE 869 * @IFLA_BRPORT_FAST_LEAVE 870 * This flag allows the bridge to immediatel 870 * This flag allows the bridge to immediately stop multicast traffic 871 * forwarding on a port that receives an IGM 871 * forwarding on a port that receives an IGMP Leave message. It is only used 872 * when IGMP snooping is enabled on the brid 872 * when IGMP snooping is enabled on the bridge. By default the flag is off. 873 * 873 * 874 * @IFLA_BRPORT_LEARNING 874 * @IFLA_BRPORT_LEARNING 875 * Controls whether a given port will learn 875 * Controls whether a given port will learn *source* MAC addresses from 876 * received traffic or not. Also controls wh 876 * received traffic or not. Also controls whether dynamic FDB entries 877 * (which can also be added by software) wil 877 * (which can also be added by software) will be refreshed by incoming 878 * traffic. By default this flag is on. 878 * traffic. By default this flag is on. 879 * 879 * 880 * @IFLA_BRPORT_UNICAST_FLOOD 880 * @IFLA_BRPORT_UNICAST_FLOOD 881 * Controls whether unicast traffic for whic 881 * Controls whether unicast traffic for which there is no FDB entry will 882 * be flooded towards this port. By default 882 * be flooded towards this port. By default this flag is on. 883 * 883 * 884 * @IFLA_BRPORT_PROXYARP 884 * @IFLA_BRPORT_PROXYARP 885 * Enable proxy ARP on this port. 885 * Enable proxy ARP on this port. 886 * 886 * 887 * @IFLA_BRPORT_LEARNING_SYNC 887 * @IFLA_BRPORT_LEARNING_SYNC 888 * Controls whether a given port will sync M 888 * Controls whether a given port will sync MAC addresses learned on device 889 * port to bridge FDB. 889 * port to bridge FDB. 890 * 890 * 891 * @IFLA_BRPORT_PROXYARP_WIFI 891 * @IFLA_BRPORT_PROXYARP_WIFI 892 * Enable proxy ARP on this port which meets 892 * Enable proxy ARP on this port which meets extended requirements by 893 * IEEE 802.11 and Hotspot 2.0 specification 893 * IEEE 802.11 and Hotspot 2.0 specifications. 894 * 894 * 895 * @IFLA_BRPORT_ROOT_ID 895 * @IFLA_BRPORT_ROOT_ID 896 * 896 * 897 * @IFLA_BRPORT_BRIDGE_ID 897 * @IFLA_BRPORT_BRIDGE_ID 898 * 898 * 899 * @IFLA_BRPORT_DESIGNATED_PORT 899 * @IFLA_BRPORT_DESIGNATED_PORT 900 * 900 * 901 * @IFLA_BRPORT_DESIGNATED_COST 901 * @IFLA_BRPORT_DESIGNATED_COST 902 * 902 * 903 * @IFLA_BRPORT_ID 903 * @IFLA_BRPORT_ID 904 * 904 * 905 * @IFLA_BRPORT_NO 905 * @IFLA_BRPORT_NO 906 * 906 * 907 * @IFLA_BRPORT_TOPOLOGY_CHANGE_ACK 907 * @IFLA_BRPORT_TOPOLOGY_CHANGE_ACK 908 * 908 * 909 * @IFLA_BRPORT_CONFIG_PENDING 909 * @IFLA_BRPORT_CONFIG_PENDING 910 * 910 * 911 * @IFLA_BRPORT_MESSAGE_AGE_TIMER 911 * @IFLA_BRPORT_MESSAGE_AGE_TIMER 912 * 912 * 913 * @IFLA_BRPORT_FORWARD_DELAY_TIMER 913 * @IFLA_BRPORT_FORWARD_DELAY_TIMER 914 * 914 * 915 * @IFLA_BRPORT_HOLD_TIMER 915 * @IFLA_BRPORT_HOLD_TIMER 916 * 916 * 917 * @IFLA_BRPORT_FLUSH 917 * @IFLA_BRPORT_FLUSH 918 * Flush bridge ports' fdb dynamic entries. 918 * Flush bridge ports' fdb dynamic entries. 919 * 919 * 920 * @IFLA_BRPORT_MULTICAST_ROUTER 920 * @IFLA_BRPORT_MULTICAST_ROUTER 921 * Configure the port's multicast router pre 921 * Configure the port's multicast router presence. A port with 922 * a multicast router will receive all multi 922 * a multicast router will receive all multicast traffic. 923 * The valid values are: 923 * The valid values are: 924 * 924 * 925 * * 0 disable multicast routers on this p 925 * * 0 disable multicast routers on this port 926 * * 1 let the system detect the presence 926 * * 1 let the system detect the presence of routers (default) 927 * * 2 permanently enable multicast traffi 927 * * 2 permanently enable multicast traffic forwarding on this port 928 * * 3 enable multicast routers temporaril 928 * * 3 enable multicast routers temporarily on this port, not depending 929 * on incoming queries. 929 * on incoming queries. 930 * 930 * 931 * @IFLA_BRPORT_PAD 931 * @IFLA_BRPORT_PAD 932 * 932 * 933 * @IFLA_BRPORT_MCAST_FLOOD 933 * @IFLA_BRPORT_MCAST_FLOOD 934 * Controls whether a given port will flood 934 * Controls whether a given port will flood multicast traffic for which 935 * there is no MDB entry. By default this fl 935 * there is no MDB entry. By default this flag is on. 936 * 936 * 937 * @IFLA_BRPORT_MCAST_TO_UCAST 937 * @IFLA_BRPORT_MCAST_TO_UCAST 938 * Controls whether a given port will replic 938 * Controls whether a given port will replicate packets using unicast 939 * instead of multicast. By default this fla 939 * instead of multicast. By default this flag is off. 940 * 940 * 941 * This is done by copying the packet per ho 941 * This is done by copying the packet per host and changing the multicast 942 * destination MAC to a unicast one accordin 942 * destination MAC to a unicast one accordingly. 943 * 943 * 944 * *mcast_to_unicast* works on top of the mu 944 * *mcast_to_unicast* works on top of the multicast snooping feature of the 945 * bridge. Which means unicast copies are on 945 * bridge. Which means unicast copies are only delivered to hosts which 946 * are interested in unicast and signaled th 946 * are interested in unicast and signaled this via IGMP/MLD reports previously. 947 * 947 * 948 * This feature is intended for interface ty 948 * This feature is intended for interface types which have a more reliable 949 * and/or efficient way to deliver unicast p 949 * and/or efficient way to deliver unicast packets than broadcast ones 950 * (e.g. WiFi). 950 * (e.g. WiFi). 951 * 951 * 952 * However, it should only be enabled on int 952 * However, it should only be enabled on interfaces where no IGMPv2/MLDv1 953 * report suppression takes place. IGMP/MLD 953 * report suppression takes place. IGMP/MLD report suppression issue is 954 * usually overcome by the network daemon (s 954 * usually overcome by the network daemon (supplicant) enabling AP isolation 955 * and by that separating all STAs. 955 * and by that separating all STAs. 956 * 956 * 957 * Delivery of STA-to-STA IP multicast is ma 957 * Delivery of STA-to-STA IP multicast is made possible again by enabling 958 * and utilizing the bridge hairpin mode, wh 958 * and utilizing the bridge hairpin mode, which considers the incoming port 959 * as a potential outgoing port, too (see *B 959 * as a potential outgoing port, too (see *BRIDGE_MODE_HAIRPIN* option). 960 * Hairpin mode is performed after multicast 960 * Hairpin mode is performed after multicast snooping, therefore leading 961 * to only deliver reports to STAs running a 961 * to only deliver reports to STAs running a multicast router. 962 * 962 * 963 * @IFLA_BRPORT_VLAN_TUNNEL 963 * @IFLA_BRPORT_VLAN_TUNNEL 964 * Controls whether vlan to tunnel mapping i 964 * Controls whether vlan to tunnel mapping is enabled on the port. 965 * By default this flag is off. 965 * By default this flag is off. 966 * 966 * 967 * @IFLA_BRPORT_BCAST_FLOOD 967 * @IFLA_BRPORT_BCAST_FLOOD 968 * Controls flooding of broadcast traffic on 968 * Controls flooding of broadcast traffic on the given port. By default 969 * this flag is on. 969 * this flag is on. 970 * 970 * 971 * @IFLA_BRPORT_GROUP_FWD_MASK 971 * @IFLA_BRPORT_GROUP_FWD_MASK 972 * Set the group forward mask. This is a bit 972 * Set the group forward mask. This is a bitmask that is applied to 973 * decide whether to forward incoming frames 973 * decide whether to forward incoming frames destined to link-local 974 * addresses. The addresses of the form are 974 * addresses. The addresses of the form are 01:80:C2:00:00:0X (defaults 975 * to 0, which means the bridge does not for 975 * to 0, which means the bridge does not forward any link-local frames 976 * coming on this port). 976 * coming on this port). 977 * 977 * 978 * @IFLA_BRPORT_NEIGH_SUPPRESS 978 * @IFLA_BRPORT_NEIGH_SUPPRESS 979 * Controls whether neighbor discovery (arp 979 * Controls whether neighbor discovery (arp and nd) proxy and suppression 980 * is enabled on the port. By default this f 980 * is enabled on the port. By default this flag is off. 981 * 981 * 982 * @IFLA_BRPORT_ISOLATED 982 * @IFLA_BRPORT_ISOLATED 983 * Controls whether a given port will be iso 983 * Controls whether a given port will be isolated, which means it will be 984 * able to communicate with non-isolated por 984 * able to communicate with non-isolated ports only. By default this 985 * flag is off. 985 * flag is off. 986 * 986 * 987 * @IFLA_BRPORT_BACKUP_PORT 987 * @IFLA_BRPORT_BACKUP_PORT 988 * Set a backup port. If the port loses carr 988 * Set a backup port. If the port loses carrier all traffic will be 989 * redirected to the configured backup port. 989 * redirected to the configured backup port. Set the value to 0 to disable 990 * it. 990 * it. 991 * 991 * 992 * @IFLA_BRPORT_MRP_RING_OPEN 992 * @IFLA_BRPORT_MRP_RING_OPEN 993 * 993 * 994 * @IFLA_BRPORT_MRP_IN_OPEN 994 * @IFLA_BRPORT_MRP_IN_OPEN 995 * 995 * 996 * @IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT 996 * @IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT 997 * The number of per-port EHT hosts limit. T 997 * The number of per-port EHT hosts limit. The default value is 512. 998 * Setting to 0 is not allowed. 998 * Setting to 0 is not allowed. 999 * 999 * 1000 * @IFLA_BRPORT_MCAST_EHT_HOSTS_CNT 1000 * @IFLA_BRPORT_MCAST_EHT_HOSTS_CNT 1001 * The current number of tracked hosts, rea 1001 * The current number of tracked hosts, read only. 1002 * 1002 * 1003 * @IFLA_BRPORT_LOCKED 1003 * @IFLA_BRPORT_LOCKED 1004 * Controls whether a port will be locked, 1004 * Controls whether a port will be locked, meaning that hosts behind the 1005 * port will not be able to communicate thr 1005 * port will not be able to communicate through the port unless an FDB 1006 * entry with the unit's MAC address is in 1006 * entry with the unit's MAC address is in the FDB. The common use case is 1007 * that hosts are allowed access through au 1007 * that hosts are allowed access through authentication with the IEEE 802.1X 1008 * protocol or based on whitelists. By defa 1008 * protocol or based on whitelists. By default this flag is off. 1009 * 1009 * 1010 * Please note that secure 802.1X deploymen 1010 * Please note that secure 802.1X deployments should always use the 1011 * *BR_BOOLOPT_NO_LL_LEARN* flag, to not pe 1011 * *BR_BOOLOPT_NO_LL_LEARN* flag, to not permit the bridge to populate its 1012 * FDB based on link-local (EAPOL) traffic 1012 * FDB based on link-local (EAPOL) traffic received on the port. 1013 * 1013 * 1014 * @IFLA_BRPORT_MAB 1014 * @IFLA_BRPORT_MAB 1015 * Controls whether a port will use MAC Aut 1015 * Controls whether a port will use MAC Authentication Bypass (MAB), a 1016 * technique through which select MAC addre 1016 * technique through which select MAC addresses may be allowed on a locked 1017 * port, without using 802.1X authenticatio 1017 * port, without using 802.1X authentication. Packets with an unknown source 1018 * MAC address generates a "locked" FDB ent 1018 * MAC address generates a "locked" FDB entry on the incoming bridge port. 1019 * The common use case is for user space to 1019 * The common use case is for user space to react to these bridge FDB 1020 * notifications and optionally replace the 1020 * notifications and optionally replace the locked FDB entry with a normal 1021 * one, allowing traffic to pass for whitel 1021 * one, allowing traffic to pass for whitelisted MAC addresses. 1022 * 1022 * 1023 * Setting this flag also requires *IFLA_BR 1023 * Setting this flag also requires *IFLA_BRPORT_LOCKED* and 1024 * *IFLA_BRPORT_LEARNING*. *IFLA_BRPORT_LOC 1024 * *IFLA_BRPORT_LEARNING*. *IFLA_BRPORT_LOCKED* ensures that unauthorized 1025 * data packets are dropped, and *IFLA_BRPO 1025 * data packets are dropped, and *IFLA_BRPORT_LEARNING* allows the dynamic 1026 * FDB entries installed by user space (as 1026 * FDB entries installed by user space (as replacements for the locked FDB 1027 * entries) to be refreshed and/or aged out 1027 * entries) to be refreshed and/or aged out. 1028 * 1028 * 1029 * @IFLA_BRPORT_MCAST_N_GROUPS 1029 * @IFLA_BRPORT_MCAST_N_GROUPS 1030 * 1030 * 1031 * @IFLA_BRPORT_MCAST_MAX_GROUPS 1031 * @IFLA_BRPORT_MCAST_MAX_GROUPS 1032 * Sets the maximum number of MDB entries t 1032 * Sets the maximum number of MDB entries that can be registered for a 1033 * given port. Attempts to register more MD 1033 * given port. Attempts to register more MDB entries at the port than this 1034 * limit allows will be rejected, whether t 1034 * limit allows will be rejected, whether they are done through netlink 1035 * (e.g. the bridge tool), or IGMP or MLD m 1035 * (e.g. the bridge tool), or IGMP or MLD membership reports. Setting a 1036 * limit of 0 disables the limit. The defau 1036 * limit of 0 disables the limit. The default value is 0. 1037 * 1037 * 1038 * @IFLA_BRPORT_NEIGH_VLAN_SUPPRESS 1038 * @IFLA_BRPORT_NEIGH_VLAN_SUPPRESS 1039 * Controls whether neighbor discovery (arp 1039 * Controls whether neighbor discovery (arp and nd) proxy and suppression is 1040 * enabled for a given port. By default thi 1040 * enabled for a given port. By default this flag is off. 1041 * 1041 * 1042 * Note that this option only takes effect 1042 * Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS* 1043 * is enabled for a given port. 1043 * is enabled for a given port. 1044 * 1044 * 1045 * @IFLA_BRPORT_BACKUP_NHID 1045 * @IFLA_BRPORT_BACKUP_NHID 1046 * The FDB nexthop object ID to attach to p 1046 * The FDB nexthop object ID to attach to packets being redirected to a 1047 * backup port that has VLAN tunnel mapping 1047 * backup port that has VLAN tunnel mapping enabled (via the 1048 * *IFLA_BRPORT_VLAN_TUNNEL* option). Setti 1048 * *IFLA_BRPORT_VLAN_TUNNEL* option). Setting a value of 0 (default) has 1049 * the effect of not attaching any ID. 1049 * the effect of not attaching any ID. 1050 */ 1050 */ 1051 enum { 1051 enum { 1052 IFLA_BRPORT_UNSPEC, 1052 IFLA_BRPORT_UNSPEC, 1053 IFLA_BRPORT_STATE, /* Spanning t 1053 IFLA_BRPORT_STATE, /* Spanning tree state */ 1054 IFLA_BRPORT_PRIORITY, /* " 1054 IFLA_BRPORT_PRIORITY, /* " priority */ 1055 IFLA_BRPORT_COST, /* " 1055 IFLA_BRPORT_COST, /* " cost */ 1056 IFLA_BRPORT_MODE, /* mode (hair 1056 IFLA_BRPORT_MODE, /* mode (hairpin) */ 1057 IFLA_BRPORT_GUARD, /* bpdu guard 1057 IFLA_BRPORT_GUARD, /* bpdu guard */ 1058 IFLA_BRPORT_PROTECT, /* root port 1058 IFLA_BRPORT_PROTECT, /* root port protection */ 1059 IFLA_BRPORT_FAST_LEAVE, /* multicast 1059 IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave */ 1060 IFLA_BRPORT_LEARNING, /* mac learni 1060 IFLA_BRPORT_LEARNING, /* mac learning */ 1061 IFLA_BRPORT_UNICAST_FLOOD, /* flood u 1061 IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */ 1062 IFLA_BRPORT_PROXYARP, /* proxy ARP 1062 IFLA_BRPORT_PROXYARP, /* proxy ARP */ 1063 IFLA_BRPORT_LEARNING_SYNC, /* mac lea 1063 IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */ 1064 IFLA_BRPORT_PROXYARP_WIFI, /* proxy A 1064 IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */ 1065 IFLA_BRPORT_ROOT_ID, /* designated 1065 IFLA_BRPORT_ROOT_ID, /* designated root */ 1066 IFLA_BRPORT_BRIDGE_ID, /* designated 1066 IFLA_BRPORT_BRIDGE_ID, /* designated bridge */ 1067 IFLA_BRPORT_DESIGNATED_PORT, 1067 IFLA_BRPORT_DESIGNATED_PORT, 1068 IFLA_BRPORT_DESIGNATED_COST, 1068 IFLA_BRPORT_DESIGNATED_COST, 1069 IFLA_BRPORT_ID, 1069 IFLA_BRPORT_ID, 1070 IFLA_BRPORT_NO, 1070 IFLA_BRPORT_NO, 1071 IFLA_BRPORT_TOPOLOGY_CHANGE_ACK, 1071 IFLA_BRPORT_TOPOLOGY_CHANGE_ACK, 1072 IFLA_BRPORT_CONFIG_PENDING, 1072 IFLA_BRPORT_CONFIG_PENDING, 1073 IFLA_BRPORT_MESSAGE_AGE_TIMER, 1073 IFLA_BRPORT_MESSAGE_AGE_TIMER, 1074 IFLA_BRPORT_FORWARD_DELAY_TIMER, 1074 IFLA_BRPORT_FORWARD_DELAY_TIMER, 1075 IFLA_BRPORT_HOLD_TIMER, 1075 IFLA_BRPORT_HOLD_TIMER, 1076 IFLA_BRPORT_FLUSH, 1076 IFLA_BRPORT_FLUSH, 1077 IFLA_BRPORT_MULTICAST_ROUTER, 1077 IFLA_BRPORT_MULTICAST_ROUTER, 1078 IFLA_BRPORT_PAD, 1078 IFLA_BRPORT_PAD, 1079 IFLA_BRPORT_MCAST_FLOOD, 1079 IFLA_BRPORT_MCAST_FLOOD, 1080 IFLA_BRPORT_MCAST_TO_UCAST, 1080 IFLA_BRPORT_MCAST_TO_UCAST, 1081 IFLA_BRPORT_VLAN_TUNNEL, 1081 IFLA_BRPORT_VLAN_TUNNEL, 1082 IFLA_BRPORT_BCAST_FLOOD, 1082 IFLA_BRPORT_BCAST_FLOOD, 1083 IFLA_BRPORT_GROUP_FWD_MASK, 1083 IFLA_BRPORT_GROUP_FWD_MASK, 1084 IFLA_BRPORT_NEIGH_SUPPRESS, 1084 IFLA_BRPORT_NEIGH_SUPPRESS, 1085 IFLA_BRPORT_ISOLATED, 1085 IFLA_BRPORT_ISOLATED, 1086 IFLA_BRPORT_BACKUP_PORT, 1086 IFLA_BRPORT_BACKUP_PORT, 1087 IFLA_BRPORT_MRP_RING_OPEN, 1087 IFLA_BRPORT_MRP_RING_OPEN, 1088 IFLA_BRPORT_MRP_IN_OPEN, 1088 IFLA_BRPORT_MRP_IN_OPEN, 1089 IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT, 1089 IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT, 1090 IFLA_BRPORT_MCAST_EHT_HOSTS_CNT, 1090 IFLA_BRPORT_MCAST_EHT_HOSTS_CNT, 1091 IFLA_BRPORT_LOCKED, 1091 IFLA_BRPORT_LOCKED, 1092 IFLA_BRPORT_MAB, 1092 IFLA_BRPORT_MAB, 1093 IFLA_BRPORT_MCAST_N_GROUPS, 1093 IFLA_BRPORT_MCAST_N_GROUPS, 1094 IFLA_BRPORT_MCAST_MAX_GROUPS, 1094 IFLA_BRPORT_MCAST_MAX_GROUPS, 1095 IFLA_BRPORT_NEIGH_VLAN_SUPPRESS, 1095 IFLA_BRPORT_NEIGH_VLAN_SUPPRESS, 1096 IFLA_BRPORT_BACKUP_NHID, 1096 IFLA_BRPORT_BACKUP_NHID, 1097 __IFLA_BRPORT_MAX 1097 __IFLA_BRPORT_MAX 1098 }; 1098 }; 1099 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1099 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) 1100 1100 1101 struct ifla_cacheinfo { 1101 struct ifla_cacheinfo { 1102 __u32 max_reasm_len; 1102 __u32 max_reasm_len; 1103 __u32 tstamp; /* ipv6Interf 1103 __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ 1104 __u32 reachable_time; 1104 __u32 reachable_time; 1105 __u32 retrans_time; 1105 __u32 retrans_time; 1106 }; 1106 }; 1107 1107 1108 enum { 1108 enum { 1109 IFLA_INFO_UNSPEC, 1109 IFLA_INFO_UNSPEC, 1110 IFLA_INFO_KIND, 1110 IFLA_INFO_KIND, 1111 IFLA_INFO_DATA, 1111 IFLA_INFO_DATA, 1112 IFLA_INFO_XSTATS, 1112 IFLA_INFO_XSTATS, 1113 IFLA_INFO_SLAVE_KIND, 1113 IFLA_INFO_SLAVE_KIND, 1114 IFLA_INFO_SLAVE_DATA, 1114 IFLA_INFO_SLAVE_DATA, 1115 __IFLA_INFO_MAX, 1115 __IFLA_INFO_MAX, 1116 }; 1116 }; 1117 1117 1118 #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1) 1118 #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1) 1119 1119 1120 /* VLAN section */ 1120 /* VLAN section */ 1121 1121 1122 enum { 1122 enum { 1123 IFLA_VLAN_UNSPEC, 1123 IFLA_VLAN_UNSPEC, 1124 IFLA_VLAN_ID, 1124 IFLA_VLAN_ID, 1125 IFLA_VLAN_FLAGS, 1125 IFLA_VLAN_FLAGS, 1126 IFLA_VLAN_EGRESS_QOS, 1126 IFLA_VLAN_EGRESS_QOS, 1127 IFLA_VLAN_INGRESS_QOS, 1127 IFLA_VLAN_INGRESS_QOS, 1128 IFLA_VLAN_PROTOCOL, 1128 IFLA_VLAN_PROTOCOL, 1129 __IFLA_VLAN_MAX, 1129 __IFLA_VLAN_MAX, 1130 }; 1130 }; 1131 1131 1132 #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1) 1132 #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1) 1133 1133 1134 struct ifla_vlan_flags { 1134 struct ifla_vlan_flags { 1135 __u32 flags; 1135 __u32 flags; 1136 __u32 mask; 1136 __u32 mask; 1137 }; 1137 }; 1138 1138 1139 enum { 1139 enum { 1140 IFLA_VLAN_QOS_UNSPEC, 1140 IFLA_VLAN_QOS_UNSPEC, 1141 IFLA_VLAN_QOS_MAPPING, 1141 IFLA_VLAN_QOS_MAPPING, 1142 __IFLA_VLAN_QOS_MAX 1142 __IFLA_VLAN_QOS_MAX 1143 }; 1143 }; 1144 1144 1145 #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_ 1145 #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) 1146 1146 1147 struct ifla_vlan_qos_mapping { 1147 struct ifla_vlan_qos_mapping { 1148 __u32 from; 1148 __u32 from; 1149 __u32 to; 1149 __u32 to; 1150 }; 1150 }; 1151 1151 1152 /* MACVLAN section */ 1152 /* MACVLAN section */ 1153 enum { 1153 enum { 1154 IFLA_MACVLAN_UNSPEC, 1154 IFLA_MACVLAN_UNSPEC, 1155 IFLA_MACVLAN_MODE, 1155 IFLA_MACVLAN_MODE, 1156 IFLA_MACVLAN_FLAGS, 1156 IFLA_MACVLAN_FLAGS, 1157 IFLA_MACVLAN_MACADDR_MODE, 1157 IFLA_MACVLAN_MACADDR_MODE, 1158 IFLA_MACVLAN_MACADDR, 1158 IFLA_MACVLAN_MACADDR, 1159 IFLA_MACVLAN_MACADDR_DATA, 1159 IFLA_MACVLAN_MACADDR_DATA, 1160 IFLA_MACVLAN_MACADDR_COUNT, 1160 IFLA_MACVLAN_MACADDR_COUNT, 1161 IFLA_MACVLAN_BC_QUEUE_LEN, 1161 IFLA_MACVLAN_BC_QUEUE_LEN, 1162 IFLA_MACVLAN_BC_QUEUE_LEN_USED, 1162 IFLA_MACVLAN_BC_QUEUE_LEN_USED, 1163 IFLA_MACVLAN_BC_CUTOFF, 1163 IFLA_MACVLAN_BC_CUTOFF, 1164 __IFLA_MACVLAN_MAX, 1164 __IFLA_MACVLAN_MAX, 1165 }; 1165 }; 1166 1166 1167 #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX 1167 #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1) 1168 1168 1169 enum macvlan_mode { 1169 enum macvlan_mode { 1170 MACVLAN_MODE_PRIVATE = 1, /* don't ta 1170 MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ 1171 MACVLAN_MODE_VEPA = 2, /* talk to 1171 MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ 1172 MACVLAN_MODE_BRIDGE = 4, /* talk to 1172 MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ 1173 MACVLAN_MODE_PASSTHRU = 8,/* take ove 1173 MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ 1174 MACVLAN_MODE_SOURCE = 16,/* use sour 1174 MACVLAN_MODE_SOURCE = 16,/* use source MAC address list to assign */ 1175 }; 1175 }; 1176 1176 1177 enum macvlan_macaddr_mode { 1177 enum macvlan_macaddr_mode { 1178 MACVLAN_MACADDR_ADD, 1178 MACVLAN_MACADDR_ADD, 1179 MACVLAN_MACADDR_DEL, 1179 MACVLAN_MACADDR_DEL, 1180 MACVLAN_MACADDR_FLUSH, 1180 MACVLAN_MACADDR_FLUSH, 1181 MACVLAN_MACADDR_SET, 1181 MACVLAN_MACADDR_SET, 1182 }; 1182 }; 1183 1183 1184 #define MACVLAN_FLAG_NOPROMISC 1 1184 #define MACVLAN_FLAG_NOPROMISC 1 1185 #define MACVLAN_FLAG_NODST 2 /* skip dst 1185 #define MACVLAN_FLAG_NODST 2 /* skip dst macvlan if matching src macvlan */ 1186 1186 1187 /* VRF section */ 1187 /* VRF section */ 1188 enum { 1188 enum { 1189 IFLA_VRF_UNSPEC, 1189 IFLA_VRF_UNSPEC, 1190 IFLA_VRF_TABLE, 1190 IFLA_VRF_TABLE, 1191 __IFLA_VRF_MAX 1191 __IFLA_VRF_MAX 1192 }; 1192 }; 1193 1193 1194 #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1) 1194 #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1) 1195 1195 1196 enum { 1196 enum { 1197 IFLA_VRF_PORT_UNSPEC, 1197 IFLA_VRF_PORT_UNSPEC, 1198 IFLA_VRF_PORT_TABLE, 1198 IFLA_VRF_PORT_TABLE, 1199 __IFLA_VRF_PORT_MAX 1199 __IFLA_VRF_PORT_MAX 1200 }; 1200 }; 1201 1201 1202 #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MA 1202 #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1) 1203 1203 1204 /* MACSEC section */ 1204 /* MACSEC section */ 1205 enum { 1205 enum { 1206 IFLA_MACSEC_UNSPEC, 1206 IFLA_MACSEC_UNSPEC, 1207 IFLA_MACSEC_SCI, 1207 IFLA_MACSEC_SCI, 1208 IFLA_MACSEC_PORT, 1208 IFLA_MACSEC_PORT, 1209 IFLA_MACSEC_ICV_LEN, 1209 IFLA_MACSEC_ICV_LEN, 1210 IFLA_MACSEC_CIPHER_SUITE, 1210 IFLA_MACSEC_CIPHER_SUITE, 1211 IFLA_MACSEC_WINDOW, 1211 IFLA_MACSEC_WINDOW, 1212 IFLA_MACSEC_ENCODING_SA, 1212 IFLA_MACSEC_ENCODING_SA, 1213 IFLA_MACSEC_ENCRYPT, 1213 IFLA_MACSEC_ENCRYPT, 1214 IFLA_MACSEC_PROTECT, 1214 IFLA_MACSEC_PROTECT, 1215 IFLA_MACSEC_INC_SCI, 1215 IFLA_MACSEC_INC_SCI, 1216 IFLA_MACSEC_ES, 1216 IFLA_MACSEC_ES, 1217 IFLA_MACSEC_SCB, 1217 IFLA_MACSEC_SCB, 1218 IFLA_MACSEC_REPLAY_PROTECT, 1218 IFLA_MACSEC_REPLAY_PROTECT, 1219 IFLA_MACSEC_VALIDATION, 1219 IFLA_MACSEC_VALIDATION, 1220 IFLA_MACSEC_PAD, 1220 IFLA_MACSEC_PAD, 1221 IFLA_MACSEC_OFFLOAD, 1221 IFLA_MACSEC_OFFLOAD, 1222 __IFLA_MACSEC_MAX, 1222 __IFLA_MACSEC_MAX, 1223 }; 1223 }; 1224 1224 1225 #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1225 #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1) 1226 1226 1227 /* XFRM section */ 1227 /* XFRM section */ 1228 enum { 1228 enum { 1229 IFLA_XFRM_UNSPEC, 1229 IFLA_XFRM_UNSPEC, 1230 IFLA_XFRM_LINK, 1230 IFLA_XFRM_LINK, 1231 IFLA_XFRM_IF_ID, 1231 IFLA_XFRM_IF_ID, 1232 IFLA_XFRM_COLLECT_METADATA, 1232 IFLA_XFRM_COLLECT_METADATA, 1233 __IFLA_XFRM_MAX 1233 __IFLA_XFRM_MAX 1234 }; 1234 }; 1235 1235 1236 #define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1) 1236 #define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1) 1237 1237 1238 enum macsec_validation_type { 1238 enum macsec_validation_type { 1239 MACSEC_VALIDATE_DISABLED = 0, 1239 MACSEC_VALIDATE_DISABLED = 0, 1240 MACSEC_VALIDATE_CHECK = 1, 1240 MACSEC_VALIDATE_CHECK = 1, 1241 MACSEC_VALIDATE_STRICT = 2, 1241 MACSEC_VALIDATE_STRICT = 2, 1242 __MACSEC_VALIDATE_END, 1242 __MACSEC_VALIDATE_END, 1243 MACSEC_VALIDATE_MAX = __MACSEC_VALIDA 1243 MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1, 1244 }; 1244 }; 1245 1245 1246 enum macsec_offload { 1246 enum macsec_offload { 1247 MACSEC_OFFLOAD_OFF = 0, 1247 MACSEC_OFFLOAD_OFF = 0, 1248 MACSEC_OFFLOAD_PHY = 1, 1248 MACSEC_OFFLOAD_PHY = 1, 1249 MACSEC_OFFLOAD_MAC = 2, 1249 MACSEC_OFFLOAD_MAC = 2, 1250 __MACSEC_OFFLOAD_END, 1250 __MACSEC_OFFLOAD_END, 1251 MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD 1251 MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1, 1252 }; 1252 }; 1253 1253 1254 /* IPVLAN section */ 1254 /* IPVLAN section */ 1255 enum { 1255 enum { 1256 IFLA_IPVLAN_UNSPEC, 1256 IFLA_IPVLAN_UNSPEC, 1257 IFLA_IPVLAN_MODE, 1257 IFLA_IPVLAN_MODE, 1258 IFLA_IPVLAN_FLAGS, 1258 IFLA_IPVLAN_FLAGS, 1259 __IFLA_IPVLAN_MAX 1259 __IFLA_IPVLAN_MAX 1260 }; 1260 }; 1261 1261 1262 #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1262 #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1) 1263 1263 1264 enum ipvlan_mode { 1264 enum ipvlan_mode { 1265 IPVLAN_MODE_L2 = 0, 1265 IPVLAN_MODE_L2 = 0, 1266 IPVLAN_MODE_L3, 1266 IPVLAN_MODE_L3, 1267 IPVLAN_MODE_L3S, 1267 IPVLAN_MODE_L3S, 1268 IPVLAN_MODE_MAX 1268 IPVLAN_MODE_MAX 1269 }; 1269 }; 1270 1270 1271 #define IPVLAN_F_PRIVATE 0x01 1271 #define IPVLAN_F_PRIVATE 0x01 1272 #define IPVLAN_F_VEPA 0x02 1272 #define IPVLAN_F_VEPA 0x02 1273 1273 1274 /* Tunnel RTM header */ 1274 /* Tunnel RTM header */ 1275 struct tunnel_msg { 1275 struct tunnel_msg { 1276 __u8 family; 1276 __u8 family; 1277 __u8 flags; 1277 __u8 flags; 1278 __u16 reserved2; 1278 __u16 reserved2; 1279 __u32 ifindex; 1279 __u32 ifindex; 1280 }; 1280 }; 1281 1281 1282 /* netkit section */ 1282 /* netkit section */ 1283 enum netkit_action { 1283 enum netkit_action { 1284 NETKIT_NEXT = -1, 1284 NETKIT_NEXT = -1, 1285 NETKIT_PASS = 0, 1285 NETKIT_PASS = 0, 1286 NETKIT_DROP = 2, 1286 NETKIT_DROP = 2, 1287 NETKIT_REDIRECT = 7, 1287 NETKIT_REDIRECT = 7, 1288 }; 1288 }; 1289 1289 1290 enum netkit_mode { 1290 enum netkit_mode { 1291 NETKIT_L2, 1291 NETKIT_L2, 1292 NETKIT_L3, 1292 NETKIT_L3, 1293 }; 1293 }; 1294 1294 1295 enum { 1295 enum { 1296 IFLA_NETKIT_UNSPEC, 1296 IFLA_NETKIT_UNSPEC, 1297 IFLA_NETKIT_PEER_INFO, 1297 IFLA_NETKIT_PEER_INFO, 1298 IFLA_NETKIT_PRIMARY, 1298 IFLA_NETKIT_PRIMARY, 1299 IFLA_NETKIT_POLICY, 1299 IFLA_NETKIT_POLICY, 1300 IFLA_NETKIT_PEER_POLICY, 1300 IFLA_NETKIT_PEER_POLICY, 1301 IFLA_NETKIT_MODE, 1301 IFLA_NETKIT_MODE, 1302 __IFLA_NETKIT_MAX, 1302 __IFLA_NETKIT_MAX, 1303 }; 1303 }; 1304 #define IFLA_NETKIT_MAX (__IFLA_NETKIT_MAX - 1304 #define IFLA_NETKIT_MAX (__IFLA_NETKIT_MAX - 1) 1305 1305 1306 /* VXLAN section */ 1306 /* VXLAN section */ 1307 1307 1308 /* include statistics in the dump */ 1308 /* include statistics in the dump */ 1309 #define TUNNEL_MSG_FLAG_STATS 0x01 1309 #define TUNNEL_MSG_FLAG_STATS 0x01 1310 1310 1311 #define TUNNEL_MSG_VALID_USER_FLAGS TUNNEL_MS 1311 #define TUNNEL_MSG_VALID_USER_FLAGS TUNNEL_MSG_FLAG_STATS 1312 1312 1313 /* Embedded inside VXLAN_VNIFILTER_ENTRY_STAT 1313 /* Embedded inside VXLAN_VNIFILTER_ENTRY_STATS */ 1314 enum { 1314 enum { 1315 VNIFILTER_ENTRY_STATS_UNSPEC, 1315 VNIFILTER_ENTRY_STATS_UNSPEC, 1316 VNIFILTER_ENTRY_STATS_RX_BYTES, 1316 VNIFILTER_ENTRY_STATS_RX_BYTES, 1317 VNIFILTER_ENTRY_STATS_RX_PKTS, 1317 VNIFILTER_ENTRY_STATS_RX_PKTS, 1318 VNIFILTER_ENTRY_STATS_RX_DROPS, 1318 VNIFILTER_ENTRY_STATS_RX_DROPS, 1319 VNIFILTER_ENTRY_STATS_RX_ERRORS, 1319 VNIFILTER_ENTRY_STATS_RX_ERRORS, 1320 VNIFILTER_ENTRY_STATS_TX_BYTES, 1320 VNIFILTER_ENTRY_STATS_TX_BYTES, 1321 VNIFILTER_ENTRY_STATS_TX_PKTS, 1321 VNIFILTER_ENTRY_STATS_TX_PKTS, 1322 VNIFILTER_ENTRY_STATS_TX_DROPS, 1322 VNIFILTER_ENTRY_STATS_TX_DROPS, 1323 VNIFILTER_ENTRY_STATS_TX_ERRORS, 1323 VNIFILTER_ENTRY_STATS_TX_ERRORS, 1324 VNIFILTER_ENTRY_STATS_PAD, 1324 VNIFILTER_ENTRY_STATS_PAD, 1325 __VNIFILTER_ENTRY_STATS_MAX 1325 __VNIFILTER_ENTRY_STATS_MAX 1326 }; 1326 }; 1327 #define VNIFILTER_ENTRY_STATS_MAX (__VNIFILTE 1327 #define VNIFILTER_ENTRY_STATS_MAX (__VNIFILTER_ENTRY_STATS_MAX - 1) 1328 1328 1329 enum { 1329 enum { 1330 VXLAN_VNIFILTER_ENTRY_UNSPEC, 1330 VXLAN_VNIFILTER_ENTRY_UNSPEC, 1331 VXLAN_VNIFILTER_ENTRY_START, 1331 VXLAN_VNIFILTER_ENTRY_START, 1332 VXLAN_VNIFILTER_ENTRY_END, 1332 VXLAN_VNIFILTER_ENTRY_END, 1333 VXLAN_VNIFILTER_ENTRY_GROUP, 1333 VXLAN_VNIFILTER_ENTRY_GROUP, 1334 VXLAN_VNIFILTER_ENTRY_GROUP6, 1334 VXLAN_VNIFILTER_ENTRY_GROUP6, 1335 VXLAN_VNIFILTER_ENTRY_STATS, 1335 VXLAN_VNIFILTER_ENTRY_STATS, 1336 __VXLAN_VNIFILTER_ENTRY_MAX 1336 __VXLAN_VNIFILTER_ENTRY_MAX 1337 }; 1337 }; 1338 #define VXLAN_VNIFILTER_ENTRY_MAX (__VX 1338 #define VXLAN_VNIFILTER_ENTRY_MAX (__VXLAN_VNIFILTER_ENTRY_MAX - 1) 1339 1339 1340 enum { 1340 enum { 1341 VXLAN_VNIFILTER_UNSPEC, 1341 VXLAN_VNIFILTER_UNSPEC, 1342 VXLAN_VNIFILTER_ENTRY, 1342 VXLAN_VNIFILTER_ENTRY, 1343 __VXLAN_VNIFILTER_MAX 1343 __VXLAN_VNIFILTER_MAX 1344 }; 1344 }; 1345 #define VXLAN_VNIFILTER_MAX (__VXLAN_VNIF 1345 #define VXLAN_VNIFILTER_MAX (__VXLAN_VNIFILTER_MAX - 1) 1346 1346 1347 enum { 1347 enum { 1348 IFLA_VXLAN_UNSPEC, 1348 IFLA_VXLAN_UNSPEC, 1349 IFLA_VXLAN_ID, 1349 IFLA_VXLAN_ID, 1350 IFLA_VXLAN_GROUP, /* group or r 1350 IFLA_VXLAN_GROUP, /* group or remote address */ 1351 IFLA_VXLAN_LINK, 1351 IFLA_VXLAN_LINK, 1352 IFLA_VXLAN_LOCAL, 1352 IFLA_VXLAN_LOCAL, 1353 IFLA_VXLAN_TTL, 1353 IFLA_VXLAN_TTL, 1354 IFLA_VXLAN_TOS, 1354 IFLA_VXLAN_TOS, 1355 IFLA_VXLAN_LEARNING, 1355 IFLA_VXLAN_LEARNING, 1356 IFLA_VXLAN_AGEING, 1356 IFLA_VXLAN_AGEING, 1357 IFLA_VXLAN_LIMIT, 1357 IFLA_VXLAN_LIMIT, 1358 IFLA_VXLAN_PORT_RANGE, /* source por 1358 IFLA_VXLAN_PORT_RANGE, /* source port */ 1359 IFLA_VXLAN_PROXY, 1359 IFLA_VXLAN_PROXY, 1360 IFLA_VXLAN_RSC, 1360 IFLA_VXLAN_RSC, 1361 IFLA_VXLAN_L2MISS, 1361 IFLA_VXLAN_L2MISS, 1362 IFLA_VXLAN_L3MISS, 1362 IFLA_VXLAN_L3MISS, 1363 IFLA_VXLAN_PORT, /* destinatio 1363 IFLA_VXLAN_PORT, /* destination port */ 1364 IFLA_VXLAN_GROUP6, 1364 IFLA_VXLAN_GROUP6, 1365 IFLA_VXLAN_LOCAL6, 1365 IFLA_VXLAN_LOCAL6, 1366 IFLA_VXLAN_UDP_CSUM, 1366 IFLA_VXLAN_UDP_CSUM, 1367 IFLA_VXLAN_UDP_ZERO_CSUM6_TX, 1367 IFLA_VXLAN_UDP_ZERO_CSUM6_TX, 1368 IFLA_VXLAN_UDP_ZERO_CSUM6_RX, 1368 IFLA_VXLAN_UDP_ZERO_CSUM6_RX, 1369 IFLA_VXLAN_REMCSUM_TX, 1369 IFLA_VXLAN_REMCSUM_TX, 1370 IFLA_VXLAN_REMCSUM_RX, 1370 IFLA_VXLAN_REMCSUM_RX, 1371 IFLA_VXLAN_GBP, 1371 IFLA_VXLAN_GBP, 1372 IFLA_VXLAN_REMCSUM_NOPARTIAL, 1372 IFLA_VXLAN_REMCSUM_NOPARTIAL, 1373 IFLA_VXLAN_COLLECT_METADATA, 1373 IFLA_VXLAN_COLLECT_METADATA, 1374 IFLA_VXLAN_LABEL, 1374 IFLA_VXLAN_LABEL, 1375 IFLA_VXLAN_GPE, 1375 IFLA_VXLAN_GPE, 1376 IFLA_VXLAN_TTL_INHERIT, 1376 IFLA_VXLAN_TTL_INHERIT, 1377 IFLA_VXLAN_DF, 1377 IFLA_VXLAN_DF, 1378 IFLA_VXLAN_VNIFILTER, /* only applica 1378 IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */ 1379 IFLA_VXLAN_LOCALBYPASS, 1379 IFLA_VXLAN_LOCALBYPASS, 1380 IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow 1380 IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow label policy; ifla_vxlan_label_policy */ 1381 __IFLA_VXLAN_MAX 1381 __IFLA_VXLAN_MAX 1382 }; 1382 }; 1383 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1 1383 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) 1384 1384 1385 struct ifla_vxlan_port_range { 1385 struct ifla_vxlan_port_range { 1386 __be16 low; 1386 __be16 low; 1387 __be16 high; 1387 __be16 high; 1388 }; 1388 }; 1389 1389 1390 enum ifla_vxlan_df { 1390 enum ifla_vxlan_df { 1391 VXLAN_DF_UNSET = 0, 1391 VXLAN_DF_UNSET = 0, 1392 VXLAN_DF_SET, 1392 VXLAN_DF_SET, 1393 VXLAN_DF_INHERIT, 1393 VXLAN_DF_INHERIT, 1394 __VXLAN_DF_END, 1394 __VXLAN_DF_END, 1395 VXLAN_DF_MAX = __VXLAN_DF_END - 1, 1395 VXLAN_DF_MAX = __VXLAN_DF_END - 1, 1396 }; 1396 }; 1397 1397 1398 enum ifla_vxlan_label_policy { 1398 enum ifla_vxlan_label_policy { 1399 VXLAN_LABEL_FIXED = 0, 1399 VXLAN_LABEL_FIXED = 0, 1400 VXLAN_LABEL_INHERIT = 1, 1400 VXLAN_LABEL_INHERIT = 1, 1401 __VXLAN_LABEL_END, 1401 __VXLAN_LABEL_END, 1402 VXLAN_LABEL_MAX = __VXLAN_LABEL_END - 1402 VXLAN_LABEL_MAX = __VXLAN_LABEL_END - 1, 1403 }; 1403 }; 1404 1404 1405 /* GENEVE section */ 1405 /* GENEVE section */ 1406 enum { 1406 enum { 1407 IFLA_GENEVE_UNSPEC, 1407 IFLA_GENEVE_UNSPEC, 1408 IFLA_GENEVE_ID, 1408 IFLA_GENEVE_ID, 1409 IFLA_GENEVE_REMOTE, 1409 IFLA_GENEVE_REMOTE, 1410 IFLA_GENEVE_TTL, 1410 IFLA_GENEVE_TTL, 1411 IFLA_GENEVE_TOS, 1411 IFLA_GENEVE_TOS, 1412 IFLA_GENEVE_PORT, /* destinatio 1412 IFLA_GENEVE_PORT, /* destination port */ 1413 IFLA_GENEVE_COLLECT_METADATA, 1413 IFLA_GENEVE_COLLECT_METADATA, 1414 IFLA_GENEVE_REMOTE6, 1414 IFLA_GENEVE_REMOTE6, 1415 IFLA_GENEVE_UDP_CSUM, 1415 IFLA_GENEVE_UDP_CSUM, 1416 IFLA_GENEVE_UDP_ZERO_CSUM6_TX, 1416 IFLA_GENEVE_UDP_ZERO_CSUM6_TX, 1417 IFLA_GENEVE_UDP_ZERO_CSUM6_RX, 1417 IFLA_GENEVE_UDP_ZERO_CSUM6_RX, 1418 IFLA_GENEVE_LABEL, 1418 IFLA_GENEVE_LABEL, 1419 IFLA_GENEVE_TTL_INHERIT, 1419 IFLA_GENEVE_TTL_INHERIT, 1420 IFLA_GENEVE_DF, 1420 IFLA_GENEVE_DF, 1421 IFLA_GENEVE_INNER_PROTO_INHERIT, 1421 IFLA_GENEVE_INNER_PROTO_INHERIT, 1422 __IFLA_GENEVE_MAX 1422 __IFLA_GENEVE_MAX 1423 }; 1423 }; 1424 #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1424 #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) 1425 1425 1426 enum ifla_geneve_df { 1426 enum ifla_geneve_df { 1427 GENEVE_DF_UNSET = 0, 1427 GENEVE_DF_UNSET = 0, 1428 GENEVE_DF_SET, 1428 GENEVE_DF_SET, 1429 GENEVE_DF_INHERIT, 1429 GENEVE_DF_INHERIT, 1430 __GENEVE_DF_END, 1430 __GENEVE_DF_END, 1431 GENEVE_DF_MAX = __GENEVE_DF_END - 1, 1431 GENEVE_DF_MAX = __GENEVE_DF_END - 1, 1432 }; 1432 }; 1433 1433 1434 /* Bareudp section */ 1434 /* Bareudp section */ 1435 enum { 1435 enum { 1436 IFLA_BAREUDP_UNSPEC, 1436 IFLA_BAREUDP_UNSPEC, 1437 IFLA_BAREUDP_PORT, 1437 IFLA_BAREUDP_PORT, 1438 IFLA_BAREUDP_ETHERTYPE, 1438 IFLA_BAREUDP_ETHERTYPE, 1439 IFLA_BAREUDP_SRCPORT_MIN, 1439 IFLA_BAREUDP_SRCPORT_MIN, 1440 IFLA_BAREUDP_MULTIPROTO_MODE, 1440 IFLA_BAREUDP_MULTIPROTO_MODE, 1441 __IFLA_BAREUDP_MAX 1441 __IFLA_BAREUDP_MAX 1442 }; 1442 }; 1443 1443 1444 #define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX 1444 #define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX - 1) 1445 1445 1446 /* PPP section */ 1446 /* PPP section */ 1447 enum { 1447 enum { 1448 IFLA_PPP_UNSPEC, 1448 IFLA_PPP_UNSPEC, 1449 IFLA_PPP_DEV_FD, 1449 IFLA_PPP_DEV_FD, 1450 __IFLA_PPP_MAX 1450 __IFLA_PPP_MAX 1451 }; 1451 }; 1452 #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1) 1452 #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1) 1453 1453 1454 /* GTP section */ 1454 /* GTP section */ 1455 1455 1456 enum ifla_gtp_role { 1456 enum ifla_gtp_role { 1457 GTP_ROLE_GGSN = 0, 1457 GTP_ROLE_GGSN = 0, 1458 GTP_ROLE_SGSN, 1458 GTP_ROLE_SGSN, 1459 }; 1459 }; 1460 1460 1461 enum { 1461 enum { 1462 IFLA_GTP_UNSPEC, 1462 IFLA_GTP_UNSPEC, 1463 IFLA_GTP_FD0, 1463 IFLA_GTP_FD0, 1464 IFLA_GTP_FD1, 1464 IFLA_GTP_FD1, 1465 IFLA_GTP_PDP_HASHSIZE, 1465 IFLA_GTP_PDP_HASHSIZE, 1466 IFLA_GTP_ROLE, 1466 IFLA_GTP_ROLE, 1467 IFLA_GTP_CREATE_SOCKETS, 1467 IFLA_GTP_CREATE_SOCKETS, 1468 IFLA_GTP_RESTART_COUNT, 1468 IFLA_GTP_RESTART_COUNT, 1469 IFLA_GTP_LOCAL, 1469 IFLA_GTP_LOCAL, 1470 IFLA_GTP_LOCAL6, 1470 IFLA_GTP_LOCAL6, 1471 __IFLA_GTP_MAX, 1471 __IFLA_GTP_MAX, 1472 }; 1472 }; 1473 #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) 1473 #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) 1474 1474 1475 /* Bonding section */ 1475 /* Bonding section */ 1476 1476 1477 enum { 1477 enum { 1478 IFLA_BOND_UNSPEC, 1478 IFLA_BOND_UNSPEC, 1479 IFLA_BOND_MODE, 1479 IFLA_BOND_MODE, 1480 IFLA_BOND_ACTIVE_SLAVE, 1480 IFLA_BOND_ACTIVE_SLAVE, 1481 IFLA_BOND_MIIMON, 1481 IFLA_BOND_MIIMON, 1482 IFLA_BOND_UPDELAY, 1482 IFLA_BOND_UPDELAY, 1483 IFLA_BOND_DOWNDELAY, 1483 IFLA_BOND_DOWNDELAY, 1484 IFLA_BOND_USE_CARRIER, 1484 IFLA_BOND_USE_CARRIER, 1485 IFLA_BOND_ARP_INTERVAL, 1485 IFLA_BOND_ARP_INTERVAL, 1486 IFLA_BOND_ARP_IP_TARGET, 1486 IFLA_BOND_ARP_IP_TARGET, 1487 IFLA_BOND_ARP_VALIDATE, 1487 IFLA_BOND_ARP_VALIDATE, 1488 IFLA_BOND_ARP_ALL_TARGETS, 1488 IFLA_BOND_ARP_ALL_TARGETS, 1489 IFLA_BOND_PRIMARY, 1489 IFLA_BOND_PRIMARY, 1490 IFLA_BOND_PRIMARY_RESELECT, 1490 IFLA_BOND_PRIMARY_RESELECT, 1491 IFLA_BOND_FAIL_OVER_MAC, 1491 IFLA_BOND_FAIL_OVER_MAC, 1492 IFLA_BOND_XMIT_HASH_POLICY, 1492 IFLA_BOND_XMIT_HASH_POLICY, 1493 IFLA_BOND_RESEND_IGMP, 1493 IFLA_BOND_RESEND_IGMP, 1494 IFLA_BOND_NUM_PEER_NOTIF, 1494 IFLA_BOND_NUM_PEER_NOTIF, 1495 IFLA_BOND_ALL_SLAVES_ACTIVE, 1495 IFLA_BOND_ALL_SLAVES_ACTIVE, 1496 IFLA_BOND_MIN_LINKS, 1496 IFLA_BOND_MIN_LINKS, 1497 IFLA_BOND_LP_INTERVAL, 1497 IFLA_BOND_LP_INTERVAL, 1498 IFLA_BOND_PACKETS_PER_SLAVE, 1498 IFLA_BOND_PACKETS_PER_SLAVE, 1499 IFLA_BOND_AD_LACP_RATE, 1499 IFLA_BOND_AD_LACP_RATE, 1500 IFLA_BOND_AD_SELECT, 1500 IFLA_BOND_AD_SELECT, 1501 IFLA_BOND_AD_INFO, 1501 IFLA_BOND_AD_INFO, 1502 IFLA_BOND_AD_ACTOR_SYS_PRIO, 1502 IFLA_BOND_AD_ACTOR_SYS_PRIO, 1503 IFLA_BOND_AD_USER_PORT_KEY, 1503 IFLA_BOND_AD_USER_PORT_KEY, 1504 IFLA_BOND_AD_ACTOR_SYSTEM, 1504 IFLA_BOND_AD_ACTOR_SYSTEM, 1505 IFLA_BOND_TLB_DYNAMIC_LB, 1505 IFLA_BOND_TLB_DYNAMIC_LB, 1506 IFLA_BOND_PEER_NOTIF_DELAY, 1506 IFLA_BOND_PEER_NOTIF_DELAY, 1507 IFLA_BOND_AD_LACP_ACTIVE, 1507 IFLA_BOND_AD_LACP_ACTIVE, 1508 IFLA_BOND_MISSED_MAX, 1508 IFLA_BOND_MISSED_MAX, 1509 IFLA_BOND_NS_IP6_TARGET, 1509 IFLA_BOND_NS_IP6_TARGET, 1510 IFLA_BOND_COUPLED_CONTROL, 1510 IFLA_BOND_COUPLED_CONTROL, 1511 __IFLA_BOND_MAX, 1511 __IFLA_BOND_MAX, 1512 }; 1512 }; 1513 1513 1514 #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1) 1514 #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1) 1515 1515 1516 enum { 1516 enum { 1517 IFLA_BOND_AD_INFO_UNSPEC, 1517 IFLA_BOND_AD_INFO_UNSPEC, 1518 IFLA_BOND_AD_INFO_AGGREGATOR, 1518 IFLA_BOND_AD_INFO_AGGREGATOR, 1519 IFLA_BOND_AD_INFO_NUM_PORTS, 1519 IFLA_BOND_AD_INFO_NUM_PORTS, 1520 IFLA_BOND_AD_INFO_ACTOR_KEY, 1520 IFLA_BOND_AD_INFO_ACTOR_KEY, 1521 IFLA_BOND_AD_INFO_PARTNER_KEY, 1521 IFLA_BOND_AD_INFO_PARTNER_KEY, 1522 IFLA_BOND_AD_INFO_PARTNER_MAC, 1522 IFLA_BOND_AD_INFO_PARTNER_MAC, 1523 __IFLA_BOND_AD_INFO_MAX, 1523 __IFLA_BOND_AD_INFO_MAX, 1524 }; 1524 }; 1525 1525 1526 #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_ 1526 #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1) 1527 1527 1528 enum { 1528 enum { 1529 IFLA_BOND_SLAVE_UNSPEC, 1529 IFLA_BOND_SLAVE_UNSPEC, 1530 IFLA_BOND_SLAVE_STATE, 1530 IFLA_BOND_SLAVE_STATE, 1531 IFLA_BOND_SLAVE_MII_STATUS, 1531 IFLA_BOND_SLAVE_MII_STATUS, 1532 IFLA_BOND_SLAVE_LINK_FAILURE_COUNT, 1532 IFLA_BOND_SLAVE_LINK_FAILURE_COUNT, 1533 IFLA_BOND_SLAVE_PERM_HWADDR, 1533 IFLA_BOND_SLAVE_PERM_HWADDR, 1534 IFLA_BOND_SLAVE_QUEUE_ID, 1534 IFLA_BOND_SLAVE_QUEUE_ID, 1535 IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, 1535 IFLA_BOND_SLAVE_AD_AGGREGATOR_ID, 1536 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_ST 1536 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE, 1537 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_ 1537 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE, 1538 IFLA_BOND_SLAVE_PRIO, 1538 IFLA_BOND_SLAVE_PRIO, 1539 __IFLA_BOND_SLAVE_MAX, 1539 __IFLA_BOND_SLAVE_MAX, 1540 }; 1540 }; 1541 1541 1542 #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_ 1542 #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1) 1543 1543 1544 /* SR-IOV virtual function management section 1544 /* SR-IOV virtual function management section */ 1545 1545 1546 enum { 1546 enum { 1547 IFLA_VF_INFO_UNSPEC, 1547 IFLA_VF_INFO_UNSPEC, 1548 IFLA_VF_INFO, 1548 IFLA_VF_INFO, 1549 __IFLA_VF_INFO_MAX, 1549 __IFLA_VF_INFO_MAX, 1550 }; 1550 }; 1551 1551 1552 #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX 1552 #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1) 1553 1553 1554 enum { 1554 enum { 1555 IFLA_VF_UNSPEC, 1555 IFLA_VF_UNSPEC, 1556 IFLA_VF_MAC, /* Hardware q 1556 IFLA_VF_MAC, /* Hardware queue specific attributes */ 1557 IFLA_VF_VLAN, /* VLAN ID an 1557 IFLA_VF_VLAN, /* VLAN ID and QoS */ 1558 IFLA_VF_TX_RATE, /* Max TX Ban 1558 IFLA_VF_TX_RATE, /* Max TX Bandwidth Allocation */ 1559 IFLA_VF_SPOOFCHK, /* Spoof Chec 1559 IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ 1560 IFLA_VF_LINK_STATE, /* link state 1560 IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */ 1561 IFLA_VF_RATE, /* Min and Ma 1561 IFLA_VF_RATE, /* Min and Max TX Bandwidth Allocation */ 1562 IFLA_VF_RSS_QUERY_EN, /* RSS Redire 1562 IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query 1563 * on/off swi 1563 * on/off switch 1564 */ 1564 */ 1565 IFLA_VF_STATS, /* network de 1565 IFLA_VF_STATS, /* network device statistics */ 1566 IFLA_VF_TRUST, /* Trust VF * 1566 IFLA_VF_TRUST, /* Trust VF */ 1567 IFLA_VF_IB_NODE_GUID, /* VF Infinib 1567 IFLA_VF_IB_NODE_GUID, /* VF Infiniband node GUID */ 1568 IFLA_VF_IB_PORT_GUID, /* VF Infinib 1568 IFLA_VF_IB_PORT_GUID, /* VF Infiniband port GUID */ 1569 IFLA_VF_VLAN_LIST, /* nested lis 1569 IFLA_VF_VLAN_LIST, /* nested list of vlans, option for QinQ */ 1570 IFLA_VF_BROADCAST, /* VF broadca 1570 IFLA_VF_BROADCAST, /* VF broadcast */ 1571 __IFLA_VF_MAX, 1571 __IFLA_VF_MAX, 1572 }; 1572 }; 1573 1573 1574 #define IFLA_VF_MAX (__IFLA_VF_MAX - 1) 1574 #define IFLA_VF_MAX (__IFLA_VF_MAX - 1) 1575 1575 1576 struct ifla_vf_mac { 1576 struct ifla_vf_mac { 1577 __u32 vf; 1577 __u32 vf; 1578 __u8 mac[32]; /* MAX_ADDR_LEN */ 1578 __u8 mac[32]; /* MAX_ADDR_LEN */ 1579 }; 1579 }; 1580 1580 1581 struct ifla_vf_broadcast { 1581 struct ifla_vf_broadcast { 1582 __u8 broadcast[32]; 1582 __u8 broadcast[32]; 1583 }; 1583 }; 1584 1584 1585 struct ifla_vf_vlan { 1585 struct ifla_vf_vlan { 1586 __u32 vf; 1586 __u32 vf; 1587 __u32 vlan; /* 0 - 4095, 0 disables V 1587 __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */ 1588 __u32 qos; 1588 __u32 qos; 1589 }; 1589 }; 1590 1590 1591 enum { 1591 enum { 1592 IFLA_VF_VLAN_INFO_UNSPEC, 1592 IFLA_VF_VLAN_INFO_UNSPEC, 1593 IFLA_VF_VLAN_INFO, /* VLAN ID, Q 1593 IFLA_VF_VLAN_INFO, /* VLAN ID, QoS and VLAN protocol */ 1594 __IFLA_VF_VLAN_INFO_MAX, 1594 __IFLA_VF_VLAN_INFO_MAX, 1595 }; 1595 }; 1596 1596 1597 #define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN 1597 #define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1) 1598 #define MAX_VLAN_LIST_LEN 1 1598 #define MAX_VLAN_LIST_LEN 1 1599 1599 1600 struct ifla_vf_vlan_info { 1600 struct ifla_vf_vlan_info { 1601 __u32 vf; 1601 __u32 vf; 1602 __u32 vlan; /* 0 - 4095, 0 disables V 1602 __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */ 1603 __u32 qos; 1603 __u32 qos; 1604 __be16 vlan_proto; /* VLAN protocol e 1604 __be16 vlan_proto; /* VLAN protocol either 802.1Q or 802.1ad */ 1605 }; 1605 }; 1606 1606 1607 struct ifla_vf_tx_rate { 1607 struct ifla_vf_tx_rate { 1608 __u32 vf; 1608 __u32 vf; 1609 __u32 rate; /* Max TX bandwidth in Mb 1609 __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */ 1610 }; 1610 }; 1611 1611 1612 struct ifla_vf_rate { 1612 struct ifla_vf_rate { 1613 __u32 vf; 1613 __u32 vf; 1614 __u32 min_tx_rate; /* Min Bandwidth i 1614 __u32 min_tx_rate; /* Min Bandwidth in Mbps */ 1615 __u32 max_tx_rate; /* Max Bandwidth i 1615 __u32 max_tx_rate; /* Max Bandwidth in Mbps */ 1616 }; 1616 }; 1617 1617 1618 struct ifla_vf_spoofchk { 1618 struct ifla_vf_spoofchk { 1619 __u32 vf; 1619 __u32 vf; 1620 __u32 setting; 1620 __u32 setting; 1621 }; 1621 }; 1622 1622 1623 struct ifla_vf_guid { 1623 struct ifla_vf_guid { 1624 __u32 vf; 1624 __u32 vf; 1625 __u64 guid; 1625 __u64 guid; 1626 }; 1626 }; 1627 1627 1628 enum { 1628 enum { 1629 IFLA_VF_LINK_STATE_AUTO, /* li 1629 IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */ 1630 IFLA_VF_LINK_STATE_ENABLE, /* li 1630 IFLA_VF_LINK_STATE_ENABLE, /* link always up */ 1631 IFLA_VF_LINK_STATE_DISABLE, /* li 1631 IFLA_VF_LINK_STATE_DISABLE, /* link always down */ 1632 __IFLA_VF_LINK_STATE_MAX, 1632 __IFLA_VF_LINK_STATE_MAX, 1633 }; 1633 }; 1634 1634 1635 struct ifla_vf_link_state { 1635 struct ifla_vf_link_state { 1636 __u32 vf; 1636 __u32 vf; 1637 __u32 link_state; 1637 __u32 link_state; 1638 }; 1638 }; 1639 1639 1640 struct ifla_vf_rss_query_en { 1640 struct ifla_vf_rss_query_en { 1641 __u32 vf; 1641 __u32 vf; 1642 __u32 setting; 1642 __u32 setting; 1643 }; 1643 }; 1644 1644 1645 enum { 1645 enum { 1646 IFLA_VF_STATS_RX_PACKETS, 1646 IFLA_VF_STATS_RX_PACKETS, 1647 IFLA_VF_STATS_TX_PACKETS, 1647 IFLA_VF_STATS_TX_PACKETS, 1648 IFLA_VF_STATS_RX_BYTES, 1648 IFLA_VF_STATS_RX_BYTES, 1649 IFLA_VF_STATS_TX_BYTES, 1649 IFLA_VF_STATS_TX_BYTES, 1650 IFLA_VF_STATS_BROADCAST, 1650 IFLA_VF_STATS_BROADCAST, 1651 IFLA_VF_STATS_MULTICAST, 1651 IFLA_VF_STATS_MULTICAST, 1652 IFLA_VF_STATS_PAD, 1652 IFLA_VF_STATS_PAD, 1653 IFLA_VF_STATS_RX_DROPPED, 1653 IFLA_VF_STATS_RX_DROPPED, 1654 IFLA_VF_STATS_TX_DROPPED, 1654 IFLA_VF_STATS_TX_DROPPED, 1655 __IFLA_VF_STATS_MAX, 1655 __IFLA_VF_STATS_MAX, 1656 }; 1656 }; 1657 1657 1658 #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MA 1658 #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1) 1659 1659 1660 struct ifla_vf_trust { 1660 struct ifla_vf_trust { 1661 __u32 vf; 1661 __u32 vf; 1662 __u32 setting; 1662 __u32 setting; 1663 }; 1663 }; 1664 1664 1665 /* VF ports management section 1665 /* VF ports management section 1666 * 1666 * 1667 * Nested layout of set/get msg is: 1667 * Nested layout of set/get msg is: 1668 * 1668 * 1669 * [IFLA_NUM_VF] 1669 * [IFLA_NUM_VF] 1670 * [IFLA_VF_PORTS] 1670 * [IFLA_VF_PORTS] 1671 * [IFLA_VF_PORT] 1671 * [IFLA_VF_PORT] 1672 * [IFLA_PORT_*] 1672 * [IFLA_PORT_*], ... 1673 * [IFLA_VF_PORT] 1673 * [IFLA_VF_PORT] 1674 * [IFLA_PORT_*] 1674 * [IFLA_PORT_*], ... 1675 * ... 1675 * ... 1676 * [IFLA_PORT_SELF] 1676 * [IFLA_PORT_SELF] 1677 * [IFLA_PORT_*], ... 1677 * [IFLA_PORT_*], ... 1678 */ 1678 */ 1679 1679 1680 enum { 1680 enum { 1681 IFLA_VF_PORT_UNSPEC, 1681 IFLA_VF_PORT_UNSPEC, 1682 IFLA_VF_PORT, /* ne 1682 IFLA_VF_PORT, /* nest */ 1683 __IFLA_VF_PORT_MAX, 1683 __IFLA_VF_PORT_MAX, 1684 }; 1684 }; 1685 1685 1686 #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX 1686 #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1) 1687 1687 1688 enum { 1688 enum { 1689 IFLA_PORT_UNSPEC, 1689 IFLA_PORT_UNSPEC, 1690 IFLA_PORT_VF, /* __ 1690 IFLA_PORT_VF, /* __u32 */ 1691 IFLA_PORT_PROFILE, /* st 1691 IFLA_PORT_PROFILE, /* string */ 1692 IFLA_PORT_VSI_TYPE, /* 80 1692 IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */ 1693 IFLA_PORT_INSTANCE_UUID, /* bi 1693 IFLA_PORT_INSTANCE_UUID, /* binary UUID */ 1694 IFLA_PORT_HOST_UUID, /* bi 1694 IFLA_PORT_HOST_UUID, /* binary UUID */ 1695 IFLA_PORT_REQUEST, /* __ 1695 IFLA_PORT_REQUEST, /* __u8 */ 1696 IFLA_PORT_RESPONSE, /* __ 1696 IFLA_PORT_RESPONSE, /* __u16, output only */ 1697 __IFLA_PORT_MAX, 1697 __IFLA_PORT_MAX, 1698 }; 1698 }; 1699 1699 1700 #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1) 1700 #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1) 1701 1701 1702 #define PORT_PROFILE_MAX 40 1702 #define PORT_PROFILE_MAX 40 1703 #define PORT_UUID_MAX 16 1703 #define PORT_UUID_MAX 16 1704 #define PORT_SELF_VF -1 1704 #define PORT_SELF_VF -1 1705 1705 1706 enum { 1706 enum { 1707 PORT_REQUEST_PREASSOCIATE = 0, 1707 PORT_REQUEST_PREASSOCIATE = 0, 1708 PORT_REQUEST_PREASSOCIATE_RR, 1708 PORT_REQUEST_PREASSOCIATE_RR, 1709 PORT_REQUEST_ASSOCIATE, 1709 PORT_REQUEST_ASSOCIATE, 1710 PORT_REQUEST_DISASSOCIATE, 1710 PORT_REQUEST_DISASSOCIATE, 1711 }; 1711 }; 1712 1712 1713 enum { 1713 enum { 1714 PORT_VDP_RESPONSE_SUCCESS = 0, 1714 PORT_VDP_RESPONSE_SUCCESS = 0, 1715 PORT_VDP_RESPONSE_INVALID_FORMAT, 1715 PORT_VDP_RESPONSE_INVALID_FORMAT, 1716 PORT_VDP_RESPONSE_INSUFFICIENT_RESOUR 1716 PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES, 1717 PORT_VDP_RESPONSE_UNUSED_VTID, 1717 PORT_VDP_RESPONSE_UNUSED_VTID, 1718 PORT_VDP_RESPONSE_VTID_VIOLATION, 1718 PORT_VDP_RESPONSE_VTID_VIOLATION, 1719 PORT_VDP_RESPONSE_VTID_VERSION_VIOALT 1719 PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION, 1720 PORT_VDP_RESPONSE_OUT_OF_SYNC, 1720 PORT_VDP_RESPONSE_OUT_OF_SYNC, 1721 /* 0x08-0xFF reserved for future VDP 1721 /* 0x08-0xFF reserved for future VDP use */ 1722 PORT_PROFILE_RESPONSE_SUCCESS = 0x100 1722 PORT_PROFILE_RESPONSE_SUCCESS = 0x100, 1723 PORT_PROFILE_RESPONSE_INPROGRESS, 1723 PORT_PROFILE_RESPONSE_INPROGRESS, 1724 PORT_PROFILE_RESPONSE_INVALID, 1724 PORT_PROFILE_RESPONSE_INVALID, 1725 PORT_PROFILE_RESPONSE_BADSTATE, 1725 PORT_PROFILE_RESPONSE_BADSTATE, 1726 PORT_PROFILE_RESPONSE_INSUFFICIENT_RE 1726 PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES, 1727 PORT_PROFILE_RESPONSE_ERROR, 1727 PORT_PROFILE_RESPONSE_ERROR, 1728 }; 1728 }; 1729 1729 1730 struct ifla_port_vsi { 1730 struct ifla_port_vsi { 1731 __u8 vsi_mgr_id; 1731 __u8 vsi_mgr_id; 1732 __u8 vsi_type_id[3]; 1732 __u8 vsi_type_id[3]; 1733 __u8 vsi_type_version; 1733 __u8 vsi_type_version; 1734 __u8 pad[3]; 1734 __u8 pad[3]; 1735 }; 1735 }; 1736 1736 1737 1737 1738 /* IPoIB section */ 1738 /* IPoIB section */ 1739 1739 1740 enum { 1740 enum { 1741 IFLA_IPOIB_UNSPEC, 1741 IFLA_IPOIB_UNSPEC, 1742 IFLA_IPOIB_PKEY, 1742 IFLA_IPOIB_PKEY, 1743 IFLA_IPOIB_MODE, 1743 IFLA_IPOIB_MODE, 1744 IFLA_IPOIB_UMCAST, 1744 IFLA_IPOIB_UMCAST, 1745 __IFLA_IPOIB_MAX 1745 __IFLA_IPOIB_MAX 1746 }; 1746 }; 1747 1747 1748 enum { 1748 enum { 1749 IPOIB_MODE_DATAGRAM = 0, /* using un 1749 IPOIB_MODE_DATAGRAM = 0, /* using unreliable datagram QPs */ 1750 IPOIB_MODE_CONNECTED = 1, /* using co 1750 IPOIB_MODE_CONNECTED = 1, /* using connected QPs */ 1751 }; 1751 }; 1752 1752 1753 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1) 1753 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1) 1754 1754 1755 1755 1756 /* HSR/PRP section, both uses same interface 1756 /* HSR/PRP section, both uses same interface */ 1757 1757 1758 /* Different redundancy protocols for hsr dev 1758 /* Different redundancy protocols for hsr device */ 1759 enum { 1759 enum { 1760 HSR_PROTOCOL_HSR, 1760 HSR_PROTOCOL_HSR, 1761 HSR_PROTOCOL_PRP, 1761 HSR_PROTOCOL_PRP, 1762 HSR_PROTOCOL_MAX, 1762 HSR_PROTOCOL_MAX, 1763 }; 1763 }; 1764 1764 1765 enum { 1765 enum { 1766 IFLA_HSR_UNSPEC, 1766 IFLA_HSR_UNSPEC, 1767 IFLA_HSR_SLAVE1, 1767 IFLA_HSR_SLAVE1, 1768 IFLA_HSR_SLAVE2, 1768 IFLA_HSR_SLAVE2, 1769 IFLA_HSR_MULTICAST_SPEC, /* La 1769 IFLA_HSR_MULTICAST_SPEC, /* Last byte of supervision addr */ 1770 IFLA_HSR_SUPERVISION_ADDR, /* Su 1770 IFLA_HSR_SUPERVISION_ADDR, /* Supervision frame multicast addr */ 1771 IFLA_HSR_SEQ_NR, 1771 IFLA_HSR_SEQ_NR, 1772 IFLA_HSR_VERSION, /* HS 1772 IFLA_HSR_VERSION, /* HSR version */ 1773 IFLA_HSR_PROTOCOL, /* In 1773 IFLA_HSR_PROTOCOL, /* Indicate different protocol than 1774 * HS 1774 * HSR. For example PRP. 1775 */ 1775 */ 1776 IFLA_HSR_INTERLINK, /* HS 1776 IFLA_HSR_INTERLINK, /* HSR interlink network device */ 1777 __IFLA_HSR_MAX, 1777 __IFLA_HSR_MAX, 1778 }; 1778 }; 1779 1779 1780 #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1) 1780 #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1) 1781 1781 1782 /* STATS section */ 1782 /* STATS section */ 1783 1783 1784 struct if_stats_msg { 1784 struct if_stats_msg { 1785 __u8 family; 1785 __u8 family; 1786 __u8 pad1; 1786 __u8 pad1; 1787 __u16 pad2; 1787 __u16 pad2; 1788 __u32 ifindex; 1788 __u32 ifindex; 1789 __u32 filter_mask; 1789 __u32 filter_mask; 1790 }; 1790 }; 1791 1791 1792 /* A stats attribute can be netdev specific o 1792 /* A stats attribute can be netdev specific or a global stat. 1793 * For netdev stats, lets use the prefix IFLA 1793 * For netdev stats, lets use the prefix IFLA_STATS_LINK_* 1794 */ 1794 */ 1795 enum { 1795 enum { 1796 IFLA_STATS_UNSPEC, /* also used as 64 1796 IFLA_STATS_UNSPEC, /* also used as 64bit pad attribute */ 1797 IFLA_STATS_LINK_64, 1797 IFLA_STATS_LINK_64, 1798 IFLA_STATS_LINK_XSTATS, 1798 IFLA_STATS_LINK_XSTATS, 1799 IFLA_STATS_LINK_XSTATS_SLAVE, 1799 IFLA_STATS_LINK_XSTATS_SLAVE, 1800 IFLA_STATS_LINK_OFFLOAD_XSTATS, 1800 IFLA_STATS_LINK_OFFLOAD_XSTATS, 1801 IFLA_STATS_AF_SPEC, 1801 IFLA_STATS_AF_SPEC, 1802 __IFLA_STATS_MAX, 1802 __IFLA_STATS_MAX, 1803 }; 1803 }; 1804 1804 1805 #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1) 1805 #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1) 1806 1806 1807 #define IFLA_STATS_FILTER_BIT(ATTR) (1 << 1807 #define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1)) 1808 1808 1809 enum { 1809 enum { 1810 IFLA_STATS_GETSET_UNSPEC, 1810 IFLA_STATS_GETSET_UNSPEC, 1811 IFLA_STATS_GET_FILTERS, /* Nest of IF 1811 IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with 1812 * a filter m 1812 * a filter mask for the corresponding group. 1813 */ 1813 */ 1814 IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STAT 1814 IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, /* 0 or 1 as u8 */ 1815 __IFLA_STATS_GETSET_MAX, 1815 __IFLA_STATS_GETSET_MAX, 1816 }; 1816 }; 1817 1817 1818 #define IFLA_STATS_GETSET_MAX (__IFLA_STATS_G 1818 #define IFLA_STATS_GETSET_MAX (__IFLA_STATS_GETSET_MAX - 1) 1819 1819 1820 /* These are embedded into IFLA_STATS_LINK_XS 1820 /* These are embedded into IFLA_STATS_LINK_XSTATS: 1821 * [IFLA_STATS_LINK_XSTATS] 1821 * [IFLA_STATS_LINK_XSTATS] 1822 * -> [LINK_XSTATS_TYPE_xxx] 1822 * -> [LINK_XSTATS_TYPE_xxx] 1823 * -> [rtnl link type specific attributes] 1823 * -> [rtnl link type specific attributes] 1824 */ 1824 */ 1825 enum { 1825 enum { 1826 LINK_XSTATS_TYPE_UNSPEC, 1826 LINK_XSTATS_TYPE_UNSPEC, 1827 LINK_XSTATS_TYPE_BRIDGE, 1827 LINK_XSTATS_TYPE_BRIDGE, 1828 LINK_XSTATS_TYPE_BOND, 1828 LINK_XSTATS_TYPE_BOND, 1829 __LINK_XSTATS_TYPE_MAX 1829 __LINK_XSTATS_TYPE_MAX 1830 }; 1830 }; 1831 #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_T 1831 #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1) 1832 1832 1833 /* These are stats embedded into IFLA_STATS_L 1833 /* These are stats embedded into IFLA_STATS_LINK_OFFLOAD_XSTATS */ 1834 enum { 1834 enum { 1835 IFLA_OFFLOAD_XSTATS_UNSPEC, 1835 IFLA_OFFLOAD_XSTATS_UNSPEC, 1836 IFLA_OFFLOAD_XSTATS_CPU_HIT, /* struc 1836 IFLA_OFFLOAD_XSTATS_CPU_HIT, /* struct rtnl_link_stats64 */ 1837 IFLA_OFFLOAD_XSTATS_HW_S_INFO, /* HW 1837 IFLA_OFFLOAD_XSTATS_HW_S_INFO, /* HW stats info. A nest */ 1838 IFLA_OFFLOAD_XSTATS_L3_STATS, /* st 1838 IFLA_OFFLOAD_XSTATS_L3_STATS, /* struct rtnl_hw_stats64 */ 1839 __IFLA_OFFLOAD_XSTATS_MAX 1839 __IFLA_OFFLOAD_XSTATS_MAX 1840 }; 1840 }; 1841 #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLO 1841 #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1) 1842 1842 1843 enum { 1843 enum { 1844 IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC, 1844 IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC, 1845 IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST 1845 IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST, /* u8 */ 1846 IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED, 1846 IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED, /* u8 */ 1847 __IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX, 1847 __IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX, 1848 }; 1848 }; 1849 #define IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX \ 1849 #define IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX \ 1850 (__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX 1850 (__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX - 1) 1851 1851 1852 /* XDP section */ 1852 /* XDP section */ 1853 1853 1854 #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U < 1854 #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0) 1855 #define XDP_FLAGS_SKB_MODE (1U < 1855 #define XDP_FLAGS_SKB_MODE (1U << 1) 1856 #define XDP_FLAGS_DRV_MODE (1U < 1856 #define XDP_FLAGS_DRV_MODE (1U << 2) 1857 #define XDP_FLAGS_HW_MODE (1U < 1857 #define XDP_FLAGS_HW_MODE (1U << 3) 1858 #define XDP_FLAGS_REPLACE (1U < 1858 #define XDP_FLAGS_REPLACE (1U << 4) 1859 #define XDP_FLAGS_MODES (XDP_ 1859 #define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \ 1860 XDP_ 1860 XDP_FLAGS_DRV_MODE | \ 1861 XDP_ 1861 XDP_FLAGS_HW_MODE) 1862 #define XDP_FLAGS_MASK (XDP_ 1862 #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \ 1863 XDP_ 1863 XDP_FLAGS_MODES | XDP_FLAGS_REPLACE) 1864 1864 1865 /* These are stored into IFLA_XDP_ATTACHED on 1865 /* These are stored into IFLA_XDP_ATTACHED on dump. */ 1866 enum { 1866 enum { 1867 XDP_ATTACHED_NONE = 0, 1867 XDP_ATTACHED_NONE = 0, 1868 XDP_ATTACHED_DRV, 1868 XDP_ATTACHED_DRV, 1869 XDP_ATTACHED_SKB, 1869 XDP_ATTACHED_SKB, 1870 XDP_ATTACHED_HW, 1870 XDP_ATTACHED_HW, 1871 XDP_ATTACHED_MULTI, 1871 XDP_ATTACHED_MULTI, 1872 }; 1872 }; 1873 1873 1874 enum { 1874 enum { 1875 IFLA_XDP_UNSPEC, 1875 IFLA_XDP_UNSPEC, 1876 IFLA_XDP_FD, 1876 IFLA_XDP_FD, 1877 IFLA_XDP_ATTACHED, 1877 IFLA_XDP_ATTACHED, 1878 IFLA_XDP_FLAGS, 1878 IFLA_XDP_FLAGS, 1879 IFLA_XDP_PROG_ID, 1879 IFLA_XDP_PROG_ID, 1880 IFLA_XDP_DRV_PROG_ID, 1880 IFLA_XDP_DRV_PROG_ID, 1881 IFLA_XDP_SKB_PROG_ID, 1881 IFLA_XDP_SKB_PROG_ID, 1882 IFLA_XDP_HW_PROG_ID, 1882 IFLA_XDP_HW_PROG_ID, 1883 IFLA_XDP_EXPECTED_FD, 1883 IFLA_XDP_EXPECTED_FD, 1884 __IFLA_XDP_MAX, 1884 __IFLA_XDP_MAX, 1885 }; 1885 }; 1886 1886 1887 #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1) 1887 #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1) 1888 1888 1889 enum { 1889 enum { 1890 IFLA_EVENT_NONE, 1890 IFLA_EVENT_NONE, 1891 IFLA_EVENT_REBOOT, /* in 1891 IFLA_EVENT_REBOOT, /* internal reset / reboot */ 1892 IFLA_EVENT_FEATURES, /* ch 1892 IFLA_EVENT_FEATURES, /* change in offload features */ 1893 IFLA_EVENT_BONDING_FAILOVER, /* ch 1893 IFLA_EVENT_BONDING_FAILOVER, /* change in active slave */ 1894 IFLA_EVENT_NOTIFY_PEERS, /* re 1894 IFLA_EVENT_NOTIFY_PEERS, /* re-sent grat. arp/ndisc */ 1895 IFLA_EVENT_IGMP_RESEND, /* re 1895 IFLA_EVENT_IGMP_RESEND, /* re-sent IGMP JOIN */ 1896 IFLA_EVENT_BONDING_OPTIONS, /* ch 1896 IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */ 1897 }; 1897 }; 1898 1898 1899 /* tun section */ 1899 /* tun section */ 1900 1900 1901 enum { 1901 enum { 1902 IFLA_TUN_UNSPEC, 1902 IFLA_TUN_UNSPEC, 1903 IFLA_TUN_OWNER, 1903 IFLA_TUN_OWNER, 1904 IFLA_TUN_GROUP, 1904 IFLA_TUN_GROUP, 1905 IFLA_TUN_TYPE, 1905 IFLA_TUN_TYPE, 1906 IFLA_TUN_PI, 1906 IFLA_TUN_PI, 1907 IFLA_TUN_VNET_HDR, 1907 IFLA_TUN_VNET_HDR, 1908 IFLA_TUN_PERSIST, 1908 IFLA_TUN_PERSIST, 1909 IFLA_TUN_MULTI_QUEUE, 1909 IFLA_TUN_MULTI_QUEUE, 1910 IFLA_TUN_NUM_QUEUES, 1910 IFLA_TUN_NUM_QUEUES, 1911 IFLA_TUN_NUM_DISABLED_QUEUES, 1911 IFLA_TUN_NUM_DISABLED_QUEUES, 1912 __IFLA_TUN_MAX, 1912 __IFLA_TUN_MAX, 1913 }; 1913 }; 1914 1914 1915 #define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1) 1915 #define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1) 1916 1916 1917 /* rmnet section */ 1917 /* rmnet section */ 1918 1918 1919 #define RMNET_FLAGS_INGRESS_DEAGGREGATION 1919 #define RMNET_FLAGS_INGRESS_DEAGGREGATION (1U << 0) 1920 #define RMNET_FLAGS_INGRESS_MAP_COMMANDS 1920 #define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1) 1921 #define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 1921 #define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2) 1922 #define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 1922 #define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3) 1923 #define RMNET_FLAGS_INGRESS_MAP_CKSUMV5 1923 #define RMNET_FLAGS_INGRESS_MAP_CKSUMV5 (1U << 4) 1924 #define RMNET_FLAGS_EGRESS_MAP_CKSUMV5 1924 #define RMNET_FLAGS_EGRESS_MAP_CKSUMV5 (1U << 5) 1925 1925 1926 enum { 1926 enum { 1927 IFLA_RMNET_UNSPEC, 1927 IFLA_RMNET_UNSPEC, 1928 IFLA_RMNET_MUX_ID, 1928 IFLA_RMNET_MUX_ID, 1929 IFLA_RMNET_FLAGS, 1929 IFLA_RMNET_FLAGS, 1930 __IFLA_RMNET_MAX, 1930 __IFLA_RMNET_MAX, 1931 }; 1931 }; 1932 1932 1933 #define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1 1933 #define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1) 1934 1934 1935 struct ifla_rmnet_flags { 1935 struct ifla_rmnet_flags { 1936 __u32 flags; 1936 __u32 flags; 1937 __u32 mask; 1937 __u32 mask; 1938 }; 1938 }; 1939 1939 1940 /* MCTP section */ 1940 /* MCTP section */ 1941 1941 1942 enum { 1942 enum { 1943 IFLA_MCTP_UNSPEC, 1943 IFLA_MCTP_UNSPEC, 1944 IFLA_MCTP_NET, 1944 IFLA_MCTP_NET, 1945 __IFLA_MCTP_MAX, 1945 __IFLA_MCTP_MAX, 1946 }; 1946 }; 1947 1947 1948 #define IFLA_MCTP_MAX (__IFLA_MCTP_MAX - 1) 1948 #define IFLA_MCTP_MAX (__IFLA_MCTP_MAX - 1) 1949 1949 1950 /* DSA section */ 1950 /* DSA section */ 1951 1951 1952 enum { 1952 enum { 1953 IFLA_DSA_UNSPEC, 1953 IFLA_DSA_UNSPEC, 1954 IFLA_DSA_CONDUIT, 1954 IFLA_DSA_CONDUIT, 1955 /* Deprecated, use IFLA_DSA_CONDUIT i 1955 /* Deprecated, use IFLA_DSA_CONDUIT instead */ 1956 IFLA_DSA_MASTER = IFLA_DSA_CONDUIT, 1956 IFLA_DSA_MASTER = IFLA_DSA_CONDUIT, 1957 __IFLA_DSA_MAX, 1957 __IFLA_DSA_MAX, 1958 }; 1958 }; 1959 1959 1960 #define IFLA_DSA_MAX (__IFLA_DSA_MAX - 1) 1960 #define IFLA_DSA_MAX (__IFLA_DSA_MAX - 1) 1961 1961 1962 #endif /* _UAPI_LINUX_IF_LINK_H */ 1962 #endif /* _UAPI_LINUX_IF_LINK_H */ 1963 1963
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.