github.com/osrg/gobgp/v3@v3.30.0/api/attribute.proto (about) 1 // Copyright (C) 2018 Nippon Telegraph and Telephone Corporation. 2 // 3 // Permission is hereby granted, free of charge, to any person 4 // obtaining a copy of this software and associated documentation files 5 // (the "Software"), to deal in the Software without restriction, 6 // including without limitation the rights to use, copy, modify, merge, 7 // publish, distribute, sublicense, and/or sell copies of the Software, 8 // and to permit persons to whom the Software is furnished to do so, 9 // subject to the following conditions: 10 // 11 // The above copyright notice and this permission notice shall be 12 // included in all copies or substantial portions of the Software. 13 14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 22 syntax = "proto3"; 23 24 package apipb; 25 option go_package = "github.com/osrg/gobgp/v3/api;apipb"; 26 27 import "google/protobuf/any.proto"; 28 import "gobgp.proto"; 29 30 31 message OriginAttribute { uint32 origin = 1; } 32 33 message AsSegment { 34 enum Type { 35 UNKNOWN = 0; AS_SET = 1; AS_SEQUENCE = 2; 36 AS_CONFED_SEQUENCE = 3; AS_CONFED_SET = 4; 37 } 38 Type type = 1; 39 repeated uint32 numbers = 2; 40 } 41 42 message AsPathAttribute { repeated AsSegment segments = 1; } 43 44 message NextHopAttribute { string next_hop = 1; } 45 46 message MultiExitDiscAttribute { uint32 med = 1; } 47 48 message LocalPrefAttribute { uint32 local_pref = 1; } 49 50 message AtomicAggregateAttribute {} 51 52 message AggregatorAttribute { 53 uint32 asn = 1; 54 string address = 2; 55 } 56 57 message CommunitiesAttribute { repeated uint32 communities = 1; } 58 59 message OriginatorIdAttribute { string id = 1; } 60 61 message ClusterListAttribute { repeated string ids = 1; } 62 63 // IPAddressPrefix represents the NLRI for: 64 // - AFI=1, SAFI=1 65 // - AFI=2, SAFI=1 66 message IPAddressPrefix { 67 uint32 prefix_len = 1; 68 string prefix = 2; 69 } 70 71 // LabeledIPAddressPrefix represents the NLRI for: 72 // - AFI=1, SAFI=4 73 // - AFI=2, SAFI=4 74 message LabeledIPAddressPrefix { 75 repeated uint32 labels = 1; 76 uint32 prefix_len = 2; 77 string prefix = 3; 78 } 79 80 // EncapsulationNLRI represents the NLRI for: 81 // - AFI=1, SAFI=7 82 // - AFI=2, SAFI=7 83 message EncapsulationNLRI { string address = 1; } 84 85 message RouteDistinguisherTwoOctetASN { 86 uint32 admin = 1; 87 uint32 assigned = 2; 88 } 89 90 message RouteDistinguisherIPAddress { 91 string admin = 1; 92 uint32 assigned = 2; 93 } 94 95 message RouteDistinguisherFourOctetASN { 96 uint32 admin = 1; 97 uint32 assigned = 2; 98 } 99 100 message EthernetSegmentIdentifier { 101 uint32 type = 1; 102 bytes value = 2; 103 } 104 105 // VPLSNLRI represents the NLRI for: 106 // - AFI=25, SAFI=65 107 message VPLSNLRI { 108 // One of: 109 // - RouteDistinguisherTwoOctetASN 110 // - RouteDistinguisherIPAddress 111 // - RouteDistinguisherFourOctetASN 112 google.protobuf.Any rd = 1; 113 uint32 ve_id = 2; 114 uint32 ve_block_offset = 3; 115 uint32 ve_block_size = 4; 116 uint32 label_block_base = 5; 117 } 118 119 120 // EVPNEthernetAutoDiscoveryRoute represents the NLRI for: 121 // - AFI=25, SAFI=70, RouteType=1 122 message EVPNEthernetAutoDiscoveryRoute { 123 // One of: 124 // - RouteDistinguisherTwoOctetASN 125 // - RouteDistinguisherIPAddress 126 // - RouteDistinguisherFourOctetASN 127 google.protobuf.Any rd = 1; 128 EthernetSegmentIdentifier esi = 2; 129 uint32 ethernet_tag = 3; 130 uint32 label = 4; 131 } 132 133 // EVPNMACIPAdvertisementRoute represents the NLRI for: 134 // - AFI=25, SAFI=70, RouteType=2 135 message EVPNMACIPAdvertisementRoute { 136 // One of: 137 // - RouteDistinguisherTwoOctetASN 138 // - RouteDistinguisherIPAddress 139 // - RouteDistinguisherFourOctetASN 140 google.protobuf.Any rd = 1; 141 EthernetSegmentIdentifier esi = 2; 142 uint32 ethernet_tag = 3; 143 string mac_address = 4; 144 string ip_address = 5; 145 repeated uint32 labels = 6; 146 } 147 148 // EVPNInclusiveMulticastEthernetTagRoute represents the NLRI for: 149 // - AFI=25, SAFI=70, RouteType=3 150 message EVPNInclusiveMulticastEthernetTagRoute { 151 // One of: 152 // - RouteDistinguisherTwoOctetASN 153 // - RouteDistinguisherIPAddress 154 // - RouteDistinguisherFourOctetASN 155 google.protobuf.Any rd = 1; 156 uint32 ethernet_tag = 2; 157 string ip_address = 3; 158 } 159 160 // EVPNEthernetSegmentRoute represents the NLRI for: 161 // - AFI=25, SAFI=70, RouteType=4 162 message EVPNEthernetSegmentRoute { 163 // One of: 164 // - RouteDistinguisherTwoOctetASN 165 // - RouteDistinguisherIPAddress 166 // - RouteDistinguisherFourOctetASN 167 google.protobuf.Any rd = 1; 168 EthernetSegmentIdentifier esi = 2; 169 string ip_address = 3; 170 } 171 172 // EVPNIPPrefixRoute represents the NLRI for: 173 // - AFI=25, SAFI=70, RouteType=5 174 message EVPNIPPrefixRoute { 175 // One of: 176 // - RouteDistinguisherTwoOctetASN 177 // - RouteDistinguisherIPAddress 178 // - RouteDistinguisherFourOctetASN 179 google.protobuf.Any rd = 1; 180 EthernetSegmentIdentifier esi = 2; 181 uint32 ethernet_tag = 3; 182 string ip_prefix = 4; 183 uint32 ip_prefix_len = 5; 184 string gw_address = 6; 185 uint32 label = 7; 186 } 187 188 // EVPNIPMSIRoute represents the NLRI for: 189 // - AFI=25, SAFI=70, RouteType=9 190 message EVPNIPMSIRoute { 191 // One of: 192 // - RouteDistinguisherTwoOctetASN 193 // - RouteDistinguisherIPAddress 194 // - RouteDistinguisherFourOctetASN 195 google.protobuf.Any rd = 1; 196 uint32 ethernet_tag = 2; 197 google.protobuf.Any rt = 3; 198 } 199 200 // SRPolicyNLRI represents the NLRI for: 201 // - AFI=1, SAFI=73 202 // - AFI=2, SAFI=73 203 message SRPolicyNLRI { 204 // length field carries the length of NLRI portion expressed in bits 205 uint32 length = 1; 206 // distinguisher field carries 4-octet value uniquely identifying the policy 207 // in the context of <color, endpoint> tuple. 208 uint32 distinguisher = 2; 209 // color field carries 4-octet value identifying (with the endpoint) the 210 // policy. The color is used to match the color of the destination 211 // prefixes to steer traffic into the SR Policy 212 uint32 color = 3; 213 // endpoint field identifies the endpoint of a policy. The Endpoint may 214 // represent a single node or a set of nodes (e.g., an anycast 215 // address). The Endpoint is an IPv4 (4-octet) address or an IPv6 216 // (16-octet) address according to the AFI of the NLRI. 217 bytes endpoint = 4; 218 } 219 220 // LabeledVPNIPAddressPrefix represents the NLRI for: 221 // - AFI=1, SAFI=128 222 // - AFI=2, SAFI=128 223 message LabeledVPNIPAddressPrefix { 224 repeated uint32 labels = 1; 225 // One of: 226 // - TwoOctetAsSpecificExtended 227 // - IPv4AddressSpecificExtended 228 // - FourOctetAsSpecificExtended 229 google.protobuf.Any rd = 2; 230 uint32 prefix_len = 3; 231 string prefix = 4; 232 } 233 234 // RouteTargetMembershipNLRI represents the NLRI for: 235 // - AFI=1, SAFI=132 236 message RouteTargetMembershipNLRI { 237 uint32 asn = 1; 238 // One of: 239 // - TwoOctetAsSpecificExtended 240 // - IPv4AddressSpecificExtended 241 // - FourOctetAsSpecificExtended 242 google.protobuf.Any rt = 2; 243 } 244 245 message FlowSpecIPPrefix { 246 uint32 type = 1; 247 uint32 prefix_len = 2; 248 string prefix = 3; 249 // IPv6 only 250 uint32 offset = 4; 251 } 252 253 message FlowSpecMAC { 254 uint32 type = 1; 255 string address = 2; 256 } 257 258 message FlowSpecComponentItem { 259 // Operator for Numeric type, Operand for Bitmask type 260 uint32 op = 1; 261 uint64 value = 2; 262 } 263 264 message FlowSpecComponent { 265 uint32 type = 1; 266 repeated FlowSpecComponentItem items = 2; 267 } 268 269 // FlowSpecNLRI represents the NLRI for: 270 // - AFI=1, SAFI=133 271 // - AFI=2, SAFI=133 272 message FlowSpecNLRI { 273 // One of: 274 // - FlowSpecIPPrefix 275 // - FlowSpecMAC 276 // - FlowSpecComponent 277 repeated google.protobuf.Any rules = 1; 278 } 279 280 // VPNFlowSpecNLRI represents the NLRI for: 281 // - AFI=1, SAFI=134 282 // - AFI=2, SAFI=134 283 // - AFI=25, SAFI=134 284 message VPNFlowSpecNLRI { 285 // One of: 286 // - RouteDistinguisherTwoOctetAS 287 // - RouteDistinguisherIPAddressAS 288 // - RouteDistinguisherFourOctetAS 289 google.protobuf.Any rd = 1; 290 // One of: 291 // - FlowSpecIPPrefix 292 // - FlowSpecMAC 293 // - FlowSpecComponent 294 repeated google.protobuf.Any rules = 2; 295 } 296 297 // OpaqueNLRI represents the NLRI for: 298 // - AFI=16397, SAFI=241 299 message OpaqueNLRI { 300 bytes key = 1; 301 bytes value = 2; 302 } 303 304 message LsNodeDescriptor { 305 uint32 asn = 1; 306 uint32 bgp_ls_id = 2; 307 uint32 ospf_area_id = 3; 308 bool pseudonode = 4; 309 string igp_router_id = 5; 310 string bgp_router_id = 6; 311 uint32 bgp_confederation_member = 7; 312 } 313 314 message LsLinkDescriptor { 315 uint32 link_local_id = 1; 316 uint32 link_remote_id = 2; 317 string interface_addr_ipv4 = 3; 318 string neighbor_addr_ipv4 = 4; 319 string interface_addr_ipv6 = 5; 320 string neighbor_addr_ipv6 = 6; 321 } 322 323 enum LsOspfRouteType { 324 LS_OSPF_ROUTE_TYPE_UNKNOWN = 0; 325 LS_OSPF_ROUTE_TYPE_INTRA_AREA = 1; 326 LS_OSPF_ROUTE_TYPE_INTER_AREA = 2; 327 LS_OSPF_ROUTE_TYPE_EXTERNAL1 = 3; 328 LS_OSPF_ROUTE_TYPE_EXTERNAL2 = 4; 329 LS_OSPF_ROUTE_TYPE_NSSA1 = 5; 330 LS_OSPF_ROUTE_TYPE_NSSA2 = 6; 331 } 332 333 message LsPrefixDescriptor { 334 repeated string ip_reachability = 1; 335 LsOspfRouteType ospf_route_type = 2; 336 } 337 338 message LsNodeNLRI { LsNodeDescriptor local_node = 1; } 339 340 message LsLinkNLRI { 341 LsNodeDescriptor local_node = 1; 342 LsNodeDescriptor remote_node = 2; 343 LsLinkDescriptor link_descriptor = 3; 344 } 345 346 message LsPrefixV4NLRI { 347 LsNodeDescriptor local_node = 1; 348 LsPrefixDescriptor prefix_descriptor = 2; 349 } 350 351 message LsPrefixV6NLRI { 352 LsNodeDescriptor local_node = 1; 353 LsPrefixDescriptor prefix_descriptor = 2; 354 } 355 356 // Based om RFC 7752, Table 1. 357 enum LsNLRIType { 358 LS_NLRI_UNKNOWN = 0; LS_NLRI_NODE = 1; LS_NLRI_LINK = 2; 359 LS_NLRI_PREFIX_V4 = 3; 360 LS_NLRI_PREFIX_V6 = 4; 361 } 362 363 enum LsProtocolID { 364 LS_PROTOCOL_UNKNOWN = 0; LS_PROTOCOL_ISIS_L1 = 1; LS_PROTOCOL_ISIS_L2 = 2; 365 LS_PROTOCOL_OSPF_V2 = 3; 366 LS_PROTOCOL_DIRECT = 4; 367 LS_PROTOCOL_STATIC = 5; 368 LS_PROTOCOL_OSPF_V3 = 6; 369 } 370 371 // LsAddrPrefix represents the NLRI for: 372 // - AFI=16388, SAFI=71 373 message LsAddrPrefix { 374 LsNLRIType type = 1; 375 // One of: 376 // - LsNodeNLRI 377 // - LsLinkNLRI 378 // - LsPrefixV4NLRI 379 // - LsPrefixV6NLRI 380 google.protobuf.Any nlri = 2; 381 uint32 length = 3; 382 LsProtocolID protocol_id = 4; 383 uint64 identifier = 5; 384 } 385 386 message MUPInterworkSegmentDiscoveryRoute { 387 // One of: 388 // - RouteDistinguisherTwoOctetASN 389 // - RouteDistinguisherIPAddress 390 // - RouteDistinguisherFourOctetASN 391 google.protobuf.Any rd = 1; 392 string prefix = 2; 393 } 394 395 message MUPDirectSegmentDiscoveryRoute { 396 // One of: 397 // - RouteDistinguisherTwoOctetASN 398 // - RouteDistinguisherIPAddress 399 // - RouteDistinguisherFourOctetASN 400 google.protobuf.Any rd = 1; 401 string address = 2; 402 } 403 404 message MUPType1SessionTransformedRoute { 405 // One of: 406 // - RouteDistinguisherTwoOctetASN 407 // - RouteDistinguisherIPAddress 408 // - RouteDistinguisherFourOctetASN 409 google.protobuf.Any rd = 1; 410 uint32 prefix_length = 2 [deprecated = true]; 411 string prefix = 3; 412 uint32 teid = 4; 413 uint32 qfi = 5; 414 uint32 endpoint_address_length = 6; 415 string endpoint_address = 7; 416 uint32 source_address_length = 8; 417 string source_address = 9; 418 } 419 420 message MUPType2SessionTransformedRoute { 421 // One of: 422 // - RouteDistinguisherTwoOctetASN 423 // - RouteDistinguisherIPAddress 424 // - RouteDistinguisherFourOctetASN 425 google.protobuf.Any rd = 1; 426 uint32 endpoint_address_length = 2; 427 string endpoint_address = 3; 428 uint32 teid = 4; 429 } 430 431 message MpReachNLRIAttribute { 432 apipb.Family family = 1; 433 repeated string next_hops = 2; 434 // Each NLRI must be one of: 435 // - IPAddressPrefix 436 // - LabeledIPAddressPrefix 437 // - EncapsulationNLRI 438 // - EVPNEthernetAutoDiscoveryRoute 439 // - EVPNMACIPAdvertisementRoute 440 // - EVPNInclusiveMulticastEthernetTagRoute 441 // - EVPNEthernetSegmentRoute 442 // - EVPNIPPrefixRoute 443 // - EVPNIPMSIRoute 444 // - LabeledVPNIPAddressPrefix 445 // - RouteTargetMembershipNLRI 446 // - FlowSpecNLRI 447 // - VPNFlowSpecNLRI 448 // - OpaqueNLRI 449 // - LsAddrPrefix 450 // - SR Policy NLRI 451 // - MUPInterworkSegmentDiscoveryRoute 452 // - MUPDirectSegmentDiscoveryRoute 453 // - MUPType1SessionTransformedRoute 454 // - MUPType2SessionTransformedRoute 455 repeated google.protobuf.Any nlris = 3; 456 } 457 458 message MpUnreachNLRIAttribute { 459 apipb.Family family = 1; 460 // The same as NLRI field of MpReachNLRIAttribute 461 repeated google.protobuf.Any nlris = 3; 462 } 463 464 message TwoOctetAsSpecificExtended { 465 bool is_transitive = 1; 466 uint32 sub_type = 2; 467 uint32 asn = 3; 468 uint32 local_admin = 4; 469 } 470 471 message IPv4AddressSpecificExtended { 472 bool is_transitive = 1; 473 uint32 sub_type = 2; 474 string address = 3; 475 uint32 local_admin = 4; 476 } 477 478 message FourOctetAsSpecificExtended { 479 bool is_transitive = 1; 480 uint32 sub_type = 2; 481 uint32 asn = 3; 482 uint32 local_admin = 4; 483 } 484 485 message LinkBandwidthExtended { 486 uint32 asn = 1; 487 float bandwidth = 2; 488 } 489 490 message ValidationExtended { uint32 state = 1; } 491 492 message ColorExtended { uint32 color = 1; } 493 494 message EncapExtended { uint32 tunnel_type = 1; } 495 496 message DefaultGatewayExtended {} 497 498 message OpaqueExtended { 499 bool is_transitive = 1; 500 bytes value = 3; 501 } 502 503 message ESILabelExtended { 504 bool is_single_active = 1; 505 uint32 label = 2; 506 } 507 508 message ESImportRouteTarget { string es_import = 1; } 509 510 message MacMobilityExtended { 511 bool is_sticky = 1; 512 uint32 sequence_num = 2; 513 } 514 515 message RouterMacExtended { string mac = 1; } 516 517 message TrafficRateExtended { 518 uint32 asn = 1; 519 float rate = 2; 520 } 521 522 message TrafficActionExtended { 523 bool terminal = 1; 524 bool sample = 2; 525 } 526 527 message RedirectTwoOctetAsSpecificExtended { 528 uint32 asn = 1; 529 uint32 local_admin = 2; 530 } 531 532 message RedirectIPv4AddressSpecificExtended { 533 string address = 1; 534 uint32 local_admin = 2; 535 } 536 537 message RedirectFourOctetAsSpecificExtended { 538 uint32 asn = 1; 539 uint32 local_admin = 2; 540 } 541 542 message TrafficRemarkExtended { uint32 dscp = 1; } 543 544 message MUPExtended { 545 uint32 sub_type = 1; 546 uint32 segment_id2 = 2; 547 uint32 segment_id4 = 3; 548 } 549 550 message VPLSExtended { 551 uint32 control_flags = 1; 552 uint32 mtu = 2; 553 } 554 555 message UnknownExtended { 556 uint32 type = 1; 557 bytes value = 2; 558 } 559 560 message ExtendedCommunitiesAttribute { 561 // Each Community must be one of: 562 // - TwoOctetAsSpecificExtended 563 // - IPv4AddressSpecificExtended 564 // - FourOctetAsSpecificExtended 565 // - OpaqueExtended 566 // - ESILabelExtended 567 // - MacMobilityExtended 568 // - RouterMacExtended 569 // - TrafficRateExtended 570 // - TrafficActionExtended 571 // - RedirectTwoOctetAsSpecificExtended 572 // - RedirectIPv4AddressSpecificExtended 573 // - RedirectFourOctetAsSpecificExtended 574 // - TrafficRemarkExtended 575 // - MUPExtended 576 // - VPLSExtended 577 // - UnknownExtended 578 repeated google.protobuf.Any communities = 1; 579 } 580 581 message As4PathAttribute { repeated AsSegment segments = 1; } 582 583 message As4AggregatorAttribute { 584 uint32 asn = 2; 585 string address = 3; 586 } 587 588 message PmsiTunnelAttribute { 589 uint32 flags = 1; 590 uint32 type = 2; 591 uint32 label = 3; 592 bytes id = 4; 593 } 594 595 message TunnelEncapSubTLVEncapsulation { 596 uint32 key = 1; 597 bytes cookie = 2; 598 } 599 600 message TunnelEncapSubTLVProtocol { uint32 protocol = 1; } 601 602 message TunnelEncapSubTLVColor { uint32 color = 1; } 603 604 message TunnelEncapSubTLVSRPreference { 605 uint32 flags = 1; 606 uint32 preference = 2; 607 } 608 609 message TunnelEncapSubTLVSRCandidatePathName { string candidate_path_name = 1; } 610 611 message TunnelEncapSubTLVSRPriority { uint32 priority = 1; } 612 613 message TunnelEncapSubTLVSRBindingSID { 614 // bsid must be one of: 615 // - SRBindingSID 616 // - SRv6BindingSID 617 google.protobuf.Any bsid = 1; 618 } 619 620 message SRBindingSID { 621 bool s_flag = 1; 622 bool i_flag = 2; 623 bytes sid = 3; 624 } 625 626 enum SRv6Behavior { 627 RESERVED = 0; END = 1; END_WITH_PSP = 2; END_WITH_USP = 3; 628 END_WITH_PSP_USP = 4; 629 ENDX = 5; 630 ENDX_WITH_PSP = 6; 631 ENDX_WITH_USP = 7; 632 ENDX_WITH_PSP_USP = 8; 633 ENDT = 9; 634 ENDT_WITH_PSP = 10; 635 ENDT_WITH_USP = 11; 636 ENDT_WITH_PSP_USP = 12; 637 END_B6_ENCAPS = 14; 638 END_BM = 15; 639 END_DX6 = 16; 640 END_DX4 = 17; 641 END_DT6 = 18; 642 END_DT4 = 19; 643 END_DT46 = 20; 644 END_DX2 = 21; 645 END_DX2V = 22; 646 END_DT2U = 23; 647 END_DT2M = 24; 648 END_B6_ENCAPS_Red = 27; 649 END_WITH_USD = 28; 650 END_WITH_PSP_USD = 29; 651 END_WITH_USP_USD = 30; 652 END_WITH_PSP_USP_USD = 31; 653 ENDX_WITH_USD = 32; 654 ENDX_WITH_PSP_USD = 33; 655 ENDX_WITH_USP_USD = 34; 656 ENDX_WITH_PSP_USP_USD = 35; 657 ENDT_WITH_USD = 36; 658 ENDT_WITH_PSP_USD = 37; 659 ENDT_WITH_USP_USD = 38; 660 ENDT_WITH_PSP_USP_USD = 39; 661 ENDM_GTP6D = 69; // 0x0045 662 ENDM_GTP6DI = 70; // 0x0046 663 ENDM_GTP6E = 71; // 0x0047 664 ENDM_GTP4E = 72; // 0x0048 665 } 666 667 message SRv6EndPointBehavior { 668 SRv6Behavior behavior = 1; 669 uint32 block_len = 2; 670 uint32 node_len = 3; 671 uint32 func_len = 4; 672 uint32 arg_len = 5; 673 } 674 675 message SRv6BindingSID { 676 bool s_flag = 1; 677 bool i_flag = 2; 678 bool b_flag = 3; 679 bytes sid = 4; 680 SRv6EndPointBehavior endpoint_behavior_structure = 5; 681 } 682 683 enum ENLPType { Reserved = 0; Type1 = 1; Type2 = 2; Type3 = 3; Type4 = 4; } 684 685 message TunnelEncapSubTLVSRENLP { 686 uint32 flags = 1; 687 ENLPType enlp = 2; 688 } 689 690 message SRWeight { 691 uint32 flags = 1; 692 uint32 weight = 2; 693 } 694 695 message SegmentFlags { 696 bool v_flag = 1; 697 bool a_flag = 2; 698 bool s_flag = 3; 699 bool b_flag = 4; 700 } 701 702 message SegmentTypeA { 703 SegmentFlags flags = 1; 704 uint32 label = 2; 705 } 706 707 message SegmentTypeB { 708 SegmentFlags flags = 1; 709 bytes sid = 2; 710 SRv6EndPointBehavior endpoint_behavior_structure = 3; 711 } 712 713 message TunnelEncapSubTLVSRSegmentList { 714 SRWeight weight = 1; 715 // segments must be one of: 716 // - SegmentTypeA 717 // - SegmentTypeB 718 repeated google.protobuf.Any segments = 2; 719 } 720 721 message TunnelEncapSubTLVEgressEndpoint { 722 string address = 1; 723 } 724 725 message TunnelEncapSubTLVUDPDestPort { 726 uint32 port = 1; 727 } 728 729 message TunnelEncapSubTLVUnknown { 730 uint32 type = 1; 731 bytes value = 2; 732 } 733 734 message TunnelEncapTLV { 735 uint32 type = 1; 736 // Each TLV must be one of: 737 // - TunnelEncapSubTLVEncapsulation 738 // - TunnelEncapSubTLVProtocol 739 // - TunnelEncapSubTLVColor 740 // - TunnelEncapSubTLVSRPolicy 741 // - TunnelEncapSubTLVUnknown 742 repeated google.protobuf.Any tlvs = 2; 743 } 744 745 message TunnelEncapAttribute { repeated TunnelEncapTLV tlvs = 1; } 746 747 message IPv6AddressSpecificExtended { 748 bool is_transitive = 1; 749 uint32 sub_type = 2; 750 string address = 3; 751 uint32 local_admin = 4; 752 } 753 754 message RedirectIPv6AddressSpecificExtended { 755 string address = 1; 756 uint32 local_admin = 2; 757 } 758 759 message IP6ExtendedCommunitiesAttribute { 760 // Each Community must be one of: 761 // - IPv6AddressSpecificExtended 762 // - RedirectIPv6AddressSpecificExtended 763 repeated google.protobuf.Any communities = 1; 764 } 765 766 message AigpTLVIGPMetric { uint64 metric = 1; } 767 768 message AigpTLVUnknown { 769 uint32 type = 1; 770 bytes value = 2; 771 } 772 773 message AigpAttribute { 774 // Each TLV must be one of: 775 // - AigpTLVIGPMetric 776 // - AigpTLVUnknown 777 repeated google.protobuf.Any tlvs = 1; 778 } 779 780 message LargeCommunity { 781 uint32 global_admin = 1; 782 uint32 local_data1 = 2; 783 uint32 local_data2 = 3; 784 } 785 786 message LargeCommunitiesAttribute { repeated LargeCommunity communities = 1; } 787 788 message LsNodeFlags { 789 bool overload = 1; 790 bool attached = 2; 791 bool external = 3; 792 bool abr = 4; 793 bool router = 5; 794 bool v6 = 6; 795 } 796 797 message LsIGPFlags { 798 bool down = 1; 799 bool no_unicast = 2; 800 bool local_address = 3; 801 bool propagate_nssa = 4; 802 } 803 804 message LsSrRange { 805 uint32 begin = 1; 806 uint32 end = 2; 807 } 808 809 message LsSrCapabilities { 810 bool ipv4_supported = 1; 811 bool ipv6_supported = 2; 812 repeated LsSrRange ranges = 3; 813 } 814 815 message LsSrLocalBlock { repeated LsSrRange ranges = 1; } 816 817 message LsAttributeNode { 818 string name = 1; 819 LsNodeFlags flags = 2; 820 string local_router_id = 3; 821 string local_router_id_v6 = 4; 822 bytes isis_area = 5; 823 bytes opaque = 6; 824 825 LsSrCapabilities sr_capabilities = 7; 826 bytes sr_algorithms = 8; 827 LsSrLocalBlock sr_local_block = 9; 828 } 829 830 message LsAttributeLink { 831 string name = 1; 832 string local_router_id = 2; 833 string local_router_id_v6 = 3; 834 string remote_router_id = 4; 835 string remote_router_id_v6 = 5; 836 uint32 admin_group = 6; 837 uint32 default_te_metric = 7; 838 uint32 igp_metric = 8; 839 bytes opaque = 9; 840 841 float bandwidth = 10; 842 float reservable_bandwidth = 11; 843 repeated float unreserved_bandwidth = 12; 844 845 uint32 sr_adjacency_sid = 13; 846 repeated uint32 srlgs = 14; 847 } 848 849 message LsAttributePrefix { 850 LsIGPFlags igp_flags = 1; 851 bytes opaque = 2; 852 853 uint32 sr_prefix_sid = 3; 854 } 855 856 message LsBgpPeerSegmentSIDFlags { 857 bool value = 1; 858 bool local = 2; 859 bool backup = 3; 860 bool persistent = 4; 861 } 862 863 message LsBgpPeerSegmentSID { 864 LsBgpPeerSegmentSIDFlags flags = 1; 865 uint32 weight = 2; 866 uint32 sid = 3; 867 } 868 869 message LsAttributeBgpPeerSegment { 870 LsBgpPeerSegmentSID bgp_peer_node_sid = 1; 871 LsBgpPeerSegmentSID bgp_peer_adjacency_sid = 2; 872 LsBgpPeerSegmentSID bgp_peer_set_sid = 3; 873 } 874 875 message LsAttribute { 876 LsAttributeNode node = 1; 877 LsAttributeLink link = 2; 878 LsAttributePrefix prefix = 3; 879 LsAttributeBgpPeerSegment bgp_peer_segment = 4; 880 } 881 882 message UnknownAttribute { 883 uint32 flags = 1; 884 uint32 type = 2; 885 bytes value = 3; 886 } 887 888 // https://www.rfc-editor.org/rfc/rfc9252.html#section-3.2.1 889 message SRv6StructureSubSubTLV { 890 uint32 locator_block_length = 1; 891 uint32 locator_node_length = 2; 892 uint32 function_length = 3; 893 uint32 argument_length = 4; 894 uint32 transposition_length = 5; 895 uint32 transposition_offset = 6; 896 } 897 898 message SRv6SIDFlags { 899 // Placeholder for future sid flags 900 bool flag_1 = 1; 901 } 902 903 message SRv6TLV { repeated google.protobuf.Any tlv = 1; } 904 905 // https://tools.ietf.org/html/draft-dawra-bess-srv6-services-02#section-2.1.1 906 message SRv6InformationSubTLV { 907 bytes sid = 1; 908 SRv6SIDFlags flags = 2; 909 uint32 endpoint_behavior = 3; 910 // SRv6TLV is one of: 911 // - SRv6StructureSubSubTLV 912 map<uint32, SRv6TLV> sub_sub_tlvs = 4; 913 } 914 915 // https://www.rfc-editor.org/rfc/rfc9252.html#section-2 916 message SRv6L3ServiceTLV { 917 // SRv6TLV is one of: 918 // - SRv6InformationSubTLV 919 map<uint32, SRv6TLV> sub_tlvs = 1; 920 } 921 922 // https://www.rfc-editor.org/rfc/rfc9252.html#section-2 923 message SRv6L2ServiceTLV { 924 // SRv6TLV is one of: 925 // - SRv6InformationSubTLV 926 map<uint32, SRv6TLV> sub_tlvs = 1; 927 } 928 929 // https://tools.ietf.org/html/rfc8669 930 message PrefixSID { 931 // tlv is one of: 932 // - IndexLabelTLV Type 1 (not yet implemented) 933 // - OriginatorSRGBTLV Type 3 (not yet implemented) 934 // - SRv6L3ServiceTLV Type 5 935 // - SRv6L2ServiceTLV Type 6 936 repeated google.protobuf.Any tlvs = 1; 937 }