github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/socket_netlink_route.txt (about) 1 # Copyright 2018 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 # AF_NETLINK/NETLINK_ROUTE support. 5 6 include <linux/net.h> 7 include <linux/netdevice.h> 8 include <uapi/linux/if.h> 9 include <uapi/linux/ip.h> 10 include <uapi/linux/if_link.h> 11 include <uapi/linux/if_addr.h> 12 include <uapi/linux/if_addrlabel.h> 13 include <uapi/linux/if_bridge.h> 14 include <uapi/linux/if_vlan.h> 15 include <uapi/linux/netlink.h> 16 include <uapi/linux/netconf.h> 17 include <uapi/linux/rtnetlink.h> 18 include <uapi/linux/lwtunnel.h> 19 include <uapi/linux/neighbour.h> 20 include <uapi/linux/nexthop.h> 21 include <uapi/linux/fib_rules.h> 22 include <uapi/linux/if_tunnel.h> 23 include <uapi/linux/net_namespace.h> 24 include <uapi/linux/veth.h> 25 include <uapi/linux/can/gw.h> 26 include <uapi/linux/can/vxcan.h> 27 include <uapi/linux/mpls_iptunnel.h> 28 include <uapi/linux/ila.h> 29 include <uapi/linux/seg6_iptunnel.h> 30 include <uapi/linux/seg6_local.h> 31 include <uapi/linux/rpl_iptunnel.h> 32 include <uapi/linux/batman_adv.h> 33 34 resource sock_nl_route[sock_netlink] 35 type netns_id int32[0:4] 36 37 socket$nl_route(domain const[AF_NETLINK], type const[SOCK_RAW], proto const[NETLINK_ROUTE]) sock_nl_route 38 39 sendmsg$nl_route(fd sock_nl_route, msg ptr[in, msghdr_netlink[netlink_msg_route]], f flags[send_flags]) 40 41 netlink_msg_route [ 42 newlink netlink_msg[RTM_NEWLINK, ifinfomsg[AF_UNSPEC], ifla_policy] 43 getlink netlink_msg[RTM_GETLINK, ifinfomsg[AF_UNSPEC], ifla_policy] 44 setlink netlink_msg[RTM_SETLINK, ifinfomsg[AF_UNSPEC], ifla_policy] 45 dellink netlink_msg[RTM_DELLINK, ifinfomsg[AF_UNSPEC], ifla_policy] 46 getaddr netlink_msg[RTM_GETADDR, rtgenmsg[AF_UNSPEC], void] 47 getroute netlink_msg[RTM_GETROUTE, rtgenmsg[AF_UNSPEC], void] 48 getrule netlink_msg[RTM_GETRULE, rtgenmsg[AF_UNSPEC], void] 49 getnetconf netlink_msg[RTM_GETNETCONF, rtgenmsg[AF_UNSPEC], void] 50 getstats netlink_msg[RTM_GETSTATS, if_stats_msg[AF_UNSPEC], void] 51 newneigh netlink_msg[RTM_NEWNEIGH, ndmsg, nda_policy] 52 delneigh netlink_msg[RTM_DELNEIGH, ndmsg, nda_policy] 53 getneigh netlink_msg[RTM_GETNEIGH, rtgenmsg[AF_UNSPEC], void] 54 getneightbl netlink_msg[RTM_GETNEIGHTBL, rtgenmsg[AF_UNSPEC], void] 55 setneightbl netlink_msg[RTM_SETNEIGHTBL, ndtmsg, nl_neightbl_policy] 56 newlinkprop netlink_msg[RTM_NEWLINKPROP, ifinfomsg[AF_UNSPEC], ifla_policy] 57 # RTM_GETLINKPROP is currently not used by the kernel. 58 dellinkprop netlink_msg[RTM_DELLINKPROP, ifinfomsg[AF_UNSPEC], ifla_policy] 59 newnexthop netlink_msg[RTM_NEWNEXTHOP, nhmsg_new[AF_UNSPEC], rtm_nh_policy_new] 60 delnexthop netlink_msg[RTM_DELNEXTHOP, nhmsg_get_del[AF_UNSPEC], rtm_nh_policy_del] 61 getnexthop netlink_msg[RTM_GETNEXTHOP, nhmsg_get_del[AF_UNSPEC], rtm_nh_policy_get] 62 63 ipv4_newaddr netlink_msg[RTM_NEWADDR, ifaddrmsg[AF_INET], ifa_ipv4_policy] 64 ipv4_deladdr netlink_msg[RTM_DELADDR, ifaddrmsg[AF_INET], ifa_ipv4_policy] 65 ipv4_getaddr netlink_msg[RTM_GETADDR, ifaddrmsg[AF_INET], ifa_ipv4_policy] 66 ipv4_newroute netlink_msg[RTM_NEWROUTE, rtmsg[AF_INET], rtm_ipv4_policy] 67 ipv4_delroute netlink_msg[RTM_DELROUTE, rtmsg[AF_INET], rtm_ipv4_policy] 68 ipv4_getroute netlink_msg[RTM_GETROUTE, rtmsg[AF_INET], void] 69 ipv4_getnetconf netlink_msg[RTM_GETNETCONF, netconfmsg[AF_INET], devconf_ipv4_policy] 70 ipv4_newrule netlink_msg[RTM_NEWRULE, fib_rule_hdr[AF_INET], fib4_rule_policy] 71 ipv4_delrule netlink_msg[RTM_DELRULE, fib_rule_hdr[AF_INET], fib4_rule_policy] 72 ipv4_getrule netlink_msg[RTM_GETRULE, fib_rule_hdr[AF_INET], void] 73 ipv4_newnexthop netlink_msg[RTM_NEWNEXTHOP, nhmsg_new[AF_INET], rtm_nh_policy_new] 74 ipv4_getnexthop netlink_msg[RTM_GETNEXTHOP, nhmsg_get_del[AF_INET], rtm_nh_policy_get] 75 76 ipv6_newaddr netlink_msg[RTM_NEWADDR, ifaddrmsg[AF_INET6], ifa_ipv6_policy] 77 ipv6_deladdr netlink_msg[RTM_DELADDR, ifaddrmsg[AF_INET6], ifa_ipv6_policy] 78 ipv6_getaddr netlink_msg[RTM_GETADDR, ifaddrmsg[AF_INET6], ifa_ipv6_policy] 79 ipv6_newroute netlink_msg[RTM_NEWROUTE, rtmsg[AF_INET6], rtm_ipv6_policy] 80 ipv6_delroute netlink_msg[RTM_DELROUTE, rtmsg[AF_INET6], rtm_ipv6_policy] 81 ipv6_getroute netlink_msg[RTM_GETROUTE, rtmsg[AF_INET6], rtm_ipv6_policy] 82 ipv6_getmulticast netlink_msg[RTM_GETMULTICAST, rtgenmsg[AF_INET6], void] 83 ipv6_getanyicast netlink_msg[RTM_GETANYCAST, rtgenmsg[AF_INET6], void] 84 ipv6_getnetconf netlink_msg[RTM_GETNETCONF, netconfmsg[AF_INET6], devconf_ipv4_policy] 85 ipv6_newrule netlink_msg[RTM_NEWRULE, fib_rule_hdr[AF_INET6], fib6_rule_policy] 86 ipv6_delrule netlink_msg[RTM_DELRULE, fib_rule_hdr[AF_INET6], fib6_rule_policy] 87 ipv6_getrule netlink_msg[RTM_GETRULE, fib_rule_hdr[AF_INET6], void] 88 ipv6_newaddrlabel netlink_msg[RTM_NEWADDRLABEL, ifaddrlblmsg[AF_INET6], ifal_policy] 89 ipv6_deladdrlabel netlink_msg[RTM_DELADDRLABEL, ifaddrlblmsg[AF_INET6], ifal_policy] 90 ipv6_getaddrlabel netlink_msg[RTM_GETADDRLABEL, ifaddrlblmsg[AF_INET6], ifal_policy] 91 ipv6_newnexthop netlink_msg[RTM_NEWNEXTHOP, nhmsg_new[AF_INET6], rtm_nh_policy_new] 92 ipv6_getnexthop netlink_msg[RTM_GETNEXTHOP, nhmsg_get_del[AF_INET6], rtm_nh_policy_get] 93 94 ipmr_newroute netlink_msg[RTM_NEWROUTE, rtmsg[RTNL_FAMILY_IPMR], rtm_ipv4_policy] 95 ipmr_delroute netlink_msg[RTM_DELROUTE, rtmsg[RTNL_FAMILY_IPMR], rtm_ipv4_policy] 96 ipmr_getroute netlink_msg[RTM_GETROUTE, rtmsg[RTNL_FAMILY_IPMR], void] 97 98 mpls_newroute netlink_msg[RTM_NEWROUTE, rtmsg[AF_MPLS], rtm_mpls_policy] 99 mpls_delroute netlink_msg[RTM_DELROUTE, rtmsg[AF_MPLS], rtm_mpls_policy] 100 mpls_getroute netlink_msg[RTM_GETROUTE, rtmsg[AF_MPLS], rtm_mpls_policy] 101 mpls_getnetconf netlink_msg[RTM_GETNETCONF, netconfmsg[AF_MPLS], devconf_mpls_policy] 102 103 bridge_newneigh netlink_msg[RTM_NEWNEIGH, ndmsg, nda_policy] 104 bridge_delneigh netlink_msg[RTM_DELNEIGH, ndmsg, nda_policy] 105 bridge_getneigh netlink_msg[RTM_GETNEIGH, ifinfomsg[AF_BRIDGE], ifla_policy] 106 bridge_getlink netlink_msg[RTM_GETLINK, ifinfomsg[AF_BRIDGE], ifla_policy] 107 bridge_setlink netlink_msg[RTM_SETLINK, ifinfomsg[AF_BRIDGE], ifla_policy] 108 bridge_dellink netlink_msg[RTM_DELLINK, ifinfomsg[AF_BRIDGE], ifla_policy] 109 bridge_getvlan netlink_msg[RTM_GETVLAN, br_vlan_msg[AF_BRIDGE], br_vlan_db_dump_pol] 110 bridge_newvlan netlink_msg[RTM_NEWVLAN, br_vlan_msg[AF_BRIDGE], br_vlan_db_policy$container] 111 bridge_delvlan netlink_msg[RTM_DELVLAN, br_vlan_msg[AF_BRIDGE], br_vlan_db_policy$container] 112 113 RTM_GETMDB netlink_msg[RTM_GETMDB, br_port_msg[AF_BRIDGE], void] 114 RTM_NEWMDB netlink_msg[RTM_NEWMDB, br_port_msg[AF_BRIDGE], br_mdb_policy] 115 RTM_DELMDB netlink_msg[RTM_DELMDB, br_port_msg[AF_BRIDGE], br_mdb_policy] 116 117 RTM_NEWNSID netlink_msg[RTM_NEWNSID, rtgenmsg[AF_UNSPEC], rtnl_net_policy] 118 RTM_GETNSID netlink_msg[RTM_GETNSID, rtgenmsg[AF_UNSPEC], rtnl_net_policy] 119 120 can_newroute netlink_msg[RTM_NEWROUTE, rtcanmsg, cgw_policy] 121 can_delroute netlink_msg[RTM_DELROUTE, rtcanmsg, cgw_policy] 122 ] [varlen] 123 124 type rtgenmsg[FAMILY] { 125 rtgen_family const[FAMILY, int8] 126 } 127 128 type netconfmsg[FAMILY] { 129 ncm_family const[FAMILY, int8] 130 } 131 132 type ifinfomsg[FAMILY] { 133 ifi_family const[FAMILY, int8] 134 __ifi_pad const[0, int8] 135 ifi_type const[0, int16] 136 ifi_index ifindex[opt] 137 ifi_flags flags[net_device_flags, int32] 138 ifi_change flags[net_device_flags, int32] 139 } 140 141 type ifaddrmsg[FAMILY] { 142 ifa_family const[FAMILY, int8] 143 ifa_prefixlen flags[ifa_prefixlen, int8] 144 ifa_flags flags[ifa_flags8, int8] 145 ifa_scope flags[rt_scope_t, int8] 146 ifa_index ifindex 147 } 148 149 type ifaddrlblmsg[FAMILY] { 150 ifal_family const[FAMILY, int8] 151 __ifal_reserved const[0, int8] 152 ifal_prefixlen flags[ifa_prefixlen, int8] 153 ifal_flags const[0, int8] 154 ifal_index ifindex 155 ifal_seq int32 156 } 157 158 type br_vlan_msg[FAMILY] { 159 family const[FAMILY, int8] 160 reserved1 const[0, int8] 161 reserved2 const[0, int16] 162 ifindex ifindex 163 } 164 165 type br_port_msg[FAMILY] { 166 family const[FAMILY, int8] 167 ifindex ifindex 168 } 169 170 type rtmsg[FAMILY] { 171 rtm_family const[FAMILY, int8] 172 rtm_dst_len flags[rtm_addr_len, int8] 173 rtmsrcdst_len flags[rtm_addr_len, int8] 174 rtm_tos int8 175 rtm_table flags[rt_table_types, int8] 176 rtm_protocol flags[rtm_protocol, int8] 177 rtm_scope flags[rt_scope_t, int8] 178 rtm_type flags[rtm_type, int8] 179 rtm_flags flags[rtm_flags, int32] 180 } 181 182 ndmsg { 183 ndm_family flags[rtnl_af, int8] 184 ndm_pad1 const[0, int8] 185 ndm_pad2 const[0, int16] 186 ndm_ifindex ifindex 187 ndm_state flags[ndm_state, int16] 188 ndm_flags flags[ndm_flags, int8] 189 ndm_type flags[rtm_type, int8] 190 } 191 192 ndtmsg { 193 ndm_family flags[rtnl_af, int8] 194 ndm_pad1 const[0, int8] 195 ndm_pad2 const[0, int16] 196 } 197 198 type if_stats_msg[FAMILY] { 199 family const[FAMILY, int8] 200 pad1 const[0, int8] 201 pad2 const[0, int16] 202 ifindex ifindex 203 filter_mask flags[filter_mask, int32] 204 } 205 206 type nhmsg_get_del[FAMILY] nhmsg[FAMILY, const[0, int8], const[0, int32]] 207 type nhmsg_new[FAMILY] nhmsg[FAMILY, flags[rtm_protocol, int8], flags[rtnh_flags, int32]] 208 209 type nhmsg[FAMILY, PROTOCOL, FLAGS] { 210 nh_family const[FAMILY, int8] 211 nh_scope const[0, int8] 212 nh_protocol PROTOCOL 213 resvd const[0, int8] 214 nh_flags FLAGS 215 } 216 217 ifla_policy [ 218 IFLA_IFNAME nlattr[IFLA_IFNAME, devname] 219 IFLA_ADDRESS nlattr[IFLA_ADDRESS, mac_addr] 220 IFLA_BROADCAST nlattr[IFLA_BROADCAST, mac_addr] 221 IFLA_MAP nlattr[IFLA_MAP, rtnl_link_ifmap] 222 IFLA_MTU nlattr[IFLA_MTU, int32] 223 IFLA_LINK nlattr[IFLA_LINK, ifindex] 224 IFLA_MASTER nlattr[IFLA_MASTER, ifindex] 225 IFLA_CARRIER nlattr[IFLA_CARRIER, int8] 226 IFLA_TXQLEN nlattr[IFLA_TXQLEN, int32] 227 IFLA_WEIGHT nlattr[IFLA_WEIGHT, int32] 228 IFLA_OPERSTATE nlattr[IFLA_OPERSTATE, int8] 229 IFLA_LINKMODE nlattr[IFLA_LINKMODE, int8] 230 IFLA_LINKINFO nlnest[IFLA_LINKINFO, ifla_info_policy] 231 IFLA_NET_NS_PID nlattr[IFLA_NET_NS_PID, pid] 232 IFLA_NET_NS_FD nlattr[IFLA_NET_NS_FD, fd_namespace] 233 IFLA_IFALIAS nlattr[IFLA_IFALIAS, devname] 234 IFLA_IFALIASn nlattr[IFLA_IFALIAS, void] 235 IFLA_VFINFO_LIST nlnest[IFLA_VFINFO_LIST, array[nlnest[IFLA_VF_INFO, array[ifla_vf_policy]]]] 236 IFLA_VF_PORTS nlnest[IFLA_VF_PORTS, array[nlnest[IFLA_VF_PORT, array[ifla_port_policy]]]] 237 IFLA_PORT_SELF nlnest[IFLA_PORT_SELF, array[ifla_port_policy]] 238 IFLA_AF_SPEC nlnest[IFLA_AF_SPEC, array[ifla_af_spec_policy]] 239 IFLA_EXT_MASK nlattr[IFLA_EXT_MASK, int32] 240 IFLA_PROMISCUITY nlattr[IFLA_PROMISCUITY, int32] 241 IFLA_NUM_TX_QUEUES nlattr[IFLA_NUM_TX_QUEUES, int32] 242 IFLA_NUM_RX_QUEUES nlattr[IFLA_NUM_RX_QUEUES, int32] 243 IFLA_PHYS_PORT_ID nlattr[IFLA_PHYS_PORT_ID, array[int8, 0:MAX_PHYS_ITEM_ID_LEN]] 244 IFLA_CARRIER_CHANGES nlattr[IFLA_CARRIER_CHANGES, int32] 245 IFLA_PHYS_SWITCH_ID nlattr[IFLA_PHYS_SWITCH_ID, array[int8, 0:MAX_PHYS_ITEM_ID_LEN]] 246 IFLA_LINK_NETNSID nlattr[IFLA_LINK_NETNSID, netns_id] 247 IFLA_PROTO_DOWN nlattr[IFLA_PROTO_DOWN, int8] 248 IFLA_XDP nlnest[IFLA_XDP, array[ifla_xdp_policy]] 249 IFLA_EVENT nlattr[IFLA_EVENT, int32] 250 IFLA_GROUP nlattr[IFLA_GROUP, int32] 251 IFLA_TARGET_NETNSID nlattr[IFLA_TARGET_NETNSID, netns_id] 252 IFLA_PROP_LIST nlnest[IFLA_PROP_LIST, array[nlattr[IFLA_ALT_IFNAME, devname]]] 253 IFLA_ALT_IFNAME nlattr[IFLA_ALT_IFNAME, devname] 254 IFLA_GSO_MAX_SEGS nlattr[IFLA_GSO_MAX_SEGS, int32[0:GSO_MAX_SEGS]] 255 IFLA_GSO_MAX_SIZE nlattr[IFLA_GSO_MAX_SIZE, int32[0:GSO_MAX_SIZE]] 256 ] [varlen] 257 258 ifla_af_spec_policy [ 259 AF_INET nlnest[AF_INET, nlnest[IFLA_INET_CONF, array[nlattr_tt[int16:14[0:IPV4_DEVCONF_MAX], 0, 0, int32]]]] 260 AF_INET6 nlnest[AF_INET6, array[inet6_af_policy]] 261 AF_BRIDGE nlattr[AF_BRIDGE, void] 262 AF_MPLS nlattr[AF_MPLS, void] 263 ] [varlen] 264 265 inet6_af_policy [ 266 IFLA_INET6_ADDR_GEN_MODE nlattr[IFLA_INET6_ADDR_GEN_MODE, int8] 267 IFLA_INET6_TOKEN nlattr[IFLA_INET6_TOKEN, ipv6_addr] 268 ] [varlen] 269 270 ifal_policy [ 271 IFAL_ADDRESS nlattr[IFAL_ADDRESS, ipv6_addr] 272 IFAL_LABEL nlattr[IFAL_LABEL, flags[ifal_labels, int32]] 273 ] [varlen] 274 275 type ifla_info_policy$t[TYPE, DATA_TYPE, DATA] { 276 IFLA_INFO_KIND nlattr[IFLA_INFO_KIND, string[TYPE]] 277 IFLA_INFO_DATA nlnest[DATA_TYPE, DATA] 278 } 279 280 # TODO: can, dummy, geneve, ifb, netdevsim, nlmon, vrf, vxlan 281 ifla_info_policy [ 282 bond ifla_info_policy$t["bond", IFLA_INFO_DATA, array[bond_policy]] 283 bond_slave ifla_info_policy$t["bond_slave", IFLA_INFO_SLAVE_DATA, bond_slave_policy] 284 bridge ifla_info_policy$t["bridge", IFLA_INFO_DATA, array[br_policy]] 285 bridge_slave ifla_info_policy$t["bridge_slave", IFLA_INFO_SLAVE_DATA, array[br_port_policy]] 286 gre ifla_info_policy$t["gre", IFLA_INFO_DATA, array[ipgre_policy]] 287 gretap ifla_info_policy$t["gretap", IFLA_INFO_DATA, array[ipgre_policy]] 288 erspan ifla_info_policy$t["erspan", IFLA_INFO_DATA, array[ipgre_policy]] 289 ip6gre ifla_info_policy$t["ip6gre", IFLA_INFO_DATA, array[ip6gre_policy]] 290 ip6gretap ifla_info_policy$t["ip6gretap", IFLA_INFO_DATA, array[ip6gre_policy]] 291 ip6erspan ifla_info_policy$t["ip6erspan", IFLA_INFO_DATA, array[ip6gre_policy]] 292 ipip ifla_info_policy$t["ipip", IFLA_INFO_DATA, array[ipip_policy]] 293 ipip6 ifla_info_policy$t["ip6tnl", IFLA_INFO_DATA, array[ip6_tnl_policy]] 294 sit ifla_info_policy$t["sit", IFLA_INFO_DATA, array[ipip6_policy]] 295 veth ifla_info_policy$t["veth", IFLA_INFO_DATA, optional[veth_policy]] 296 vti ifla_info_policy$t["vti", IFLA_INFO_DATA, array[vti_policy]] 297 ip6vti ifla_info_policy$t["ip6vti", IFLA_INFO_DATA, array[vti6_policy]] 298 # TODO: this should be a net device fd. How does one even obtain these? 299 ppp ifla_info_policy$t["ppp", IFLA_INFO_DATA, nlattr[IFLA_PPP_DEV_FD, fd]] 300 # This is not an array[gtp_policy] intentionally, gtp_policy is a struct. 301 gtp ifla_info_policy$t["gtp", IFLA_INFO_DATA, gtp_policy] 302 hsr ifla_info_policy$t["hsr", IFLA_INFO_DATA, array[hsr_policy]] 303 xfrm ifla_info_policy$t["xfrm", IFLA_INFO_DATA, array[xfrmi_policy]] 304 vcan ifla_info_policy$t["vcan", IFLA_INFO_DATA, void] 305 vxcan ifla_info_policy$t["vxcan", IFLA_INFO_DATA, optional[nlattr[VXCAN_INFO_PEER, peer_info]]] 306 vlan ifla_info_policy$t["vlan", IFLA_INFO_DATA, array[vlan_policy]] 307 ipvlan ifla_info_policy$t["ipvlan", IFLA_INFO_DATA, array[ipvlan_nl_policy]] 308 macvlan ifla_info_policy$t["macvlan", IFLA_INFO_DATA, array[macvlan_policy]] 309 macvtap ifla_info_policy$t["macvtap", IFLA_INFO_DATA, void] 310 macsec ifla_info_policy$t["macsec", IFLA_INFO_DATA, array[macsec_rtnl_policy]] 311 lowpan ifla_info_policy$t["lowpan", IFLA_INFO_DATA, void] 312 ipoib ifla_info_policy$t["ipoib", IFLA_INFO_DATA, array[ipoib_policy]] 313 geneve ifla_info_policy$t["geneve", IFLA_INFO_DATA, array[geneve_policy]] 314 wireguard ifla_info_policy$t["wireguard", IFLA_INFO_DATA, void] 315 batadv ifla_info_policy$t["batadv", IFLA_INFO_DATA, array[batadv_policy]] 316 ] [varlen] 317 318 batadv_policy [ 319 IFLA_BATADV_ALGO_NAME nlattr[IFLA_BATADV_ALGO_NAME, stringnoz[batadv_algo]] 320 ] [varlen] 321 322 # See batadv_algo_ops/batadv_algo_register. 323 batadv_algo = "BATMAN_V", "BATMAN_IV" 324 325 geneve_policy [ 326 IFLA_GENEVE_ID nlattr[IFLA_GENEVE_ID, int32[0:4]] 327 IFLA_GENEVE_REMOTE nlattr[IFLA_GENEVE_REMOTE, ipv4_addr] 328 IFLA_GENEVE_REMOTE6 nlattr[IFLA_GENEVE_REMOTE6, ipv6_addr] 329 IFLA_GENEVE_TTL nlattr[IFLA_GENEVE_TTL, int8] 330 IFLA_GENEVE_TOS nlattr[IFLA_GENEVE_TOS, int8] 331 IFLA_GENEVE_LABEL nlnetw[IFLA_GENEVE_LABEL, int32be] 332 IFLA_GENEVE_PORT nlattr[IFLA_GENEVE_PORT, sock_port] 333 IFLA_GENEVE_COLLECT_METADATA nlattr[IFLA_GENEVE_COLLECT_METADATA, void] 334 IFLA_GENEVE_UDP_CSUM nlattr[IFLA_GENEVE_UDP_CSUM, bool8] 335 IFLA_GENEVE_UDP_ZERO_CSUM6_TX nlattr[IFLA_GENEVE_UDP_ZERO_CSUM6_TX, bool8] 336 IFLA_GENEVE_UDP_ZERO_CSUM6_RX nlattr[IFLA_GENEVE_UDP_ZERO_CSUM6_RX, bool8] 337 IFLA_GENEVE_TTL_INHERIT nlattr[IFLA_GENEVE_TTL_INHERIT, bool8] 338 IFLA_GENEVE_DF nlattr[IFLA_GENEVE_DF, int8] 339 ] [varlen] 340 341 ipoib_policy [ 342 IFLA_IPOIB_PKEY nlattr[IFLA_IPOIB_PKEY, int16] 343 IFLA_IPOIB_MODE nlattr[IFLA_IPOIB_MODE, bool16] 344 IFLA_IPOIB_UMCAST nlattr[IFLA_IPOIB_UMCAST, bool16] 345 ] [varlen] 346 347 macsec_rtnl_policy [ 348 # TODO: all of these need better types. 349 IFLA_MACSEC_SCI nlattr[IFLA_MACSEC_SCI, int64] 350 IFLA_MACSEC_PORT nlnetw[IFLA_MACSEC_PORT, sock_port] 351 IFLA_MACSEC_ICV_LEN nlattr[IFLA_MACSEC_ICV_LEN, int8] 352 IFLA_MACSEC_CIPHER_SUITE nlattr[IFLA_MACSEC_CIPHER_SUITE, int64] 353 IFLA_MACSEC_WINDOW nlattr[IFLA_MACSEC_WINDOW, int32] 354 IFLA_MACSEC_ENCODING_SA nlattr[IFLA_MACSEC_ENCODING_SA, int8] 355 IFLA_MACSEC_ENCRYPT nlattr[IFLA_MACSEC_ENCRYPT, int8] 356 IFLA_MACSEC_PROTECT nlattr[IFLA_MACSEC_PROTECT, int8] 357 IFLA_MACSEC_INC_SCI nlattr[IFLA_MACSEC_INC_SCI, int8] 358 IFLA_MACSEC_ES nlattr[IFLA_MACSEC_ES, int8] 359 IFLA_MACSEC_SCB nlattr[IFLA_MACSEC_SCB, int8] 360 IFLA_MACSEC_REPLAY_PROTECT nlattr[IFLA_MACSEC_REPLAY_PROTECT, int8] 361 IFLA_MACSEC_VALIDATION nlattr[IFLA_MACSEC_VALIDATION, int8] 362 ] [varlen] 363 364 ipvlan_nl_policy [ 365 IFLA_IPVLAN_MODE nlattr[IFLA_IPVLAN_MODE, flags[ipvlan_mode, int16]] 366 IFLA_IPVLAN_FLAGS nlattr[IFLA_IPVLAN_FLAGS, flags[ipvlan_flags, int16]] 367 ] [varlen] 368 369 ipvlan_mode = IPVLAN_MODE_L2, IPVLAN_MODE_L3, IPVLAN_MODE_L3S 370 ipvlan_flags = IPVLAN_F_PRIVATE, IPVLAN_F_VEPA 371 372 macvlan_policy [ 373 IFLA_MACVLAN_MODE nlattr[IFLA_MACVLAN_MODE, flags[macvlan_mode, int32]] 374 IFLA_MACVLAN_FLAGS nlattr[IFLA_MACVLAN_FLAGS, bool16] 375 IFLA_MACVLAN_MACADDR_MODE nlattr[IFLA_MACVLAN_MACADDR_MODE, flags[macvlan_macaddr_mode, int32]] 376 IFLA_MACVLAN_MACADDR nlattr[IFLA_MACVLAN_MACADDR, mac_addr] 377 IFLA_MACVLAN_MACADDR_DATA nlnest[IFLA_MACVLAN_MACADDR_DATA, array[nlattr[IFLA_MACVLAN_MACADDR, mac_addr]]] 378 IFLA_MACVLAN_BC_QUEUE_LEN nlattr[IFLA_MACVLAN_BC_QUEUE_LEN, int32] 379 ] [varlen] 380 381 macvlan_mode = MACVLAN_MODE_PRIVATE, MACVLAN_MODE_VEPA, MACVLAN_MODE_BRIDGE, MACVLAN_MODE_PASSTHRU, MACVLAN_MODE_SOURCE 382 macvlan_macaddr_mode = MACVLAN_MACADDR_ADD, MACVLAN_MACADDR_DEL, MACVLAN_MACADDR_FLUSH, MACVLAN_MACADDR_SET 383 384 vlan_policy [ 385 IFLA_VLAN_ID nlattr[IFLA_VLAN_ID, int16[0:4]] 386 IFLA_VLAN_FLAGS nlattr[IFLA_VLAN_FLAGS, ifla_vlan_flags] 387 IFLA_VLAN_EGRESS_QOS nlnest[IFLA_VLAN_EGRESS_QOS, array[vlan_map_policy]] 388 IFLA_VLAN_INGRESS_QOS nlnest[IFLA_VLAN_INGRESS_QOS, array[vlan_map_policy]] 389 IFLA_VLAN_PROTOCOL nlattr[IFLA_VLAN_PROTOCOL, flags[vlan_proto, int16be]] 390 ] [varlen] 391 392 ifla_vlan_flags { 393 flags flags[ifla_vlan_flags, int32] 394 mask flags[ifla_vlan_flags, int32] 395 } 396 397 ifla_vlan_flags = VLAN_FLAG_REORDER_HDR, VLAN_FLAG_GVRP, VLAN_FLAG_LOOSE_BINDING, VLAN_FLAG_MVRP, VLAN_FLAG_BRIDGE_BINDING 398 399 vlan_map_policy [ 400 IFLA_VLAN_QOS_MAPPING nlattr[IFLA_VLAN_QOS_MAPPING, ifla_vlan_qos_mapping] 401 ] [varlen] 402 403 ifla_vlan_qos_mapping { 404 from int32 405 to int32 406 } 407 408 xfrmi_policy [ 409 IFLA_XFRM_LINK nlattr[IFLA_XFRM_LINK, int32[0:4]] 410 IFLA_XFRM_IF_ID nlattr[IFLA_XFRM_IF_ID, xfrm_if_id] 411 ] [varlen] 412 413 hsr_policy [ 414 IFLA_HSR_SLAVE1 nlattr[IFLA_HSR_SLAVE1, ifindex] 415 IFLA_HSR_SLAVE2 nlattr[IFLA_HSR_SLAVE2, ifindex] 416 IFLA_HSR_MULTICAST_SPEC nlattr[IFLA_HSR_MULTICAST_SPEC, int8] 417 IFLA_HSR_VERSION nlattr[IFLA_HSR_VERSION, int8] 418 IFLA_HSR_SUPERVISION_ADDR nlattr[IFLA_HSR_SUPERVISION_ADDR, mac_addr] 419 IFLA_HSR_SEQ_NR nlattr[IFLA_HSR_SEQ_NR, int16] 420 IFLA_HSR_PROTOCOL nlattr[IFLA_HSR_PROTOCOL, int8[0:HSR_PROTOCOL_MAX]] 421 ] [varlen] 422 423 bond_policy [ 424 IFLA_BOND_MODE nlattr[IFLA_BOND_MODE, int8[0:6]] 425 IFLA_BOND_ACTIVE_SLAVE nlattr[IFLA_BOND_ACTIVE_SLAVE, ifindex] 426 IFLA_BOND_MIIMON nlattr[IFLA_BOND_MIIMON, int32] 427 IFLA_BOND_UPDELAY nlattr[IFLA_BOND_UPDELAY, int32] 428 IFLA_BOND_DOWNDELAY nlattr[IFLA_BOND_DOWNDELAY, int32] 429 IFLA_BOND_USE_CARRIER nlattr[IFLA_BOND_USE_CARRIER, int8] 430 IFLA_BOND_ARP_INTERVAL nlattr[IFLA_BOND_ARP_INTERVAL, int32] 431 IFLA_BOND_ARP_IP_TARGET nlnest[IFLA_BOND_ARP_IP_TARGET, array[ipv4_addr]] 432 IFLA_BOND_ARP_VALIDATE nlattr[IFLA_BOND_ARP_VALIDATE, int32[0:3]] 433 IFLA_BOND_ARP_ALL_TARGETS nlattr[IFLA_BOND_ARP_ALL_TARGETS, int32[0:1]] 434 IFLA_BOND_PRIMARY nlattr[IFLA_BOND_PRIMARY, ifindex] 435 IFLA_BOND_PRIMARY_RESELECT nlattr[IFLA_BOND_PRIMARY_RESELECT, int8[0:2]] 436 IFLA_BOND_FAIL_OVER_MAC nlattr[IFLA_BOND_FAIL_OVER_MAC, int8[0:2]] 437 IFLA_BOND_XMIT_HASH_POLICY nlattr[IFLA_BOND_XMIT_HASH_POLICY, int8[0:4]] 438 IFLA_BOND_RESEND_IGMP nlattr[IFLA_BOND_RESEND_IGMP, int32] 439 IFLA_BOND_NUM_PEER_NOTIF nlattr[IFLA_BOND_NUM_PEER_NOTIF, int8] 440 IFLA_BOND_ALL_SLAVES_ACTIVE nlattr[IFLA_BOND_ALL_SLAVES_ACTIVE, int8] 441 IFLA_BOND_MIN_LINKS nlattr[IFLA_BOND_MIN_LINKS, int32] 442 IFLA_BOND_LP_INTERVAL nlattr[IFLA_BOND_LP_INTERVAL, int32] 443 IFLA_BOND_PACKETS_PER_SLAVE nlattr[IFLA_BOND_PACKETS_PER_SLAVE, int32] 444 IFLA_BOND_AD_LACP_RATE nlattr[IFLA_BOND_AD_LACP_RATE, int8[0:1]] 445 IFLA_BOND_AD_SELECT nlattr[IFLA_BOND_AD_SELECT, int8[0:2]] 446 IFLA_BOND_AD_ACTOR_SYS_PRIO nlattr[IFLA_BOND_AD_ACTOR_SYS_PRIO, int16] 447 IFLA_BOND_AD_USER_PORT_KEY nlattr[IFLA_BOND_AD_USER_PORT_KEY, int16] 448 IFLA_BOND_AD_ACTOR_SYSTEM nlattr[IFLA_BOND_AD_ACTOR_SYSTEM, ipv4_addr] 449 IFLA_BOND_TLB_DYNAMIC_LB nlattr[IFLA_BOND_TLB_DYNAMIC_LB, int8] 450 IFLA_BOND_PEER_NOTIF_DELAY nlattr[IFLA_BOND_PEER_NOTIF_DELAY, int32] 451 IFLA_BOND_AD_LACP_ACTIVE nlattr[IFLA_BOND_AD_LACP_ACTIVE, int8] 452 ] [varlen] 453 454 bond_slave_policy [ 455 IFLA_BOND_SLAVE_QUEUE_ID nlattr[IFLA_BOND_SLAVE_QUEUE_ID, int16] 456 ] [varlen] 457 458 br_policy [ 459 IFLA_BR_FORWARD_DELAY nlattr[IFLA_BR_FORWARD_DELAY, int32[2:30]] 460 IFLA_BR_HELLO_TIME nlattr[IFLA_BR_HELLO_TIME, int32[1:10]] 461 IFLA_BR_MAX_AGE nlattr[IFLA_BR_MAX_AGE, int32[6:40]] 462 IFLA_BR_AGEING_TIME nlattr[IFLA_BR_AGEING_TIME, int32] 463 IFLA_BR_STP_STATE nlattr[IFLA_BR_STP_STATE, int32[0:1]] 464 IFLA_BR_PRIORITY nlattr[IFLA_BR_PRIORITY, int16] 465 IFLA_BR_VLAN_FILTERING nlattr[IFLA_BR_VLAN_FILTERING, int8] 466 IFLA_BR_VLAN_PROTOCOL nlattr[IFLA_BR_VLAN_PROTOCOL, flags[vlan_proto, int16]] 467 IFLA_BR_GROUP_FWD_MASK nlattr[IFLA_BR_GROUP_FWD_MASK, int16] 468 IFLA_BR_GROUP_ADDR nlattr[IFLA_BR_GROUP_ADDR, mac_addr] 469 IFLA_BR_MCAST_ROUTER nlattr[IFLA_BR_MCAST_ROUTER, bool8] 470 IFLA_BR_MCAST_SNOOPING nlattr[IFLA_BR_MCAST_SNOOPING, bool8] 471 IFLA_BR_MCAST_QUERY_USE_IFADDR nlattr[IFLA_BR_MCAST_QUERY_USE_IFADDR, bool8] 472 IFLA_BR_MCAST_QUERIER nlattr[IFLA_BR_MCAST_QUERIER, int8] 473 IFLA_BR_MCAST_HASH_ELASTICITY nlattr[IFLA_BR_MCAST_HASH_ELASTICITY, int32] 474 IFLA_BR_MCAST_HASH_MAX nlattr[IFLA_BR_MCAST_HASH_MAX, int32] 475 IFLA_BR_MCAST_LAST_MEMBER_CNT nlattr[IFLA_BR_MCAST_LAST_MEMBER_CNT, int32] 476 IFLA_BR_MCAST_STARTUP_QUERY_CNT nlattr[IFLA_BR_MCAST_STARTUP_QUERY_CNT, int32] 477 IFLA_BR_MCAST_LAST_MEMBER_INTVL nlattr[IFLA_BR_MCAST_LAST_MEMBER_INTVL, int64] 478 IFLA_BR_MCAST_MEMBERSHIP_INTVL nlattr[IFLA_BR_MCAST_MEMBERSHIP_INTVL, int64] 479 IFLA_BR_MCAST_QUERIER_INTVL nlattr[IFLA_BR_MCAST_QUERIER_INTVL, int64] 480 IFLA_BR_MCAST_QUERY_INTVL nlattr[IFLA_BR_MCAST_QUERY_INTVL, int64] 481 IFLA_BR_MCAST_QUERY_RESPONSE_INTVL nlattr[IFLA_BR_MCAST_QUERY_RESPONSE_INTVL, int64] 482 IFLA_BR_MCAST_STARTUP_QUERY_INTVL nlattr[IFLA_BR_MCAST_STARTUP_QUERY_INTVL, int64] 483 IFLA_BR_NF_CALL_IPTABLES nlattr[IFLA_BR_NF_CALL_IPTABLES, bool8] 484 IFLA_BR_NF_CALL_IP6TABLES nlattr[IFLA_BR_NF_CALL_IP6TABLES, bool8] 485 IFLA_BR_NF_CALL_ARPTABLES nlattr[IFLA_BR_NF_CALL_ARPTABLES, bool8] 486 IFLA_BR_VLAN_DEFAULT_PVID nlattr[IFLA_BR_VLAN_DEFAULT_PVID, int16] 487 IFLA_BR_VLAN_STATS_ENABLED nlattr[IFLA_BR_VLAN_STATS_ENABLED, bool8] 488 IFLA_BR_MCAST_STATS_ENABLED nlattr[IFLA_BR_MCAST_STATS_ENABLED, bool8] 489 IFLA_BR_MCAST_IGMP_VERSION nlattr[IFLA_BR_MCAST_IGMP_VERSION, int8] 490 IFLA_BR_MCAST_MLD_VERSION nlattr[IFLA_BR_MCAST_MLD_VERSION, int8] 491 IFLA_BR_VLAN_STATS_PER_PORT nlattr[IFLA_BR_VLAN_STATS_PER_PORT, bool8] 492 IFLA_BR_MULTI_BOOLOPT nlattr[IFLA_BR_MULTI_BOOLOPT, br_boolopt_multi] 493 ] [varlen] 494 495 br_boolopt_multi { 496 optval flags[br_boolopt_id, int32] 497 optmask flags[br_boolopt_id, int32] 498 } 499 500 br_boolopt_id = BR_BOOLOPT_NO_LL_LEARN, BR_BOOLOPT_MCAST_VLAN_SNOOPING 501 502 br_port_policy [ 503 IFLA_BRPORT_STATE nlattr[IFLA_BRPORT_STATE, int8[0:4]] 504 IFLA_BRPORT_COST nlattr[IFLA_BRPORT_COST, int32] 505 IFLA_BRPORT_PRIORITY nlattr[IFLA_BRPORT_PRIORITY, int16] 506 IFLA_BRPORT_MODE nlattr[IFLA_BRPORT_MODE, int8[0:1]] 507 IFLA_BRPORT_GUARD nlattr[IFLA_BRPORT_GUARD, int8[0:1]] 508 IFLA_BRPORT_PROTECT nlattr[IFLA_BRPORT_PROTECT, int8[0:1]] 509 IFLA_BRPORT_FAST_LEAVE nlattr[IFLA_BRPORT_FAST_LEAVE, int8[0:1]] 510 IFLA_BRPORT_LEARNING nlattr[IFLA_BRPORT_LEARNING, int8[0:1]] 511 IFLA_BRPORT_UNICAST_FLOOD nlattr[IFLA_BRPORT_UNICAST_FLOOD, int8[0:1]] 512 IFLA_BRPORT_PROXYARP nlattr[IFLA_BRPORT_PROXYARP, int8[0:1]] 513 IFLA_BRPORT_PROXYARP_WIFI nlattr[IFLA_BRPORT_PROXYARP_WIFI, int8[0:1]] 514 IFLA_BRPORT_MULTICAST_ROUTER nlattr[IFLA_BRPORT_MULTICAST_ROUTER, int8[0:3]] 515 IFLA_BRPORT_MCAST_TO_UCAST nlattr[IFLA_BRPORT_MCAST_TO_UCAST, int8[0:1]] 516 IFLA_BRPORT_MCAST_FLOOD nlattr[IFLA_BRPORT_MCAST_FLOOD, int8[0:1]] 517 IFLA_BRPORT_BCAST_FLOOD nlattr[IFLA_BRPORT_BCAST_FLOOD, int8[0:1]] 518 IFLA_BRPORT_VLAN_TUNNEL nlattr[IFLA_BRPORT_VLAN_TUNNEL, int8[0:1]] 519 IFLA_BRPORT_GROUP_FWD_MASK nlattr[IFLA_BRPORT_GROUP_FWD_MASK, int16] 520 IFLA_BRPORT_NEIGH_SUPPRESS nlattr[IFLA_BRPORT_NEIGH_SUPPRESS, int8[0:1]] 521 IFLA_BRPORT_ISOLATED nlattr[IFLA_BRPORT_ISOLATED, int8[0:1]] 522 IFLA_BRPORT_FLUSH nlattr[IFLA_BRPORT_FLUSH, void] 523 IFLA_BRPORT_BACKUP_PORT nlattr[IFLA_BRPORT_BACKUP_PORT, ifindex] 524 IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT nlattr[IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT, int32] 525 ] [varlen] 526 527 ipgre_policy [ 528 IFLA_GRE_LINK nlattr[IFLA_GRE_LINK, ifindex] 529 IFLA_GRE_IFLAGS nlattr[IFLA_GRE_IFLAGS, int16] 530 IFLA_GRE_OFLAGS nlattr[IFLA_GRE_OFLAGS, int16] 531 IFLA_GRE_IKEY nlattr[IFLA_GRE_IKEY, int32] 532 IFLA_GRE_OKEY nlattr[IFLA_GRE_OKEY, int32] 533 IFLA_GRE_LOCAL nlattr[IFLA_GRE_LOCAL, ipv4_addr] 534 IFLA_GRE_REMOTE nlattr[IFLA_GRE_REMOTE, ipv4_addr] 535 IFLA_GRE_TTL nlattr[IFLA_GRE_TTL, int8] 536 IFLA_GRE_TOS nlattr[IFLA_GRE_TOS, int8] 537 IFLA_GRE_PMTUDISC nlattr[IFLA_GRE_PMTUDISC, int8[0:1]] 538 IFLA_GRE_ENCAP_TYPE nlattr[IFLA_GRE_ENCAP_TYPE, flags[tunnel_encap_types, int16]] 539 IFLA_GRE_ENCAP_FLAGS nlattr[IFLA_GRE_ENCAP_FLAGS, int16] 540 IFLA_GRE_ENCAP_SPORT nlattr[IFLA_GRE_ENCAP_SPORT, sock_port] 541 IFLA_GRE_ENCAP_DPORT nlattr[IFLA_GRE_ENCAP_DPORT, sock_port] 542 IFLA_GRE_COLLECT_METADATA nlattr[IFLA_GRE_COLLECT_METADATA, void] 543 IFLA_GRE_IGNORE_DF nlattr[IFLA_GRE_IGNORE_DF, int8[0:1]] 544 IFLA_GRE_FWMARK nlattr[IFLA_GRE_FWMARK, int32] 545 IFLA_GRE_ERSPAN_INDEX nlattr[IFLA_GRE_ERSPAN_INDEX, int32[1:0xfffff]] 546 IFLA_GRE_ERSPAN_VER nlattr[IFLA_GRE_ERSPAN_VER, int8[1:2]] 547 IFLA_GRE_ERSPAN_DIR nlattr[IFLA_GRE_ERSPAN_DIR, int8[0:1]] 548 IFLA_GRE_ERSPAN_HWID nlattr[IFLA_GRE_ERSPAN_HWID, int16] 549 ] [varlen] 550 551 ip6gre_policy [ 552 IFLA_GRE_LINK nlattr[IFLA_GRE_LINK, ifindex] 553 IFLA_GRE_IFLAGS nlattr[IFLA_GRE_IFLAGS, int16] 554 IFLA_GRE_OFLAGS nlattr[IFLA_GRE_OFLAGS, int16] 555 IFLA_GRE_IKEY nlattr[IFLA_GRE_IKEY, int32] 556 IFLA_GRE_OKEY nlattr[IFLA_GRE_OKEY, int32] 557 IFLA_GRE_LOCAL nlattr[IFLA_GRE_LOCAL, ipv6_addr] 558 IFLA_GRE_REMOTE nlattr[IFLA_GRE_REMOTE, ipv6_addr] 559 IFLA_GRE_TTL nlattr[IFLA_GRE_TTL, int8] 560 IFLA_GRE_ENCAP_LIMIT nlattr[IFLA_GRE_ENCAP_LIMIT, int8] 561 IFLA_GRE_FLOWINFO nlattr[IFLA_GRE_FLOWINFO, int32] 562 IFLA_GRE_FLAGS nlattr[IFLA_GRE_FLAGS, int32] 563 IFLA_GRE_ENCAP_TYPE nlattr[IFLA_GRE_ENCAP_TYPE, flags[tunnel_encap_types, int16]] 564 IFLA_GRE_ENCAP_FLAGS nlattr[IFLA_GRE_ENCAP_FLAGS, int16] 565 IFLA_GRE_ENCAP_SPORT nlattr[IFLA_GRE_ENCAP_SPORT, sock_port] 566 IFLA_GRE_ENCAP_DPORT nlattr[IFLA_GRE_ENCAP_DPORT, sock_port] 567 IFLA_GRE_COLLECT_METADATA nlattr[IFLA_GRE_COLLECT_METADATA, void] 568 IFLA_GRE_FWMARK nlattr[IFLA_GRE_FWMARK, int32] 569 IFLA_GRE_ERSPAN_INDEX nlattr[IFLA_GRE_ERSPAN_INDEX, int32[1:0xfffff]] 570 IFLA_GRE_ERSPAN_VER nlattr[IFLA_GRE_ERSPAN_VER, int8[1:2]] 571 IFLA_GRE_ERSPAN_DIR nlattr[IFLA_GRE_ERSPAN_DIR, int8[0:1]] 572 IFLA_GRE_ERSPAN_HWID nlattr[IFLA_GRE_ERSPAN_HWID, int16] 573 ] [varlen] 574 575 veth_policy [ 576 VETH_INFO_PEER nlattr[VETH_INFO_PEER, peer_info] 577 ] [varlen] 578 579 peer_info { 580 hdr ifinfomsg[AF_UNSPEC] 581 # This may be followed by ifla_policy for the peer, but adding it causes recursion. 582 # policy optional[ifla_policy] 583 } 584 585 vti_policy$common [ 586 IFLA_VTI_LINK nlattr[IFLA_VTI_LINK, ifindex] 587 IFLA_VTI_IKEY nlattr[IFLA_VTI_IKEY, int32] 588 IFLA_VTI_OKEY nlattr[IFLA_VTI_OKEY, int32] 589 IFLA_VTI_FWMARK nlattr[IFLA_VTI_FWMARK, int32] 590 ] [varlen] 591 592 vti_policy [ 593 IFLA_VTI_LOCAL nlattr[IFLA_VTI_LOCAL, ipv4_addr] 594 IFLA_VTI_REMOTE nlattr[IFLA_VTI_REMOTE, ipv4_addr] 595 vti_common_policy array[vti_policy$common] 596 ] [varlen] 597 598 vti6_policy [ 599 IFLA_VTI_LOCAL nlattr[IFLA_VTI_LOCAL, ipv6_addr] 600 IFLA_VTI_REMOTE nlattr[IFLA_VTI_REMOTE, ipv6_addr] 601 vti_common_policy array[vti_policy$common] 602 ] [varlen] 603 604 ipip_policy [ 605 IFLA_IPTUN_LINK nlattr[IFLA_IPTUN_LINK, ifindex] 606 IFLA_IPTUN_LOCAL nlattr[IFLA_IPTUN_LOCAL, ipv4_addr] 607 IFLA_IPTUN_REMOTE nlattr[IFLA_IPTUN_REMOTE, ipv4_addr] 608 IFLA_IPTUN_TTL nlattr[IFLA_IPTUN_TTL, int8] 609 IFLA_IPTUN_TOS nlattr[IFLA_IPTUN_TOS, int8] 610 IFLA_IPTUN_PROTO nlattr[IFLA_IPTUN_PROTO, flags[ipip6_ip_proto, int8]] 611 IFLA_IPTUN_PMTUDISC nlattr[IFLA_IPTUN_PMTUDISC, int8[0:1]] 612 IFLA_IPTUN_ENCAP_TYPE nlattr[IFLA_IPTUN_ENCAP_TYPE, flags[tunnel_encap_types, int16]] 613 IFLA_IPTUN_ENCAP_FLAGS nlattr[IFLA_IPTUN_ENCAP_FLAGS, int16] 614 IFLA_IPTUN_ENCAP_SPORT nlattr[IFLA_IPTUN_ENCAP_SPORT, sock_port] 615 IFLA_IPTUN_ENCAP_DPORT nlattr[IFLA_IPTUN_ENCAP_DPORT, sock_port] 616 IFLA_IPTUN_COLLECT_METADATA nlattr[IFLA_IPTUN_COLLECT_METADATA, void] 617 IFLA_IPTUN_FWMARK nlattr[IFLA_IPTUN_FWMARK, int32] 618 ] [varlen] 619 620 ipip6_policy [ 621 IFLA_IPTUN_LINK nlattr[IFLA_IPTUN_LINK, ifindex] 622 IFLA_IPTUN_LOCAL nlattr[IFLA_IPTUN_LOCAL, ipv4_addr] 623 IFLA_IPTUN_REMOTE nlattr[IFLA_IPTUN_REMOTE, ipv4_addr] 624 IFLA_IPTUN_TTL nlattr[IFLA_IPTUN_TTL, int8] 625 IFLA_IPTUN_TOS nlattr[IFLA_IPTUN_TOS, int8] 626 IFLA_IPTUN_PMTUDISC nlattr[IFLA_IPTUN_PMTUDISC, int8[0:1]] 627 IFLA_IPTUN_FLAGS nlattr[IFLA_IPTUN_FLAGS, int16[0:0x40]] 628 IFLA_IPTUN_PROTO nlattr[IFLA_IPTUN_PROTO, flags[ipip6_ip_proto, int8]] 629 IFLA_IPTUN_6RD_PREFIX nlattr[IFLA_IPTUN_6RD_PREFIX, ipv6_addr] 630 IFLA_IPTUN_6RD_RELAY_PREFIX nlattr[IFLA_IPTUN_6RD_RELAY_PREFIX, int32] 631 IFLA_IPTUN_6RD_PREFIXLEN nlattr[IFLA_IPTUN_6RD_PREFIXLEN, int16] 632 IFLA_IPTUN_6RD_RELAY_PREFIXLEN nlattr[IFLA_IPTUN_6RD_RELAY_PREFIXLEN, int16] 633 IFLA_IPTUN_ENCAP_TYPE nlattr[IFLA_IPTUN_ENCAP_TYPE, flags[tunnel_encap_types, int16]] 634 IFLA_IPTUN_ENCAP_FLAGS nlattr[IFLA_IPTUN_ENCAP_FLAGS, int16] 635 IFLA_IPTUN_ENCAP_SPORT nlattr[IFLA_IPTUN_ENCAP_SPORT, sock_port] 636 IFLA_IPTUN_ENCAP_DPORT nlattr[IFLA_IPTUN_ENCAP_DPORT, sock_port] 637 IFLA_IPTUN_FWMARK nlattr[IFLA_IPTUN_FWMARK, int32] 638 ] [varlen] 639 640 ip6_tnl_policy [ 641 IFLA_IPTUN_LINK nlattr[IFLA_IPTUN_LINK, ifindex] 642 IFLA_IPTUN_LOCAL nlattr[IFLA_IPTUN_LOCAL, ipv6_addr] 643 IFLA_IPTUN_REMOTE nlattr[IFLA_IPTUN_REMOTE, ipv6_addr] 644 IFLA_IPTUN_TTL nlattr[IFLA_IPTUN_TTL, int8] 645 IFLA_IPTUN_ENCAP_LIMIT nlattr[IFLA_IPTUN_ENCAP_LIMIT, int8] 646 IFLA_IPTUN_FLOWINFO nlattr[IFLA_IPTUN_FLOWINFO, int32] 647 IFLA_IPTUN_FLAGS nlattr[IFLA_IPTUN_FLAGS, int32[0:0x40]] 648 IFLA_IPTUN_PROTO nlattr[IFLA_IPTUN_PROTO, flags[ipip6_ip_proto, int8]] 649 IFLA_IPTUN_ENCAP_TYPE nlattr[IFLA_IPTUN_ENCAP_TYPE, flags[tunnel_encap_types, int16]] 650 IFLA_IPTUN_ENCAP_FLAGS nlattr[IFLA_IPTUN_ENCAP_FLAGS, int16] 651 IFLA_IPTUN_ENCAP_SPORT nlattr[IFLA_IPTUN_ENCAP_SPORT, sock_port] 652 IFLA_IPTUN_ENCAP_DPORT nlattr[IFLA_IPTUN_ENCAP_DPORT, sock_port] 653 IFLA_IPTUN_COLLECT_METADATA nlattr[IFLA_IPTUN_COLLECT_METADATA, void] 654 IFLA_IPTUN_FWMARK nlattr[IFLA_IPTUN_FWMARK, int32] 655 ] [varlen] 656 657 ipip6_ip_proto = IPPROTO_IPV6, IPPROTO_IPIP, IPPROTO_MPLS 658 659 ifa_ipv4_policy [ 660 IFA_LOCAL nlattr[IFA_LOCAL, ipv4_addr] 661 IFA_ADDRESS nlattr[IFA_ADDRESS, ipv4_addr] 662 IFA_BROADCAST nlattr[IFA_BROADCAST, ipv4_addr] 663 IFA_LABEL nlattr[IFA_LABEL, devname] 664 IFA_CACHEINFO nlattr[IFA_CACHEINFO, ifa_cacheinfo] 665 IFA_FLAGS nlattr[IFA_FLAGS, flags[ifa_flags, int32]] 666 IFA_RT_PRIORITY nlattr[IFA_RT_PRIORITY, int32] 667 IFA_TARGET_NETNSID nlattr[IFA_TARGET_NETNSID, netns_id] 668 ] [varlen] 669 670 ifa_ipv6_policy [ 671 IFA_ADDRESS nlattr[IFA_ADDRESS, ipv6_addr] 672 IFA_LOCAL nlattr[IFA_LOCAL, ipv6_addr] 673 IFA_CACHEINFO nlattr[IFA_CACHEINFO, ifa_cacheinfo] 674 IFA_FLAGS nlattr[IFA_FLAGS, flags[ifa_flags, int32]] 675 IFA_RT_PRIORITY nlattr[IFA_RT_PRIORITY, int32] 676 IFA_TARGET_NETNSID nlattr[IFA_TARGET_NETNSID, netns_id] 677 ] [varlen] 678 679 rtm_ipv4_policy [ 680 RTA_DST nlattr[RTA_DST, ipv4_addr] 681 RTA_SRC nlattr[RTA_SRC, ipv4_addr] 682 RTA_IIF nlattr[RTA_IIF, ifindex] 683 RTA_OIF nlattr[RTA_OIF, ifindex] 684 RTA_GATEWAY nlattr[RTA_GATEWAY, ipv4_addr] 685 RTA_PRIORITY nlattr[RTA_PRIORITY, int32] 686 RTA_PREFSRC nlattr[RTA_PREFSRC, ipv4_addr] 687 # TODO: what's this? is this interesting? 688 RTA_METRICS nlnest[RTA_METRICS, array[int8]] 689 RTA_MULTIPATH nlattr[RTA_MULTIPATH, rtnexthop] 690 RTA_FLOW nlattr[RTA_FLOW, int32] 691 RTA_ENCAP_TYPE nlattr[RTA_ENCAP_TYPE, flags[lwtunnel_encap_types, int16]] 692 RTA_ENCAP nlnest[RTA_ENCAP, lwtunnel_policy] 693 RTA_UID nlattr[RTA_UID, uid] 694 RTA_MARK nlattr[RTA_MARK, int32] 695 RTA_TABLE nlattr[RTA_TABLE, int32] 696 RTA_IP_PROTO nlattr[RTA_IP_PROTO, flags[rta_ip_protos, int8]] 697 RTA_SPORT nlattr[RTA_SPORT, sock_port] 698 RTA_DPORT nlattr[RTA_DPORT, sock_port] 699 RTA_NH_ID nlattr[RTA_NH_ID, int32] 700 ] [varlen] 701 702 rta_ip_protos = IPPROTO_TCP, IPPROTO_UDP, IPPROTO_ICMP, IPPROTO_ICMPV6 703 704 rtm_ipv6_policy [ 705 RTA_GATEWAY nlattr[RTA_GATEWAY, ipv6_addr] 706 RTA_IIF nlattr[RTA_IIF, ifindex] 707 RTA_OIF nlattr[RTA_OIF, ifindex] 708 RTA_PRIORITY nlattr[RTA_PRIORITY, int32] 709 # TODO: what's this? is this interesting? 710 RTA_METRICS nlnest[RTA_METRICS, array[int8]] 711 RTA_MULTIPATH nlattr[RTA_MULTIPATH, rtnexthop] 712 RTA_PREF nlattr[RTA_PREF, int8] 713 RTA_ENCAP_TYPE nlattr[RTA_ENCAP_TYPE, flags[lwtunnel_encap_types, int16]] 714 RTA_ENCAP nlnest[RTA_ENCAP, lwtunnel_policy] 715 RTA_EXPIRES nlattr[RTA_EXPIRES, int32] 716 RTA_UID nlattr[RTA_UID, uid] 717 RTA_MARK nlattr[RTA_MARK, int32] 718 ] [varlen] 719 720 rtm_mpls_policy [ 721 RTA_DST nlattr[RTA_DST, mpls_label] 722 RTA_MULTIPATH nlattr[RTA_MULTIPATH, rtnexthop] 723 RTA_NEWDST nlattr[RTA_NEWDST, array[mpls_label, 32]] 724 RTA_OIF nlattr[RTA_OIF, ifindex] 725 RTA_TTL_PROPAGATE nlattr[RTA_TTL_PROPAGATE, int8] 726 RTA_VIA nlattr[RTA_VIA, sockaddr_generic] 727 ] [varlen] 728 729 type fib_rule_hdr[FAMILY] { 730 family const[FAMILY, int8] 731 dst_len flags[rtm_addr_len, int8] 732 rcdst_len flags[rtm_addr_len, int8] 733 tos int8 734 table int8 735 res1 const[0, int8] 736 res2 const[0, int8] 737 action flags[fr_actions, int8] 738 flags flags[fr_flags, int32] 739 } 740 741 fib_rule_uid_range { 742 start uid 743 end uid 744 } 745 746 fib_rule_port_range { 747 start sock_port 748 end sock_port 749 } 750 751 fib4_rule_policy_generic [ 752 FRA_IIFNAME nlattr[FRA_IIFNAME, devname] 753 FRA_OIFNAME nlattr[FRA_OIFNAME, devname] 754 FRA_PRIORITY nlattr[FRA_PRIORITY, int32] 755 FRA_FWMARK nlattr[FRA_FWMARK, int32] 756 FRA_FWMASK nlattr[FRA_FWMASK, int32] 757 FRA_TABLE nlattr[FRA_TABLE, int32] 758 FRA_SUPPRESS_PREFIXLEN nlattr[FRA_SUPPRESS_PREFIXLEN, int32] 759 FRA_SUPPRESS_IFGROUP nlattr[FRA_SUPPRESS_IFGROUP, int32] 760 FRA_GOTO nlattr[FRA_GOTO, int32] 761 FRA_L3MDEV nlattr[FRA_L3MDEV, int8] 762 FRA_UID_RANGE nlattr[FRA_UID_RANGE, fib_rule_uid_range] 763 FRA_PROTOCOL nlattr[FRA_PROTOCOL, flags[rtm_protocol, int8]] 764 FRA_IP_PROTO nlattr[FRA_IP_PROTO, flags[ipv6_types, int8]] 765 FRA_SPORT_RANGE nlattr[FRA_SPORT_RANGE, fib_rule_port_range] 766 FRA_DPORT_RANGE nlattr[FRA_DPORT_RANGE, fib_rule_port_range] 767 ] [varlen] 768 769 # FRA_DST/SRC are not in fib4/6_rule_policy. But fib4/6 still need them. 770 # So I add them here. 771 fib4_rule_policy [ 772 FRA_DST nlattr[RTA_DST, ipv4_addr] 773 FRA_SRC nlattr[RTA_SRC, ipv4_addr] 774 FRA_GENERIC_POLICY fib4_rule_policy_generic 775 FRA_FLOW nlattr[FRA_FLOW, int32] 776 FRA_TUN_ID nlnetw[FRA_TUN_ID, int64be] 777 ] [varlen] 778 779 fib6_rule_policy [ 780 FRA_DST nlattr[RTA_DST, ipv6_addr] 781 FRA_SRC nlattr[RTA_SRC, ipv6_addr] 782 FIB_RULE_POLICY fib4_rule_policy_generic 783 ] [varlen] 784 785 nl_neightbl_policy [ 786 NDTA_NAME nlattr[NDTA_NAME, string] 787 NDTA_THRESH1 nlattr[NDTA_THRESH1, int32] 788 NDTA_THRESH2 nlattr[NDTA_THRESH2, int32] 789 NDTA_THRESH3 nlattr[NDTA_THRESH3, int32] 790 NDTA_GC_INTERVAL nlattr[NDTA_GC_INTERVAL, int64] 791 NDTA_PARMS nlnest[NDTA_PARMS, array[nl_ntbl_parm_policy]] 792 ] [varlen] 793 794 nl_ntbl_parm_policy [ 795 NDTPA_IFINDEX nlattr[NDTPA_IFINDEX, ifindex] 796 NDTPA_QUEUE_LEN nlattr[NDTPA_QUEUE_LEN, int32] 797 NDTPA_PROXY_QLEN nlattr[NDTPA_PROXY_QLEN, int32] 798 NDTPA_APP_PROBES nlattr[NDTPA_APP_PROBES, int32] 799 NDTPA_UCAST_PROBES nlattr[NDTPA_UCAST_PROBES, int32] 800 NDTPA_MCAST_PROBES nlattr[NDTPA_MCAST_PROBES, int32] 801 NDTPA_MCAST_REPROBES nlattr[NDTPA_MCAST_REPROBES, int32] 802 NDTPA_BASE_REACHABLE_TIME nlattr[NDTPA_BASE_REACHABLE_TIME, int64] 803 NDTPA_GC_STALETIME nlattr[NDTPA_GC_STALETIME, int64] 804 NDTPA_DELAY_PROBE_TIME nlattr[NDTPA_DELAY_PROBE_TIME, int64] 805 NDTPA_RETRANS_TIME nlattr[NDTPA_RETRANS_TIME, int64] 806 NDTPA_ANYCAST_DELAY nlattr[NDTPA_ANYCAST_DELAY, int64] 807 NDTPA_PROXY_DELAY nlattr[NDTPA_PROXY_DELAY, int64] 808 NDTPA_LOCKTIME nlattr[NDTPA_LOCKTIME, int64] 809 ] [varlen] 810 811 nda_policy [ 812 NDA_DST_IPV4 nlattr[NDA_DST, ipv4_addr] 813 NDA_DST_IPV6 nlattr[NDA_DST, ipv6_addr] 814 NDA_DST_MAC nlattr[NDA_DST, mac_addr] 815 NDA_LLADDR nlattr[NDA_LLADDR, mac_addr] 816 NDA_CACHEINFO nlattr[NDA_CACHEINFO, nda_cacheinfo] 817 NDA_PROBES nlattr[NDA_PROBES, int32] 818 NDA_VLAN nlattr[NDA_VLAN, int16[0:4]] 819 NDA_PORT nlattr[NDA_PORT, sock_port] 820 NDA_VNI nlattr[NDA_VNI, int32] 821 NDA_IFINDEX nlattr[NDA_IFINDEX, ifindex] 822 NDA_MASTER nlattr[NDA_MASTER, int32] 823 NDA_LINK_NETNSID nlattr[NDA_LINK_NETNSID, int32] 824 NDA_SRC_VNI nlattr[NDA_SRC_VNI, int32] 825 NDA_FLAGS_EXT nlattr[NDA_FLAGS_EXT, flags[ndm_ext_flags, int32]] 826 NDA_PROTOCOL nlattr[NDA_PROTOCOL, int8] 827 NDA_NH_ID nlattr[NDA_NH_ID, int32] 828 NDA_FDB_EXT_ATTRS nlnest[NDA_FDB_EXT_ATTRS, array[br_nda_fdb_pol]] 829 ] [varlen] 830 831 br_nda_fdb_pol [ 832 NFEA_ACTIVITY_NOTIFY nlattr[NFEA_ACTIVITY_NOTIFY, int8] 833 NFEA_DONT_REFRESH nlattr[NFEA_DONT_REFRESH, void] 834 ] [varlen] 835 836 nda_cacheinfo { 837 ndm_confirmed int32 838 ndm_used int32 839 ndm_updated int32 840 ndm_refcnt int32 841 } 842 843 rtnexthop { 844 rtnh_len int16 845 rtnh_flags flags[rtnh_flags, int8] 846 rtnh_hops int8 847 rtnh_ifindex ifindex 848 } 849 850 ifa_cacheinfo { 851 ifa_prefered int32 852 ifa_valid int32 853 cstamp int32 854 tstamp int32 855 } 856 857 br_vlan_db_dump_pol [ 858 BRIDGE_VLANDB_DUMP_FLAGS nlattr[BRIDGE_VLANDB_DUMP_FLAGS, flags[br_vlan_dumpflags, int32]] 859 ] 860 861 br_vlan_db_policy$container [ 862 BRIDGE_VLANDB_ENTRY nlnest[BRIDGE_VLANDB_ENTRY, br_vlan_db_policy] 863 ] [varlen] 864 865 br_vlan_db_policy [ 866 BRIDGE_VLANDB_ENTRY_INFO nlattr[BRIDGE_VLANDB_ENTRY_INFO, bridge_vlan_info] 867 BRIDGE_VLANDB_ENTRY_RANGE nlattr[BRIDGE_VLANDB_ENTRY_RANGE, int16[BRIDGE_VLAN_INFO_RANGE_BEGIN:BRIDGE_VLAN_INFO_RANGE_END]] 868 BRIDGE_VLANDB_ENTRY_STATE nlattr[BRIDGE_VLANDB_ENTRY_STATE, flags[br_vlan_state_options, int8]] 869 BRIDGE_VLANDB_ENTRY_TUNNEL_INFO nlnest[BRIDGE_VLANDB_ENTRY_TUNNEL_INFO, br_vlandb_tinfo_pol] 870 BRIDGE_VLANDB_ENTRY_MCAST_ROUTER nlattr[BRIDGE_VLANDB_ENTRY_MCAST_ROUTER, int8] 871 ] [varlen] 872 873 bridge_vlan_info { 874 flags flags[br_vlan_info_flags, int16] 875 vid int16[0:4] 876 } 877 878 br_vlandb_tinfo_pol [ 879 BRIDGE_VLANDB_TINFO_ID nlattr[BRIDGE_VLANDB_TINFO_ID, int32] 880 BRIDGE_VLANDB_TINFO_CMD nlattr[BRIDGE_VLANDB_TINFO_CMD, flags[br_vlan_tinfo_cmd, int32]] 881 ] [varlen] 882 883 br_mdb_policy [ 884 MDBA_SET_ENTRY nlattr[MDBA_SET_ENTRY, br_mdb_entry] 885 ] 886 887 br_mdb_entry { 888 ifindex ifindex 889 state flags[br_mdb_entry_state, int8] 890 flags flags[br_mdb_entry_flags, int8] 891 vid int16[0:4] 892 addr br_mdb_entry_sub 893 } 894 895 br_mdb_entry_sub { 896 u br_mdb_entry_sub_u 897 proto flags[br_mdb_entry_sub_proto, int16be] 898 } 899 900 br_mdb_entry_sub_u [ 901 ip4 ipv4_addr 902 in6_addr ipv6_addr 903 ] 904 905 type rtm_nh_id int32[0:2] 906 907 rtm_nh_policy_get [ 908 NHA_ID nlattr[NHA_ID, rtm_nh_id] 909 NHA_OIF nlattr[NHA_OIF, ifindex] 910 NHA_GROUPS nlattr[NHA_GROUPS, void] 911 NHA_MASTER nlattr[NHA_MASTER, rtm_nh_id] 912 NHA_FDB nlattr[NHA_FDB, void] 913 ] [varlen] 914 915 rtm_nh_policy_new [ 916 NHA_ID nlattr[NHA_ID, rtm_nh_id] 917 NHA_GROUP nlattr[NHA_GROUP, array[nexthop_grp]] 918 NHA_GROUP_TYPE nlattr[NHA_GROUP_TYPE, flags[nha_group_types, int16]] 919 NHA_BLACKHOLE nlattr[NHA_BLACKHOLE, void] 920 NHA_OIF nlattr[NHA_OIF, ifindex] 921 NHA_GATEWAY nlattr[NHA_GATEWAY, nha_gateway] 922 NHA_ENCAP_TYPE nlattr[NHA_ENCAP_TYPE, flags[lwtunnel_encap_types, int16]] 923 NHA_ENCAP nlnest[NHA_ENCAP, lwtunnel_policy] 924 NHA_FDB nlattr[NHA_FDB, void] 925 NHA_RES_GROUP nlnest[NHA_RES_GROUP, array[rtm_nh_res_policy_new]] 926 ] [varlen] 927 928 type rtm_nh_policy_del nlattr[NHA_ID, rtm_nh_id] 929 930 rtm_nh_res_policy_new [ 931 NHA_RES_GROUP_BUCKETS nlattr[NHA_RES_GROUP_BUCKETS, int16] 932 NHA_RES_GROUP_IDLE_TIMER nlattr[NHA_RES_GROUP_IDLE_TIMER, int32] 933 NHA_RES_GROUP_UNBALANCED_TIMER nlattr[NHA_RES_GROUP_UNBALANCED_TIMER, int32] 934 ] [varlen] 935 936 nexthop_grp { 937 id int32[0:2] 938 weight int8 939 resvd1 const[0, int8] 940 resvd2 const[0, int16] 941 } 942 943 nha_gateway [ 944 ip4 ipv4_addr 945 in6_addr ipv6_addr 946 ] 947 948 devconf_ipv4_policy [ 949 NETCONFA_IFINDEX nlattr[NETCONFA_IFINDEX, ifindex] 950 NETCONFA_FORWARDING nlattr[NETCONFA_FORWARDING, int32] 951 NETCONFA_RP_FILTER nlattr[NETCONFA_RP_FILTER, int32] 952 NETCONFA_PROXY_NEIGH nlattr[NETCONFA_PROXY_NEIGH, int32] 953 IGNORE_ROUTES_WITH_LINKDOWN nlattr[NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN, int32] 954 ] [varlen] 955 956 devconf_mpls_policy [ 957 NETCONFA_IFINDEX nlattr[NETCONFA_IFINDEX, ifindex] 958 IGNORE_ROUTES_WITH_LINKDOWN nlattr[NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN, int32] 959 ] [varlen] 960 961 ifla_vf_policy [ 962 IFLA_VF_MAC nlattr[IFLA_VF_MAC, ifla_vf_mac] 963 IFLA_VF_VLAN nlattr[IFLA_VF_VLAN, ifla_vf_vlan] 964 IFLA_VF_VLAN_LIST nlnest[IFLA_VF_VLAN_LIST, array[nlattr[IFLA_VF_VLAN_INFO, ifla_vf_vlan_info]]] 965 IFLA_VF_TX_RATE nlattr[IFLA_VF_TX_RATE, ifla_vf_tx_rate] 966 IFLA_VF_SPOOFCHK nlattr[IFLA_VF_SPOOFCHK, ifla_vf_spoofchk] 967 IFLA_VF_RATE nlattr[IFLA_VF_RATE, ifla_vf_rate] 968 IFLA_VF_LINK_STATE nlattr[IFLA_VF_LINK_STATE, ifla_vf_link_state] 969 IFLA_VF_RSS_QUERY_EN nlattr[IFLA_VF_RSS_QUERY_EN, ifla_vf_rss_query_en] 970 IFLA_VF_TRUST nlattr[IFLA_VF_TRUST, ifla_vf_trust] 971 IFLA_VF_IB_NODE_GUID nlattr[IFLA_VF_IB_NODE_GUID, ifla_vf_guid] 972 IFLA_VF_IB_PORT_GUID nlattr[IFLA_VF_IB_PORT_GUID, ifla_vf_guid] 973 ] [varlen] 974 975 ifla_vf_mac { 976 vf int32 977 mac mac_addr 978 pad array[const[0, int8], 26] 979 } 980 981 ifla_vf_vlan { 982 vf int32 983 vlan int32[0:4095] 984 qos int32 985 } 986 987 ifla_vf_tx_rate { 988 vf int32 989 rate int32 990 } 991 992 ifla_vf_rate { 993 vf int32 994 min_tx_rate int32 995 max_tx_rate int32 996 } 997 998 ifla_vf_spoofchk { 999 vf int32 1000 setting int32 1001 } 1002 1003 ifla_vf_guid { 1004 vf int32 1005 guid int64 1006 } 1007 1008 ifla_vf_link_state { 1009 vf int32 1010 link_state int32 1011 } 1012 1013 ifla_vf_rss_query_en { 1014 vf int32 1015 setting int32 1016 } 1017 1018 ifla_vf_trust { 1019 vf int32 1020 setting int32 1021 } 1022 1023 ifla_vf_vlan_info { 1024 vf int32 1025 vlan int32[0:4095] 1026 qos int32 1027 vlan_proto flags[vlan_proto, int16be] 1028 } 1029 1030 ifla_port_policy [ 1031 IFLA_PORT_VF nlattr[IFLA_PORT_VF, int32] 1032 IFLA_PORT_PROFILE nlattr[IFLA_PORT_PROFILE, string] 1033 IFLA_PORT_INSTANCE_UUID nlattr[IFLA_PORT_INSTANCE_UUID, uuid_t] 1034 IFLA_PORT_HOST_UUID nlattr[IFLA_PORT_HOST_UUID, uuid_t] 1035 IFLA_PORT_REQUEST nlattr[IFLA_PORT_REQUEST, int8] 1036 ] [varlen] 1037 1038 ifla_xdp_policy [ 1039 IFLA_XDP_FD nlattr[IFLA_XDP_FD, fd_bpf_prog] 1040 IFLA_XDP_FLAGS nlattr[IFLA_XDP_FLAGS, flags[ifla_xdp_flags, int32]] 1041 IFLA_XDP_EXPECTED_FD nlattr[IFLA_XDP_EXPECTED_FD, fd_bpf_prog] 1042 ] [varlen] 1043 1044 ifla_xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST, XDP_FLAGS_SKB_MODE, XDP_FLAGS_DRV_MODE, XDP_FLAGS_HW_MODE 1045 1046 rtnl_link_ifmap { 1047 mem_start int64 1048 mem_end int64 1049 base_addr int64 1050 irq int16 1051 dma int8 1052 port int8 1053 } 1054 1055 rtnl_net_policy [ 1056 NETNSA_NSID nlattr[NETNSA_NSID, netns_id] 1057 NETNSA_PID nlattr[NETNSA_PID, pid] 1058 NETNSA_FD nlattr[NETNSA_FD, fd_namespace] 1059 ] [varlen] 1060 1061 rtcanmsg { 1062 can_family const[AF_CAN, int8] 1063 gwtype const[CGW_TYPE_CAN_CAN, int8] 1064 flags flags[rtcanmsg_flags, int16] 1065 } 1066 1067 rtcanmsg_flags = CGW_FLAGS_CAN_ECHO, CGW_FLAGS_CAN_SRC_TSTAMP, CGW_FLAGS_CAN_IIF_TX_OK 1068 1069 lwtunnel_policy [ 1070 MPLS_IPTUNNEL_DST nlattr[MPLS_IPTUNNEL_DST, array[mpls_label]] 1071 MPLS_IPTUNNEL_TTL nlattr[MPLS_IPTUNNEL_TTL, int8] 1072 1073 LWTUNNEL_IP_ID nlattr[LWTUNNEL_IP_ID, int64be] 1074 LWTUNNEL_IP_DST nlattr[LWTUNNEL_IP_DST, ipv4_addr] 1075 LWTUNNEL_IP_SRC nlattr[LWTUNNEL_IP_SRC, ipv4_addr] 1076 LWTUNNEL_IP_TTL nlattr[LWTUNNEL_IP_TTL, int8] 1077 LWTUNNEL_IP_TOS nlattr[LWTUNNEL_IP_TOS, int8] 1078 LWTUNNEL_IP_FLAGS nlattr[LWTUNNEL_IP_FLAGS, flags[lwtunnel_ip_flags, int16be]] 1079 LWTUNNEL_IP_OPTS nlnest[LWTUNNEL_IP_OPTS, ip_opts_policy] 1080 1081 ILA_ATTR_LOCATOR nlattr[ILA_ATTR_LOCATOR, int64be] 1082 ILA_ATTR_CSUM_MODE nlattr[ILA_ATTR_CSUM_MODE, flags[ila_attr_csum_mode, int8]] 1083 ILA_ATTR_IDENT_TYPE nlattr[ILA_ATTR_IDENT_TYPE, flags[ila_attr_ident_type, int8]] 1084 ILA_ATTR_HOOK_TYPE nlattr[ILA_ATTR_HOOK_TYPE, flags[ila_attr_hook_type, int8]] 1085 1086 LWTUNNEL_IP6_ID nlattr[LWTUNNEL_IP6_ID, int64be] 1087 LWTUNNEL_IP6_DST nlattr[LWTUNNEL_IP6_DST, ipv6_addr] 1088 LWTUNNEL_IP6_SRC nlattr[LWTUNNEL_IP6_SRC, ipv6_addr] 1089 LWTUNNEL_IP6_HOPLIMIT nlattr[LWTUNNEL_IP6_HOPLIMIT, int8] 1090 LWTUNNEL_IP6_TC nlattr[LWTUNNEL_IP6_TC, int8] 1091 LWTUNNEL_IP6_FLAGS nlattr[LWTUNNEL_IP6_FLAGS, flags[lwtunnel_ip_flags, int16be]] 1092 LWTUNNEL_IP6_OPTS nlattr[LWTUNNEL_IP6_OPTS, ip_opts_policy] 1093 1094 SEG6_IPTUNNEL_SRH nlattr[SEG6_IPTUNNEL_SRH, seg6_tuninfo] 1095 1096 LWT_BPF_IN nlnest[LWT_BPF_IN, bpf_prog_policy] 1097 LWT_BPF_OUT nlnest[LWT_BPF_OUT, bpf_prog_policy] 1098 LWT_BPF_XMIT nlnest[LWT_BPF_XMIT, bpf_prog_policy] 1099 LWT_BPF_XMIT_HEADROOM nlattr[LWT_BPF_XMIT_HEADROOM, int32[0:LWT_BPF_MAX_HEADROOM]] 1100 1101 SEG6_LOCAL_ACTION nlattr[SEG6_LOCAL_ACTION, int32[SEG6_LOCAL_ACTION_END:SEG6_LOCAL_ACTION_END_BPF]] 1102 SEG6_LOCAL_SRH nlattr[SEG6_LOCAL_SRH, ipv6_sr_hdr] 1103 SEG6_LOCAL_TABLE nlattr[SEG6_LOCAL_TABLE, int32] 1104 SEG6_LOCAL_NH4 nlattr[SEG6_LOCAL_NH4, ipv4_addr] 1105 SEG6_LOCAL_NH6 nlattr[SEG6_LOCAL_NH6, ipv6_addr] 1106 SEG6_LOCAL_IIF nlattr[SEG6_LOCAL_IIF, int32] 1107 SEG6_LOCAL_OIF nlattr[SEG6_LOCAL_OIF, int32] 1108 SEG6_LOCAL_BPF nlnest[SEG6_LOCAL_BPF, bpf_prog_policy$seg6_local] 1109 1110 RPL_IPTUNNEL_SRH nlattr[RPL_IPTUNNEL_SRH, ipv6_rpl_sr_hdr] 1111 ] [varlen] 1112 1113 # 5832c4a77d693 ("ip_tunnel: convert __be16 tunnel flags to bitmaps") put the constants below 1114 # behind #ifndef __KERNEL__, so they cannot be extracted anymore. 1115 define TUNNEL_GENEVE_OPT __cpu_to_be16(0x0800) 1116 define TUNNEL_VXLAN_OPT __cpu_to_be16(0x1000) 1117 define TUNNEL_ERSPAN_OPT __cpu_to_be16(0x4000) 1118 1119 lwtunnel_ip_flags = TUNNEL_GENEVE_OPT, TUNNEL_VXLAN_OPT, TUNNEL_ERSPAN_OPT 1120 1121 ip_opts_policy [ 1122 LWTUNNEL_IP_OPTS_GENEVE nlnest[LWTUNNEL_IP_OPTS_GENEVE, geneve_opt_policy$lwt] 1123 LWTUNNEL_IP_OPTS_VXLAN nlnest[LWTUNNEL_IP_OPTS_VXLAN, vxlan_opt_policy$lwt] 1124 LWTUNNEL_IP_OPTS_ERSPAN nlnest[LWTUNNEL_IP_OPTS_ERSPAN, erspan_opt_policy$lwt] 1125 ] [varlen] 1126 1127 geneve_opt_policy$lwt [ 1128 LWTUNNEL_IP_OPT_GENEVE_CLASS nlattr[LWTUNNEL_IP_OPT_GENEVE_CLASS, int16be] 1129 LWTUNNEL_IP_OPT_GENEVE_TYPE nlattr[LWTUNNEL_IP_OPT_GENEVE_TYPE, int8] 1130 LWTUNNEL_IP_OPT_GENEVE_DATA nlattr[LWTUNNEL_IP_OPT_GENEVE_DATA, array[int8, 0:128]] 1131 ] [varlen] 1132 1133 vxlan_opt_policy$lwt [ 1134 LWTUNNEL_IP_OPT_VXLAN_GBP nlattr[LWTUNNEL_IP_OPT_VXLAN_GBP, int32] 1135 ] [varlen] 1136 1137 erspan_opt_policy$lwt [ 1138 LWTUNNEL_IP_OPT_ERSPAN_VER nlattr[LWTUNNEL_IP_OPT_ERSPAN_VER, int8[1:2]] 1139 LWTUNNEL_IP_OPT_ERSPAN_INDEX nlattr[LWTUNNEL_IP_OPT_ERSPAN_INDEX, int32be] 1140 LWTUNNEL_IP_OPT_ERSPAN_DIR nlattr[LWTUNNEL_IP_OPT_ERSPAN_DIR, int8] 1141 LWTUNNEL_IP_OPT_ERSPAN_HWID nlattr[LWTUNNEL_IP_OPT_ERSPAN_HWID, int8] 1142 ] [varlen] 1143 1144 bpf_prog_policy [ 1145 LWT_BPF_PROG_FD nlattr[LWT_BPF_PROG_FD, fd_bpf_prog] 1146 LWT_BPF_PROG_NAME nlattr[LWT_BPF_PROG_NAME, string] 1147 ] [varlen] 1148 1149 bpf_prog_policy$seg6_local [ 1150 SEG6_LOCAL_BPF_PROG nlattr[SEG6_LOCAL_BPF_PROG, fd_bpf_prog] 1151 SEG6_LOCAL_BPF_PROG_NAME nlattr[SEG6_LOCAL_BPF_PROG_NAME, string] 1152 ] [varlen] 1153 1154 ipv6_rpl_sr_hdr { 1155 nexthdr int8 1156 hdrlen len[parent, int8] 1157 type const[RPL_IPTUNNEL_SRH, int8] 1158 segments_left int8 1159 control int32 1160 address array[ipv6_addr] 1161 } [packed] 1162 1163 ila_attr_csum_mode = ILA_CSUM_ADJUST_TRANSPORT, ILA_CSUM_NEUTRAL_MAP, ILA_CSUM_NO_ACTION, ILA_CSUM_NEUTRAL_MAP_AUTO 1164 1165 # TODO: describe remaining when supported 1166 ila_attr_ident_type = ILA_ATYPE_IID, ILA_ATYPE_LUID, ILA_ATYPE_USE_FORMAT 1167 1168 ila_attr_hook_type = ILA_HOOK_ROUTE_INPUT, ILA_HOOK_ROUTE_OUTPUT 1169 1170 seg6_tuninfo { 1171 tuninfo seg6_iptunnel_encap 1172 segments array[ipv6_addr, 0:128] 1173 } [packed] 1174 1175 seg6_iptunnel_encap { 1176 mode flags[seg6_iptun_mode, int32] 1177 srh ipv6_sr_hdr 1178 } 1179 1180 seg6_iptun_mode = SEG6_IPTUN_MODE_INLINE, SEG6_IPTUN_MODE_ENCAP, SEG6_IPTUN_MODE_L2ENCAP 1181 1182 cgw_policy [ 1183 CGW_MOD_AND nlattr[CGW_MOD_AND, cgw_frame_mod] 1184 CGW_MOD_OR nlattr[CGW_MOD_OR, cgw_frame_mod] 1185 CGW_MOD_XOR nlattr[CGW_MOD_XOR, cgw_frame_mod] 1186 CGW_MOD_SET nlattr[CGW_MOD_SET, cgw_frame_mod] 1187 CGW_CS_XOR nlattr[CGW_CS_XOR, cgw_csum_xor] 1188 CGW_CS_CRC8 nlattr[CGW_CS_CRC8, cgw_csum_crc8] 1189 CGW_SRC_IF nlattr[CGW_SRC_IF, ifindex_vcan] 1190 CGW_DST_IF nlattr[CGW_DST_IF, ifindex_vcan] 1191 CGW_FILTER nlattr[CGW_FILTER, can_filter] 1192 CGW_LIM_HOPS nlattr[CGW_LIM_HOPS, int8] 1193 CGW_MOD_UID nlattr[CGW_MOD_UID, uid] 1194 ] [varlen] 1195 1196 cgw_frame_mod { 1197 cf can_frame 1198 modtype flags[cgw_frame_modtype, int8] 1199 } [packed] 1200 1201 cgw_frame_modtype = CGW_MOD_ID, CGW_MOD_DLC, CGW_MOD_DATA 1202 1203 cgw_csum_xor { 1204 from_idx int8[-9:8] 1205 to_idx int8[-9:8] 1206 result_idx int8[-9:8] 1207 init_xor_val int8 1208 } [packed] 1209 1210 cgw_csum_crc8 { 1211 from_idx int8[0:127] 1212 to_idx int8[0:127] 1213 result_idx int8[0:127] 1214 init_crc_val int8 1215 final_xor_val int8 1216 crctab array[int8, 256] 1217 profile flags[cgw_csum_crc8_profile, int8] 1218 profile_data array[int8, 20] 1219 } [packed] 1220 1221 cgw_csum_crc8_profile = CGW_CRC8PRF_UNSPEC, CGW_CRC8PRF_1U8, CGW_CRC8PRF_16U8, CGW_CRC8PRF_SFFID_XOR 1222 1223 rtnl_af = AF_INET, AF_INET6, AF_BRIDGE, AF_MPLS 1224 net_device_flags = IFF_UP, IFF_BROADCAST, IFF_DEBUG, IFF_LOOPBACK, IFF_POINTOPOINT, IFF_NOTRAILERS, IFF_RUNNING, IFF_NOARP, IFF_PROMISC, IFF_ALLMULTI, IFF_MASTER, IFF_SLAVE, IFF_MULTICAST, IFF_PORTSEL, IFF_AUTOMEDIA, IFF_DYNAMIC, IFF_LOWER_UP, IFF_DORMANT, IFF_ECHO 1225 ifa_flags = IFA_F_MANAGETEMPADDR, IFA_F_NOPREFIXROUTE, IFA_F_MCAUTOJOIN, ifa_flags8 1226 ifa_flags8 = IFA_F_SECONDARY, IFA_F_NODAD, IFA_F_OPTIMISTIC, IFA_F_DADFAILED, IFA_F_HOMEADDRESS, IFA_F_DEPRECATED, IFA_F_TENTATIVE, IFA_F_PERMANENT 1227 rt_scope_t = RT_SCOPE_UNIVERSE, RT_SCOPE_SITE, RT_SCOPE_LINK, RT_SCOPE_HOST, RT_SCOPE_NOWHERE 1228 rtm_protocol = RTPROT_UNSPEC, RTPROT_REDIRECT, RTPROT_KERNEL, RTPROT_BOOT, RTPROT_STATIC 1229 rtm_type = RTN_UNSPEC, RTN_UNICAST, RTN_LOCAL, RTN_BROADCAST, RTN_ANYCAST, RTN_MULTICAST, RTN_BLACKHOLE, RTN_UNREACHABLE, RTN_PROHIBIT, RTN_THROW, RTN_NAT, RTN_XRESOLVE 1230 rtm_flags = RTM_F_NOTIFY, RTM_F_CLONED, RTM_F_EQUALIZE, RTM_F_PREFIX, RTM_F_LOOKUP_TABLE, RTM_F_FIB_MATCH 1231 fr_actions = FR_ACT_UNSPEC, FR_ACT_TO_TBL, FR_ACT_GOTO, FR_ACT_NOP, FR_ACT_RES3, FR_ACT_RES4, FR_ACT_BLACKHOLE, FR_ACT_UNREACHABLE, FR_ACT_PROHIBIT 1232 fr_flags = FIB_RULE_PERMANENT, FIB_RULE_INVERT, FIB_RULE_UNRESOLVED, FIB_RULE_IIF_DETACHED, FIB_RULE_OIF_DETACHED, FIB_RULE_FIND_SADDR 1233 lwtunnel_encap_types = LWTUNNEL_ENCAP_NONE, LWTUNNEL_ENCAP_MPLS, LWTUNNEL_ENCAP_IP, LWTUNNEL_ENCAP_ILA, LWTUNNEL_ENCAP_IP6, LWTUNNEL_ENCAP_SEG6, LWTUNNEL_ENCAP_BPF, LWTUNNEL_ENCAP_SEG6_LOCAL, LWTUNNEL_ENCAP_RPL 1234 rt_table_types = RT_TABLE_UNSPEC, RT_TABLE_COMPAT, RT_TABLE_DEFAULT, RT_TABLE_MAIN, RT_TABLE_LOCAL 1235 ndm_state = NUD_INCOMPLETE, NUD_REACHABLE, NUD_STALE, NUD_DELAY, NUD_PROBE, NUD_FAILED, NUD_NOARP, NUD_PERMANENT, NUD_NONE 1236 ndm_flags = NTF_USE, NTF_SELF, NTF_MASTER, NTF_PROXY, NTF_EXT_LEARNED, NTF_OFFLOADED, NTF_STICKY, NTF_ROUTER 1237 ndm_ext_flags = NTF_EXT_MANAGED 1238 ifa_prefixlen = 0, 1, 8, 16, 24, 31, 32, 56, 63, 64, 120, 128 1239 rtm_addr_len = 0, 16, 20, 32, 128 1240 filter_mask = IFLA_STATS_UNSPEC, IFLA_STATS_LINK_64, IFLA_STATS_LINK_XSTATS, IFLA_STATS_LINK_XSTATS_SLAVE, IFLA_STATS_LINK_OFFLOAD_XSTATS, IFLA_STATS_AF_SPEC 1241 tunnel_encap_types = TUNNEL_ENCAP_NONE, TUNNEL_ENCAP_FOU, TUNNEL_ENCAP_GUE, TUNNEL_ENCAP_MPLS 1242 ifal_labels = 0, 1, 2, 3, 4, 5, 6, 7, 11, 12 1243 br_vlan_dumpflags = BRIDGE_VLANDB_DUMPF_STATS 1244 br_vlan_state_options = BR_STATE_DISABLED, BR_STATE_LISTENING, BR_STATE_LEARNING, BR_STATE_FORWARDING, BR_STATE_BLOCKING 1245 br_vlan_info_flags = BRIDGE_VLAN_INFO_MASTER, BRIDGE_VLAN_INFO_PVID, BRIDGE_VLAN_INFO_UNTAGGED, BRIDGE_VLAN_INFO_RANGE_BEGIN, BRIDGE_VLAN_INFO_RANGE_END, BRIDGE_VLAN_INFO_BRENTRY, BRIDGE_VLAN_INFO_ONLY_OPTS 1246 br_vlan_tinfo_cmd = RTM_SETLINK, RTM_DELLINK 1247 br_mdb_entry_state = MDB_TEMPORARY, MDB_PERMANENT 1248 br_mdb_entry_flags = MDB_FLAGS_OFFLOAD, MDB_FLAGS_FAST_LEAVE 1249 br_mdb_entry_sub_proto = ETH_P_IP, ETH_P_IPV6 1250 rtnh_flags = RTNH_F_DEAD, RTNH_F_PERVASIVE, RTNH_F_ONLINK, RTNH_F_OFFLOAD, RTNH_F_LINKDOWN, RTNH_F_UNRESOLVED 1251 nha_group_types = NEXTHOP_GRP_TYPE_MPATH, NEXTHOP_GRP_TYPE_RES