1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 2--- 3name: rt-route 4protocol: netlink-raw 5uapi-header: linux/rtnetlink.h 6protonum: 0 7 8doc: >- 9 Route configuration over rtnetlink. 10 11definitions: 12 - 13 name: rtm-type 14 name-prefix: rtn- 15 enum-name: 16 type: enum 17 entries: 18 - unspec 19 - unicast 20 - local 21 - broadcast 22 - anycast 23 - multicast 24 - blackhole 25 - unreachable 26 - prohibit 27 - throw 28 - nat 29 - xresolve 30 - 31 name: rtmsg 32 type: struct 33 members: 34 - 35 name: rtm-family 36 type: u8 37 - 38 name: rtm-dst-len 39 type: u8 40 - 41 name: rtm-src-len 42 type: u8 43 - 44 name: rtm-tos 45 type: u8 46 - 47 name: rtm-table 48 type: u8 49 - 50 name: rtm-protocol 51 type: u8 52 - 53 name: rtm-scope 54 type: u8 55 - 56 name: rtm-type 57 type: u8 58 enum: rtm-type 59 - 60 name: rtm-flags 61 type: u32 62 - 63 name: rta-cacheinfo 64 type: struct 65 members: 66 - 67 name: rta-clntref 68 type: u32 69 - 70 name: rta-lastuse 71 type: u32 72 - 73 name: rta-expires 74 type: u32 75 - 76 name: rta-error 77 type: u32 78 - 79 name: rta-used 80 type: u32 81 - 82 name: del-reason 83 type: enum 84 name-prefix: rt-del-reason- 85 enum-name: rt-del-reason 86 doc: | 87 Why the kernel deleted a route. New causes may be appended. The 88 value space is family-agnostic, a value is never reinterpreted 89 per address family. 90 entries: 91 - 92 name: unspec 93 doc: The deletion path does not record a cause. 94 - 95 name: expired 96 doc: The RTF_EXPIRES lifetime ran out and the route was garbage 97 collected. 98 - 99 name: ra-withdrawn 100 doc: A Router Advertisement withdrew the route with a zero 101 lifetime. 102 - 103 name: encap-type 104 type: enum 105 name-prefix: lwtunnel-encap- 106 enum-name: 107 entries: 108 - none 109 - mpls 110 - ip 111 - ila 112 - ip6 113 - seg6 114 - bpf 115 - seg6-local 116 - rpl 117 - ioam6 118 - xfrm 119 - 120 name: seg6-local-actions 121 type: enum 122 name-prefix: seg6-local-action- 123 enum-name: 124 entries: 125 - unspec 126 - end 127 - end-x 128 - end-t 129 - end-dx2 130 - end-dx6 131 - end-dx4 132 - end-dt6 133 - end-dt4 134 - end-b6 135 - end-b6-encap 136 - end-bm 137 - end-s 138 - end-as 139 - end-am 140 - end-bpf 141 - end-dt46 142 - 143 name: seg6-local-flv-ops 144 type: enum 145 name-prefix: seg6-local-flv-op- 146 enum-name: 147 entries: 148 - 149 name: unspec 150 - 151 name: psp 152 - 153 name: usp 154 - 155 name: usd 156 - 157 name: next-csid 158 159sub-messages: 160 - 161 name: encap-data 162 formats: 163 - 164 value: mpls 165 attribute-set: mpls-iptunnel 166 - 167 value: ip 168 attribute-set: lwtunnel-ip 169 - 170 value: ila 171 attribute-set: ila-attrs 172 - 173 value: ip6 174 attribute-set: lwtunnel-ip6 175 - 176 value: seg6 177 attribute-set: seg6-iptunnel 178 - 179 value: bpf 180 attribute-set: lwt-bpf 181 - 182 value: seg6-local 183 attribute-set: seg6-local 184 - 185 value: rpl 186 attribute-set: rpl-iptunnel 187 - 188 value: ioam6 189 attribute-set: ioam6-iptunnel 190 - 191 value: xfrm 192 attribute-set: lwt-xfrm 193 194attribute-sets: 195 - 196 name: route-attrs 197 name-prefix: rta- 198 attributes: 199 - 200 name: dst 201 type: binary 202 display-hint: ipv4-or-v6 203 - 204 name: src 205 type: binary 206 display-hint: ipv4-or-v6 207 - 208 name: iif 209 type: u32 210 - 211 name: oif 212 type: u32 213 - 214 name: gateway 215 type: binary 216 display-hint: ipv4-or-v6 217 - 218 name: priority 219 type: u32 220 - 221 name: prefsrc 222 type: binary 223 display-hint: ipv4-or-v6 224 - 225 name: metrics 226 type: nest 227 nested-attributes: metrics 228 - 229 name: multipath 230 type: binary 231 - 232 name: protoinfo # not used 233 type: binary 234 - 235 name: flow 236 type: u32 237 - 238 name: cacheinfo 239 type: binary 240 struct: rta-cacheinfo 241 - 242 name: session # not used 243 type: binary 244 - 245 name: mp-algo # not used 246 type: binary 247 - 248 name: table 249 type: u32 250 - 251 name: mark 252 type: u32 253 - 254 name: mfc-stats 255 type: binary 256 - 257 name: via 258 type: binary 259 - 260 name: newdst 261 type: binary 262 - 263 name: pref 264 type: u8 265 - 266 name: encap-type 267 type: u16 268 enum: encap-type 269 - 270 name: encap 271 type: sub-message 272 sub-message: encap-data 273 selector: encap-type 274 - 275 name: expires 276 type: u32 277 - 278 name: pad 279 type: binary 280 - 281 name: uid 282 type: u32 283 - 284 name: ttl-propagate 285 type: u8 286 - 287 name: ip-proto 288 type: u8 289 - 290 name: sport 291 type: u16 292 - 293 name: dport 294 type: u16 295 - 296 name: nh-id 297 type: u32 298 - 299 name: flowlabel 300 type: u32 301 byte-order: big-endian 302 display-hint: hex 303 - 304 name: del-reason 305 type: u32 306 enum: del-reason 307 doc: | 308 Emitted only on RTM_DELROUTE notifications, and only when the 309 deletion path records a cause. An absent attribute means 310 either an older kernel or a deletion path that does not 311 record its cause, consumers must treat absent and unspec 312 identically. Currently only IPv6 deletion paths record a 313 cause. The attribute is notification-only, the kernel rejects 314 it in requests. 315 - 316 name: metrics 317 name-prefix: rtax- 318 attributes: 319 - 320 name: unspec 321 type: unused 322 value: 0 323 - 324 name: lock 325 type: u32 326 - 327 name: mtu 328 type: u32 329 - 330 name: window 331 type: u32 332 - 333 name: rtt 334 type: u32 335 - 336 name: rttvar 337 type: u32 338 - 339 name: ssthresh 340 type: u32 341 - 342 name: cwnd 343 type: u32 344 - 345 name: advmss 346 type: u32 347 - 348 name: reordering 349 type: u32 350 - 351 name: hoplimit 352 type: u32 353 - 354 name: initcwnd 355 type: u32 356 - 357 name: features 358 type: u32 359 - 360 name: rto-min 361 type: u32 362 - 363 name: initrwnd 364 type: u32 365 - 366 name: quickack 367 type: u32 368 - 369 name: cc-algo 370 type: string 371 - 372 name: fastopen-no-cookie 373 type: u32 374 - 375 name: mpls-iptunnel 376 name-prefix: mpls-iptunnel- 377 header: linux/mpls_iptunnel.h 378 attributes: 379 - 380 name: dst 381 type: binary 382 - 383 name: ttl 384 type: u8 385 - 386 name: lwtunnel-ip 387 name-prefix: lwtunnel-ip- 388 header: linux/lwtunnel.h 389 attributes: 390 - 391 name: id 392 type: u64 393 byte-order: big-endian 394 - 395 name: dst 396 type: u32 397 byte-order: big-endian 398 display-hint: ipv4 399 - 400 name: src 401 type: u32 402 byte-order: big-endian 403 display-hint: ipv4 404 - 405 name: ttl 406 type: u8 407 - 408 name: tos 409 type: u8 410 - 411 name: flags 412 type: u16 413 byte-order: big-endian 414 - 415 name: pad 416 type: pad 417 - 418 name: opts 419 type: nest 420 nested-attributes: lwtunnel-ip-opts 421 - 422 name: ila-attrs 423 name-prefix: ila-attr- 424 header: linux/ila.h 425 attributes: 426 - 427 name: locator 428 type: u64 429 byte-order: big-endian 430 - 431 name: identifier 432 type: u64 433 - 434 name: locator-match 435 type: u64 436 byte-order: big-endian 437 - 438 name: ifindex 439 type: s32 440 - 441 name: dir 442 type: u32 443 - 444 name: pad 445 type: pad 446 - 447 name: csum-mode 448 type: u8 449 - 450 name: ident-type 451 type: u8 452 - 453 name: hook-type 454 type: u8 455 - 456 name: lwtunnel-ip6 457 name-prefix: lwtunnel-ip6- 458 header: linux/lwtunnel.h 459 attributes: 460 - 461 name: id 462 type: u64 463 byte-order: big-endian 464 - 465 name: dst 466 type: binary 467 display-hint: ipv6 468 - 469 name: src 470 type: binary 471 display-hint: ipv6 472 - 473 name: hoplimit 474 type: u8 475 - 476 name: tc 477 type: u8 478 - 479 name: flags 480 type: u16 481 byte-order: big-endian 482 - 483 name: pad 484 type: pad 485 - 486 name: opts 487 type: nest 488 nested-attributes: lwtunnel-ip-opts 489 - 490 name: seg6-iptunnel 491 name-prefix: seg6-iptunnel- 492 header: linux/seg6_iptunnel.h 493 attributes: 494 - 495 name: srh 496 type: binary 497 - 498 name: src 499 type: binary 500 display-hint: ipv6 501 - 502 name: table 503 type: u32 504 - 505 name: lwt-bpf 506 name-prefix: lwt-bpf- 507 header: linux/lwtunnel.h 508 attributes: 509 - 510 name: in 511 type: nest 512 nested-attributes: lwt-bpf-prog 513 - 514 name: out 515 type: nest 516 nested-attributes: lwt-bpf-prog 517 - 518 name: xmit 519 type: nest 520 nested-attributes: lwt-bpf-prog 521 - 522 name: xmit-headroom 523 type: u32 524 - 525 name: seg6-local 526 name-prefix: seg6-local- 527 header: linux/seg6_local.h 528 attributes: 529 - 530 name: action 531 type: u32 532 enum: seg6-local-actions 533 - 534 name: srh 535 type: binary 536 - 537 name: table 538 type: u32 539 - 540 name: nh4 541 type: u32 542 byte-order: big-endian 543 display-hint: ipv4 544 - 545 name: nh6 546 type: binary 547 display-hint: ipv6 548 - 549 name: iif 550 type: u32 551 - 552 name: oif 553 type: u32 554 - 555 name: bpf 556 type: nest 557 nested-attributes: seg6-local-bpf 558 - 559 name: vrftable 560 type: u32 561 - 562 name: counters 563 type: nest 564 nested-attributes: seg6-local-cnt 565 - 566 name: flavors 567 type: nest 568 nested-attributes: seg6-local-flv 569 - 570 name: rpl-iptunnel 571 name-prefix: rpl-iptunnel- 572 header: linux/rpl_iptunnel.h 573 attributes: 574 - 575 name: srh 576 type: binary 577 - 578 name: ioam6-iptunnel 579 name-prefix: ioam6-iptunnel- 580 header: linux/ioam6_iptunnel.h 581 attributes: 582 - 583 name: mode 584 type: u8 585 - 586 name: dst 587 type: binary 588 display-hint: ipv6 589 - 590 name: trace 591 type: binary 592 - 593 name: freq-k 594 type: u32 595 - 596 name: freq-n 597 type: u32 598 - 599 name: src 600 type: binary 601 display-hint: ipv6 602 - 603 name: lwt-xfrm 604 name-prefix: lwt-xfrm- 605 header: linux/lwtunnel.h 606 attributes: 607 - 608 name: if-id 609 type: u32 610 - 611 name: link 612 type: u32 613 - 614 name: lwtunnel-ip-opts 615 name-prefix: lwtunnel-ip-opts- 616 attributes: 617 - 618 name: geneve 619 type: binary 620 - 621 name: vxlan 622 type: nest 623 nested-attributes: lwtunnel-ip-opt-vxlan 624 - 625 name: erspan 626 type: nest 627 nested-attributes: lwtunnel-ip-opt-erspan 628 - 629 name: lwtunnel-ip-opt-vxlan 630 name-prefix: lwtunnel-ip-opt-vxlan- 631 attributes: 632 - 633 name: gbp 634 type: u32 635 - 636 name: lwtunnel-ip-opt-erspan 637 name-prefix: lwtunnel-ip-opt-erspan- 638 attributes: 639 - 640 name: ver 641 type: u8 642 - 643 name: index 644 type: u32 645 byte-order: big-endian 646 - 647 name: dir 648 type: u8 649 - 650 name: hwid 651 type: u8 652 - 653 name: lwt-bpf-prog 654 name-prefix: lwt-bpf-prog- 655 attributes: 656 - 657 name: fd 658 type: u32 659 - 660 name: name 661 type: string 662 checks: 663 max-len: 256 664 - 665 name: seg6-local-bpf 666 name-prefix: seg6-local-bpf- 667 attr-max-name: seg6-local-bpf-prog-max 668 attributes: 669 - 670 name: prog 671 type: u32 672 - 673 name: prog-name 674 type: string 675 checks: 676 max-len: 256 677 - 678 name: seg6-local-cnt 679 name-prefix: seg6-local-cnt- 680 attributes: 681 - 682 name: pad 683 type: pad 684 - 685 name: packets 686 type: u64 687 - 688 name: bytes 689 type: u64 690 - 691 name: errors 692 type: u64 693 - 694 name: seg6-local-flv 695 name-prefix: seg6-local-flv- 696 attributes: 697 - 698 name: operation 699 type: u32 700 enum: seg6-local-flv-ops 701 enum-as-flags: true 702 - 703 name: lcblock-bits 704 type: u8 705 - 706 name: lcnode-fn-bits 707 type: u8 708 709operations: 710 enum-model: directional 711 fixed-header: rtmsg 712 name-prefix: rtm- 713 list: 714 - 715 name: getroute 716 doc: Dump route information. 717 attribute-set: route-attrs 718 do: 719 request: 720 value: 26 721 attributes: 722 - src 723 - dst 724 - iif 725 - oif 726 - ip-proto 727 - sport 728 - dport 729 - mark 730 - uid 731 - flowlabel 732 reply: 733 value: 24 734 attributes: &all-route-attrs 735 - dst 736 - src 737 - iif 738 - oif 739 - gateway 740 - priority 741 - prefsrc 742 - metrics 743 - multipath 744 - flow 745 - cacheinfo 746 - table 747 - mark 748 - mfc-stats 749 - via 750 - newdst 751 - pref 752 - encap-type 753 - encap 754 - expires 755 - pad 756 - uid 757 - ttl-propagate 758 - ip-proto 759 - sport 760 - dport 761 - nh-id 762 - flowlabel 763 - del-reason 764 dump: 765 request: 766 value: 26 767 attributes: [] 768 reply: 769 value: 24 770 attributes: *all-route-attrs 771 - 772 name: newroute 773 doc: Create a new route 774 attribute-set: route-attrs 775 do: 776 request: 777 value: 24 778 attributes: &route-req-attrs 779 - dst 780 - src 781 - iif 782 - oif 783 - gateway 784 - priority 785 - prefsrc 786 - metrics 787 - multipath 788 - flow 789 - cacheinfo 790 - table 791 - mark 792 - mfc-stats 793 - via 794 - newdst 795 - pref 796 - encap-type 797 - encap 798 - expires 799 - pad 800 - uid 801 - ttl-propagate 802 - ip-proto 803 - sport 804 - dport 805 - nh-id 806 - flowlabel 807 - 808 name: delroute 809 doc: Delete an existing route 810 attribute-set: route-attrs 811 do: 812 request: 813 value: 25 814 attributes: *route-req-attrs 815 - 816 name: newroute-ntf 817 doc: Notification about a created route. 818 value: 24 819 notify: getroute 820 - 821 name: delroute-ntf 822 doc: Notification about a deleted route. 823 value: 25 824 notify: getroute 825 826mcast-groups: 827 list: 828 - 829 name: rtnlgrp-ipv4-route 830 value: 7 831 - 832 name: rtnlgrp-ipv6-route 833 value: 11 834