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