From 886d2d44ba726bf6c5a99e5d720d91870d29a2d5 Mon Sep 17 00:00:00 2001 From: aronj Date: Thu, 10 Sep 2026 16:29:22 +0000 Subject: [PATCH] Add the SR Policy Candidate Path NLRI. Implement BGP-LS NLRI type 5 (SR Policy Candidate Path) together with the attribute TLVs that describe a candidate path. --- .github/workflows/ci.yml | 16 + api/attribute.pb.go | 3191 +++++++++++++++++++++++---- api/nlri.pb.go | 465 ++-- cmd/gobgp/global.go | 561 ++++- cmd/gobgp/global_test.go | 198 ++ docs/sources/bgp-ls.md | 32 +- pkg/apiutil/attribute.go | 49 + pkg/apiutil/ls_sr_policy.go | 844 +++++++ pkg/apiutil/ls_sr_policy_test.go | 369 ++++ pkg/packet/bgp/bgp.go | 139 +- pkg/packet/bgp/bgp_test.go | 12 + pkg/packet/bgp/ls_sr_policy.go | 2929 ++++++++++++++++++++++++ pkg/packet/bgp/ls_sr_policy_test.go | 1011 +++++++++ proto/api/attribute.proto | 275 +++ proto/api/nlri.proto | 30 +- test/lib/base.py | 4 +- test/lib/gobgp.py | 3 + test/scenario_test/bgp_ls_test.py | 277 +++ tools/spell-check/dictionary.txt | 6 + 19 files changed, 9866 insertions(+), 545 deletions(-) create mode 100644 pkg/apiutil/ls_sr_policy.go create mode 100644 pkg/apiutil/ls_sr_policy_test.go create mode 100644 pkg/packet/bgp/ls_sr_policy.go create mode 100644 pkg/packet/bgp/ls_sr_policy_test.go create mode 100644 test/scenario_test/bgp_ls_test.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a15c68553..f2ad7c6ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -691,6 +691,22 @@ jobs: sudo pip3 install -r test/pip-requires.txt PYTHONPATH=test python3 -m pytest test/scenario_test/mup_test.py --gobgp-image gobgp -x -s + bgp-ls: + name: bgp-ls + runs-on: ubuntu-24.04 + needs: build + steps: + - uses: actions/checkout@v6 + - uses: actions/download-artifact@v7 + with: + path: artifact + - name: test + run: | + docker load < artifact/gobgp.tar + sudo apt-get install python3-setuptools + sudo pip3 install -r test/pip-requires.txt + PYTHONPATH=test python3 -m pytest test/scenario_test/bgp_ls_test.py --gobgp-image gobgp -x -s + tcp-md5: name: tcp-md5 runs-on: ubuntu-24.04 diff --git a/api/attribute.pb.go b/api/attribute.pb.go index e5caa5b44..6431f2cd3 100644 --- a/api/attribute.pb.go +++ b/api/attribute.pb.go @@ -260,6 +260,83 @@ func (ENLPType) EnumDescriptor() ([]byte, []int) { return file_api_attribute_proto_rawDescGZIP(), []int{1} } +// SR Segment Types (RFC 9857 Section 5.7.1, letters follow RFC 9256). +type LsSrSegmentType int32 + +const ( + LsSrSegmentType_LS_SR_SEGMENT_TYPE_UNSPECIFIED LsSrSegmentType = 0 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_A_MPLS_LABEL LsSrSegmentType = 1 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_B_SRV6_SID LsSrSegmentType = 2 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_C_IPV4_NODE LsSrSegmentType = 3 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_D_IPV6_NODE_MPLS LsSrSegmentType = 4 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_E_IPV4_NODE_INTERFACE LsSrSegmentType = 5 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_F_IPV4_ADJACENCY LsSrSegmentType = 6 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_G_IPV6_NODE_INTERFACE_MPLS LsSrSegmentType = 7 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_H_IPV6_ADJACENCY_MPLS LsSrSegmentType = 8 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_I_IPV6_NODE_SRV6 LsSrSegmentType = 9 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_J_IPV6_NODE_INTERFACE_SRV6 LsSrSegmentType = 10 + LsSrSegmentType_LS_SR_SEGMENT_TYPE_K_IPV6_ADJACENCY_SRV6 LsSrSegmentType = 11 +) + +// Enum value maps for LsSrSegmentType. +var ( + LsSrSegmentType_name = map[int32]string{ + 0: "LS_SR_SEGMENT_TYPE_UNSPECIFIED", + 1: "LS_SR_SEGMENT_TYPE_A_MPLS_LABEL", + 2: "LS_SR_SEGMENT_TYPE_B_SRV6_SID", + 3: "LS_SR_SEGMENT_TYPE_C_IPV4_NODE", + 4: "LS_SR_SEGMENT_TYPE_D_IPV6_NODE_MPLS", + 5: "LS_SR_SEGMENT_TYPE_E_IPV4_NODE_INTERFACE", + 6: "LS_SR_SEGMENT_TYPE_F_IPV4_ADJACENCY", + 7: "LS_SR_SEGMENT_TYPE_G_IPV6_NODE_INTERFACE_MPLS", + 8: "LS_SR_SEGMENT_TYPE_H_IPV6_ADJACENCY_MPLS", + 9: "LS_SR_SEGMENT_TYPE_I_IPV6_NODE_SRV6", + 10: "LS_SR_SEGMENT_TYPE_J_IPV6_NODE_INTERFACE_SRV6", + 11: "LS_SR_SEGMENT_TYPE_K_IPV6_ADJACENCY_SRV6", + } + LsSrSegmentType_value = map[string]int32{ + "LS_SR_SEGMENT_TYPE_UNSPECIFIED": 0, + "LS_SR_SEGMENT_TYPE_A_MPLS_LABEL": 1, + "LS_SR_SEGMENT_TYPE_B_SRV6_SID": 2, + "LS_SR_SEGMENT_TYPE_C_IPV4_NODE": 3, + "LS_SR_SEGMENT_TYPE_D_IPV6_NODE_MPLS": 4, + "LS_SR_SEGMENT_TYPE_E_IPV4_NODE_INTERFACE": 5, + "LS_SR_SEGMENT_TYPE_F_IPV4_ADJACENCY": 6, + "LS_SR_SEGMENT_TYPE_G_IPV6_NODE_INTERFACE_MPLS": 7, + "LS_SR_SEGMENT_TYPE_H_IPV6_ADJACENCY_MPLS": 8, + "LS_SR_SEGMENT_TYPE_I_IPV6_NODE_SRV6": 9, + "LS_SR_SEGMENT_TYPE_J_IPV6_NODE_INTERFACE_SRV6": 10, + "LS_SR_SEGMENT_TYPE_K_IPV6_ADJACENCY_SRV6": 11, + } +) + +func (x LsSrSegmentType) Enum() *LsSrSegmentType { + p := new(LsSrSegmentType) + *p = x + return p +} + +func (x LsSrSegmentType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LsSrSegmentType) Descriptor() protoreflect.EnumDescriptor { + return file_api_attribute_proto_enumTypes[2].Descriptor() +} + +func (LsSrSegmentType) Type() protoreflect.EnumType { + return &file_api_attribute_proto_enumTypes[2] +} + +func (x LsSrSegmentType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LsSrSegmentType.Descriptor instead. +func (LsSrSegmentType) EnumDescriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{2} +} + type AsSegment_Type int32 const ( @@ -299,11 +376,11 @@ func (x AsSegment_Type) String() string { } func (AsSegment_Type) Descriptor() protoreflect.EnumDescriptor { - return file_api_attribute_proto_enumTypes[2].Descriptor() + return file_api_attribute_proto_enumTypes[3].Descriptor() } func (AsSegment_Type) Type() protoreflect.EnumType { - return &file_api_attribute_proto_enumTypes[2] + return &file_api_attribute_proto_enumTypes[3] } func (x AsSegment_Type) Number() protoreflect.EnumNumber { @@ -4600,31 +4677,37 @@ func (x *LsAttributeSrv6SID) GetSrv6BgpPeerNodeSid() *LsSrv6BgpPeerNodeSID { return nil } -type LsAttribute struct { - state protoimpl.MessageState `protogen:"open.v1"` - Node *LsAttributeNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - Link *LsAttributeLink `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` - Prefix *LsAttributePrefix `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` - BgpPeerSegment *LsAttributeBgpPeerSegment `protobuf:"bytes,4,opt,name=bgp_peer_segment,json=bgpPeerSegment,proto3" json:"bgp_peer_segment,omitempty"` - Srv6Sid *LsAttributeSrv6SID `protobuf:"bytes,5,opt,name=srv6_sid,json=srv6Sid,proto3" json:"srv6_sid,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// SR Binding SID TLV (RFC 9857 Section 5.1). +type LsSrBindingSIDFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + // D-Flag: the Binding SID is an SRv6 SID (set) or an SR-MPLS label (clear). + Srv6 bool `protobuf:"varint,1,opt,name=srv6,proto3" json:"srv6,omitempty"` + // B-Flag: the Binding SID is allocated. + Allocated bool `protobuf:"varint,2,opt,name=allocated,proto3" json:"allocated,omitempty"` + // U-Flag: the specified Binding SID is unavailable. + Unavailable bool `protobuf:"varint,3,opt,name=unavailable,proto3" json:"unavailable,omitempty"` + // L-Flag: the Binding SID is allocated from the SRLB. + FromSrlb bool `protobuf:"varint,4,opt,name=from_srlb,json=fromSrlb,proto3" json:"from_srlb,omitempty"` + // F-Flag: the Binding SID was allocated as a fallback. + Fallback bool `protobuf:"varint,5,opt,name=fallback,proto3" json:"fallback,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *LsAttribute) Reset() { - *x = LsAttribute{} +func (x *LsSrBindingSIDFlags) Reset() { + *x = LsSrBindingSIDFlags{} mi := &file_api_attribute_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *LsAttribute) String() string { +func (x *LsSrBindingSIDFlags) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LsAttribute) ProtoMessage() {} +func (*LsSrBindingSIDFlags) ProtoMessage() {} -func (x *LsAttribute) ProtoReflect() protoreflect.Message { +func (x *LsSrBindingSIDFlags) ProtoReflect() protoreflect.Message { mi := &file_api_attribute_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4636,69 +4719,73 @@ func (x *LsAttribute) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use LsAttribute.ProtoReflect.Descriptor instead. -func (*LsAttribute) Descriptor() ([]byte, []int) { +// Deprecated: Use LsSrBindingSIDFlags.ProtoReflect.Descriptor instead. +func (*LsSrBindingSIDFlags) Descriptor() ([]byte, []int) { return file_api_attribute_proto_rawDescGZIP(), []int{66} } -func (x *LsAttribute) GetNode() *LsAttributeNode { +func (x *LsSrBindingSIDFlags) GetSrv6() bool { if x != nil { - return x.Node + return x.Srv6 } - return nil + return false } -func (x *LsAttribute) GetLink() *LsAttributeLink { +func (x *LsSrBindingSIDFlags) GetAllocated() bool { if x != nil { - return x.Link + return x.Allocated } - return nil + return false } -func (x *LsAttribute) GetPrefix() *LsAttributePrefix { +func (x *LsSrBindingSIDFlags) GetUnavailable() bool { if x != nil { - return x.Prefix + return x.Unavailable } - return nil + return false } -func (x *LsAttribute) GetBgpPeerSegment() *LsAttributeBgpPeerSegment { +func (x *LsSrBindingSIDFlags) GetFromSrlb() bool { if x != nil { - return x.BgpPeerSegment + return x.FromSrlb } - return nil + return false } -func (x *LsAttribute) GetSrv6Sid() *LsAttributeSrv6SID { +func (x *LsSrBindingSIDFlags) GetFallback() bool { if x != nil { - return x.Srv6Sid + return x.Fallback } - return nil + return false } -type UnknownAttribute struct { - state protoimpl.MessageState `protogen:"open.v1"` - Flags uint32 `protobuf:"varint,1,opt,name=flags,proto3" json:"flags,omitempty"` - Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` - Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` +type LsSrBindingSID struct { + state protoimpl.MessageState `protogen:"open.v1"` + Flags *LsSrBindingSIDFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + // Label and specified_label are used when flags.srv6 is false. + Label uint32 `protobuf:"varint,2,opt,name=label,proto3" json:"label,omitempty"` + SpecifiedLabel uint32 `protobuf:"varint,3,opt,name=specified_label,json=specifiedLabel,proto3" json:"specified_label,omitempty"` + // Sid and specified_sid are used when flags.srv6 is true. + Sid string `protobuf:"bytes,4,opt,name=sid,proto3" json:"sid,omitempty"` + SpecifiedSid string `protobuf:"bytes,5,opt,name=specified_sid,json=specifiedSid,proto3" json:"specified_sid,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *UnknownAttribute) Reset() { - *x = UnknownAttribute{} +func (x *LsSrBindingSID) Reset() { + *x = LsSrBindingSID{} mi := &file_api_attribute_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *UnknownAttribute) String() string { +func (x *LsSrBindingSID) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UnknownAttribute) ProtoMessage() {} +func (*LsSrBindingSID) ProtoMessage() {} -func (x *UnknownAttribute) ProtoReflect() protoreflect.Message { +func (x *LsSrBindingSID) ProtoReflect() protoreflect.Message { mi := &file_api_attribute_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4710,59 +4797,70 @@ func (x *UnknownAttribute) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UnknownAttribute.ProtoReflect.Descriptor instead. -func (*UnknownAttribute) Descriptor() ([]byte, []int) { +// Deprecated: Use LsSrBindingSID.ProtoReflect.Descriptor instead. +func (*LsSrBindingSID) Descriptor() ([]byte, []int) { return file_api_attribute_proto_rawDescGZIP(), []int{67} } -func (x *UnknownAttribute) GetFlags() uint32 { +func (x *LsSrBindingSID) GetFlags() *LsSrBindingSIDFlags { if x != nil { return x.Flags } + return nil +} + +func (x *LsSrBindingSID) GetLabel() uint32 { + if x != nil { + return x.Label + } return 0 } -func (x *UnknownAttribute) GetType() uint32 { +func (x *LsSrBindingSID) GetSpecifiedLabel() uint32 { if x != nil { - return x.Type + return x.SpecifiedLabel } return 0 } -func (x *UnknownAttribute) GetValue() []byte { +func (x *LsSrBindingSID) GetSid() string { if x != nil { - return x.Value + return x.Sid } - return nil + return "" } -// https://www.rfc-editor.org/rfc/rfc9252.html#section-3.2.1 -type SRv6StructureSubSubTLV struct { - state protoimpl.MessageState `protogen:"open.v1"` - LocatorBlockLength uint32 `protobuf:"varint,1,opt,name=locator_block_length,json=locatorBlockLength,proto3" json:"locator_block_length,omitempty"` - LocatorNodeLength uint32 `protobuf:"varint,2,opt,name=locator_node_length,json=locatorNodeLength,proto3" json:"locator_node_length,omitempty"` - FunctionLength uint32 `protobuf:"varint,3,opt,name=function_length,json=functionLength,proto3" json:"function_length,omitempty"` - ArgumentLength uint32 `protobuf:"varint,4,opt,name=argument_length,json=argumentLength,proto3" json:"argument_length,omitempty"` - TranspositionLength uint32 `protobuf:"varint,5,opt,name=transposition_length,json=transpositionLength,proto3" json:"transposition_length,omitempty"` - TranspositionOffset uint32 `protobuf:"varint,6,opt,name=transposition_offset,json=transpositionOffset,proto3" json:"transposition_offset,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *LsSrBindingSID) GetSpecifiedSid() string { + if x != nil { + return x.SpecifiedSid + } + return "" } -func (x *SRv6StructureSubSubTLV) Reset() { - *x = SRv6StructureSubSubTLV{} +// SRv6 Binding SID TLV (RFC 9857 Section 5.2). +type LsSrv6BindingSIDFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + Allocated bool `protobuf:"varint,1,opt,name=allocated,proto3" json:"allocated,omitempty"` + Unavailable bool `protobuf:"varint,2,opt,name=unavailable,proto3" json:"unavailable,omitempty"` + Fallback bool `protobuf:"varint,3,opt,name=fallback,proto3" json:"fallback,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrv6BindingSIDFlags) Reset() { + *x = LsSrv6BindingSIDFlags{} mi := &file_api_attribute_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SRv6StructureSubSubTLV) String() string { +func (x *LsSrv6BindingSIDFlags) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SRv6StructureSubSubTLV) ProtoMessage() {} +func (*LsSrv6BindingSIDFlags) ProtoMessage() {} -func (x *SRv6StructureSubSubTLV) ProtoReflect() protoreflect.Message { +func (x *LsSrv6BindingSIDFlags) ProtoReflect() protoreflect.Message { mi := &file_api_attribute_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4774,77 +4872,57 @@ func (x *SRv6StructureSubSubTLV) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SRv6StructureSubSubTLV.ProtoReflect.Descriptor instead. -func (*SRv6StructureSubSubTLV) Descriptor() ([]byte, []int) { +// Deprecated: Use LsSrv6BindingSIDFlags.ProtoReflect.Descriptor instead. +func (*LsSrv6BindingSIDFlags) Descriptor() ([]byte, []int) { return file_api_attribute_proto_rawDescGZIP(), []int{68} } -func (x *SRv6StructureSubSubTLV) GetLocatorBlockLength() uint32 { - if x != nil { - return x.LocatorBlockLength - } - return 0 -} - -func (x *SRv6StructureSubSubTLV) GetLocatorNodeLength() uint32 { - if x != nil { - return x.LocatorNodeLength - } - return 0 -} - -func (x *SRv6StructureSubSubTLV) GetFunctionLength() uint32 { +func (x *LsSrv6BindingSIDFlags) GetAllocated() bool { if x != nil { - return x.FunctionLength - } - return 0 -} - -func (x *SRv6StructureSubSubTLV) GetArgumentLength() uint32 { - if x != nil { - return x.ArgumentLength + return x.Allocated } - return 0 + return false } -func (x *SRv6StructureSubSubTLV) GetTranspositionLength() uint32 { +func (x *LsSrv6BindingSIDFlags) GetUnavailable() bool { if x != nil { - return x.TranspositionLength + return x.Unavailable } - return 0 + return false } -func (x *SRv6StructureSubSubTLV) GetTranspositionOffset() uint32 { +func (x *LsSrv6BindingSIDFlags) GetFallback() bool { if x != nil { - return x.TranspositionOffset + return x.Fallback } - return 0 + return false } -type SRv6SubSubTLV struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Tlv: - // - // *SRv6SubSubTLV_Structure - Tlv isSRv6SubSubTLV_Tlv `protobuf_oneof:"tlv"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +type LsSrv6BindingSID struct { + state protoimpl.MessageState `protogen:"open.v1"` + Flags *LsSrv6BindingSIDFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + Sid string `protobuf:"bytes,2,opt,name=sid,proto3" json:"sid,omitempty"` + SpecifiedSid string `protobuf:"bytes,3,opt,name=specified_sid,json=specifiedSid,proto3" json:"specified_sid,omitempty"` + EndpointBehavior *LsSrv6EndpointBehavior `protobuf:"bytes,4,opt,name=endpoint_behavior,json=endpointBehavior,proto3" json:"endpoint_behavior,omitempty"` + SidStructure *LsSrv6SIDStructure `protobuf:"bytes,5,opt,name=sid_structure,json=sidStructure,proto3" json:"sid_structure,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *SRv6SubSubTLV) Reset() { - *x = SRv6SubSubTLV{} +func (x *LsSrv6BindingSID) Reset() { + *x = LsSrv6BindingSID{} mi := &file_api_attribute_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SRv6SubSubTLV) String() string { +func (x *LsSrv6BindingSID) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SRv6SubSubTLV) ProtoMessage() {} +func (*LsSrv6BindingSID) ProtoMessage() {} -func (x *SRv6SubSubTLV) ProtoReflect() protoreflect.Message { +func (x *LsSrv6BindingSID) ProtoReflect() protoreflect.Message { mi := &file_api_attribute_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4856,58 +4934,78 @@ func (x *SRv6SubSubTLV) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SRv6SubSubTLV.ProtoReflect.Descriptor instead. -func (*SRv6SubSubTLV) Descriptor() ([]byte, []int) { +// Deprecated: Use LsSrv6BindingSID.ProtoReflect.Descriptor instead. +func (*LsSrv6BindingSID) Descriptor() ([]byte, []int) { return file_api_attribute_proto_rawDescGZIP(), []int{69} } -func (x *SRv6SubSubTLV) GetTlv() isSRv6SubSubTLV_Tlv { +func (x *LsSrv6BindingSID) GetFlags() *LsSrv6BindingSIDFlags { if x != nil { - return x.Tlv + return x.Flags } return nil } -func (x *SRv6SubSubTLV) GetStructure() *SRv6StructureSubSubTLV { +func (x *LsSrv6BindingSID) GetSid() string { if x != nil { - if x, ok := x.Tlv.(*SRv6SubSubTLV_Structure); ok { - return x.Structure - } + return x.Sid } - return nil + return "" } -type isSRv6SubSubTLV_Tlv interface { - isSRv6SubSubTLV_Tlv() +func (x *LsSrv6BindingSID) GetSpecifiedSid() string { + if x != nil { + return x.SpecifiedSid + } + return "" } -type SRv6SubSubTLV_Structure struct { - Structure *SRv6StructureSubSubTLV `protobuf:"bytes,1,opt,name=structure,proto3,oneof"` +func (x *LsSrv6BindingSID) GetEndpointBehavior() *LsSrv6EndpointBehavior { + if x != nil { + return x.EndpointBehavior + } + return nil } -func (*SRv6SubSubTLV_Structure) isSRv6SubSubTLV_Tlv() {} - -type SRv6SubSubTLVs struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tlvs []*SRv6SubSubTLV `protobuf:"bytes,1,rep,name=tlvs,proto3" json:"tlvs,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *LsSrv6BindingSID) GetSidStructure() *LsSrv6SIDStructure { + if x != nil { + return x.SidStructure + } + return nil } -func (x *SRv6SubSubTLVs) Reset() { - *x = SRv6SubSubTLVs{} +// SR Candidate Path State TLV (RFC 9857 Section 5.3). +type LsSrCandidatePathStateFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + Shutdown bool `protobuf:"varint,1,opt,name=shutdown,proto3" json:"shutdown,omitempty"` + Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` + Backup bool `protobuf:"varint,3,opt,name=backup,proto3" json:"backup,omitempty"` + Evaluated bool `protobuf:"varint,4,opt,name=evaluated,proto3" json:"evaluated,omitempty"` + ValidSidList bool `protobuf:"varint,5,opt,name=valid_sid_list,json=validSidList,proto3" json:"valid_sid_list,omitempty"` + OnDemand bool `protobuf:"varint,6,opt,name=on_demand,json=onDemand,proto3" json:"on_demand,omitempty"` + Delegated bool `protobuf:"varint,7,opt,name=delegated,proto3" json:"delegated,omitempty"` + Provisioned bool `protobuf:"varint,8,opt,name=provisioned,proto3" json:"provisioned,omitempty"` + DropUponInvalid bool `protobuf:"varint,9,opt,name=drop_upon_invalid,json=dropUponInvalid,proto3" json:"drop_upon_invalid,omitempty"` + TransitEligible bool `protobuf:"varint,10,opt,name=transit_eligible,json=transitEligible,proto3" json:"transit_eligible,omitempty"` + Dropping bool `protobuf:"varint,11,opt,name=dropping,proto3" json:"dropping,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrCandidatePathStateFlags) Reset() { + *x = LsSrCandidatePathStateFlags{} mi := &file_api_attribute_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SRv6SubSubTLVs) String() string { +func (x *LsSrCandidatePathStateFlags) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SRv6SubSubTLVs) ProtoMessage() {} +func (*LsSrCandidatePathStateFlags) ProtoMessage() {} -func (x *SRv6SubSubTLVs) ProtoReflect() protoreflect.Message { +func (x *LsSrCandidatePathStateFlags) ProtoReflect() protoreflect.Message { mi := &file_api_attribute_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4919,59 +5017,2086 @@ func (x *SRv6SubSubTLVs) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SRv6SubSubTLVs.ProtoReflect.Descriptor instead. -func (*SRv6SubSubTLVs) Descriptor() ([]byte, []int) { +// Deprecated: Use LsSrCandidatePathStateFlags.ProtoReflect.Descriptor instead. +func (*LsSrCandidatePathStateFlags) Descriptor() ([]byte, []int) { return file_api_attribute_proto_rawDescGZIP(), []int{70} } -func (x *SRv6SubSubTLVs) GetTlvs() []*SRv6SubSubTLV { +func (x *LsSrCandidatePathStateFlags) GetShutdown() bool { if x != nil { - return x.Tlvs + return x.Shutdown } - return nil + return false } -type SRv6SIDFlags struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Placeholder for future sid flags - Flag_1 bool `protobuf:"varint,1,opt,name=flag_1,json=flag1,proto3" json:"flag_1,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +func (x *LsSrCandidatePathStateFlags) GetActive() bool { + if x != nil { + return x.Active + } + return false } -func (x *SRv6SIDFlags) Reset() { - *x = SRv6SIDFlags{} - mi := &file_api_attribute_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *LsSrCandidatePathStateFlags) GetBackup() bool { + if x != nil { + return x.Backup + } + return false } -func (x *SRv6SIDFlags) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *LsSrCandidatePathStateFlags) GetEvaluated() bool { + if x != nil { + return x.Evaluated + } + return false } -func (*SRv6SIDFlags) ProtoMessage() {} - -func (x *SRv6SIDFlags) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[71] +func (x *LsSrCandidatePathStateFlags) GetValidSidList() bool { if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms + return x.ValidSidList } - return mi.MessageOf(x) + return false } -// Deprecated: Use SRv6SIDFlags.ProtoReflect.Descriptor instead. -func (*SRv6SIDFlags) Descriptor() ([]byte, []int) { - return file_api_attribute_proto_rawDescGZIP(), []int{71} +func (x *LsSrCandidatePathStateFlags) GetOnDemand() bool { + if x != nil { + return x.OnDemand + } + return false } -func (x *SRv6SIDFlags) GetFlag_1() bool { +func (x *LsSrCandidatePathStateFlags) GetDelegated() bool { if x != nil { - return x.Flag_1 + return x.Delegated + } + return false +} + +func (x *LsSrCandidatePathStateFlags) GetProvisioned() bool { + if x != nil { + return x.Provisioned + } + return false +} + +func (x *LsSrCandidatePathStateFlags) GetDropUponInvalid() bool { + if x != nil { + return x.DropUponInvalid + } + return false +} + +func (x *LsSrCandidatePathStateFlags) GetTransitEligible() bool { + if x != nil { + return x.TransitEligible + } + return false +} + +func (x *LsSrCandidatePathStateFlags) GetDropping() bool { + if x != nil { + return x.Dropping + } + return false +} + +type LsSrCandidatePathState struct { + state protoimpl.MessageState `protogen:"open.v1"` + Priority uint32 `protobuf:"varint,1,opt,name=priority,proto3" json:"priority,omitempty"` + Flags *LsSrCandidatePathStateFlags `protobuf:"bytes,2,opt,name=flags,proto3" json:"flags,omitempty"` + Preference uint32 `protobuf:"varint,3,opt,name=preference,proto3" json:"preference,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrCandidatePathState) Reset() { + *x = LsSrCandidatePathState{} + mi := &file_api_attribute_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrCandidatePathState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrCandidatePathState) ProtoMessage() {} + +func (x *LsSrCandidatePathState) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[71] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrCandidatePathState.ProtoReflect.Descriptor instead. +func (*LsSrCandidatePathState) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{71} +} + +func (x *LsSrCandidatePathState) GetPriority() uint32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *LsSrCandidatePathState) GetFlags() *LsSrCandidatePathStateFlags { + if x != nil { + return x.Flags + } + return nil +} + +func (x *LsSrCandidatePathState) GetPreference() uint32 { + if x != nil { + return x.Preference + } + return 0 +} + +type LsSrSegmentFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + SidPresent bool `protobuf:"varint,1,opt,name=sid_present,json=sidPresent,proto3" json:"sid_present,omitempty"` + Explicit bool `protobuf:"varint,2,opt,name=explicit,proto3" json:"explicit,omitempty"` + Verified bool `protobuf:"varint,3,opt,name=verified,proto3" json:"verified,omitempty"` + Resolved bool `protobuf:"varint,4,opt,name=resolved,proto3" json:"resolved,omitempty"` + AlgorithmValid bool `protobuf:"varint,5,opt,name=algorithm_valid,json=algorithmValid,proto3" json:"algorithm_valid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrSegmentFlags) Reset() { + *x = LsSrSegmentFlags{} + mi := &file_api_attribute_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrSegmentFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrSegmentFlags) ProtoMessage() {} + +func (x *LsSrSegmentFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[72] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrSegmentFlags.ProtoReflect.Descriptor instead. +func (*LsSrSegmentFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{72} +} + +func (x *LsSrSegmentFlags) GetSidPresent() bool { + if x != nil { + return x.SidPresent + } + return false +} + +func (x *LsSrSegmentFlags) GetExplicit() bool { + if x != nil { + return x.Explicit + } + return false +} + +func (x *LsSrSegmentFlags) GetVerified() bool { + if x != nil { + return x.Verified + } + return false +} + +func (x *LsSrSegmentFlags) GetResolved() bool { + if x != nil { + return x.Resolved + } + return false +} + +func (x *LsSrSegmentFlags) GetAlgorithmValid() bool { + if x != nil { + return x.AlgorithmValid + } + return false +} + +// SR Segment sub-TLV (RFC 9857 Section 5.7.1). Which fields are meaningful +// depends on the segment type: +// - label: SR-MPLS types (A, C, D, E, F, G, H); sid: SRv6 types (B, I, J, K) +// - algorithm: A, B, C, D, I +// - local_address: node address for C, D, E, I; local address for F, G, H, J, K +// - remote_address: F, G, H, J, K +// - local_interface_id: E, G, J; remote_interface_id: G, J +type LsSrSegment struct { + state protoimpl.MessageState `protogen:"open.v1"` + SegmentType LsSrSegmentType `protobuf:"varint,1,opt,name=segment_type,json=segmentType,proto3,enum=api.LsSrSegmentType" json:"segment_type,omitempty"` + Flags *LsSrSegmentFlags `protobuf:"bytes,2,opt,name=flags,proto3" json:"flags,omitempty"` + Label uint32 `protobuf:"varint,3,opt,name=label,proto3" json:"label,omitempty"` + Sid string `protobuf:"bytes,4,opt,name=sid,proto3" json:"sid,omitempty"` + Algorithm uint32 `protobuf:"varint,5,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + LocalAddress string `protobuf:"bytes,6,opt,name=local_address,json=localAddress,proto3" json:"local_address,omitempty"` + RemoteAddress string `protobuf:"bytes,7,opt,name=remote_address,json=remoteAddress,proto3" json:"remote_address,omitempty"` + LocalInterfaceId uint32 `protobuf:"varint,8,opt,name=local_interface_id,json=localInterfaceId,proto3" json:"local_interface_id,omitempty"` + RemoteInterfaceId uint32 `protobuf:"varint,9,opt,name=remote_interface_id,json=remoteInterfaceId,proto3" json:"remote_interface_id,omitempty"` + EndpointBehavior *LsSrv6EndpointBehavior `protobuf:"bytes,10,opt,name=endpoint_behavior,json=endpointBehavior,proto3" json:"endpoint_behavior,omitempty"` + SidStructure *LsSrv6SIDStructure `protobuf:"bytes,11,opt,name=sid_structure,json=sidStructure,proto3" json:"sid_structure,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrSegment) Reset() { + *x = LsSrSegment{} + mi := &file_api_attribute_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrSegment) ProtoMessage() {} + +func (x *LsSrSegment) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[73] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrSegment.ProtoReflect.Descriptor instead. +func (*LsSrSegment) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{73} +} + +func (x *LsSrSegment) GetSegmentType() LsSrSegmentType { + if x != nil { + return x.SegmentType + } + return LsSrSegmentType_LS_SR_SEGMENT_TYPE_UNSPECIFIED +} + +func (x *LsSrSegment) GetFlags() *LsSrSegmentFlags { + if x != nil { + return x.Flags + } + return nil +} + +func (x *LsSrSegment) GetLabel() uint32 { + if x != nil { + return x.Label + } + return 0 +} + +func (x *LsSrSegment) GetSid() string { + if x != nil { + return x.Sid + } + return "" +} + +func (x *LsSrSegment) GetAlgorithm() uint32 { + if x != nil { + return x.Algorithm + } + return 0 +} + +func (x *LsSrSegment) GetLocalAddress() string { + if x != nil { + return x.LocalAddress + } + return "" +} + +func (x *LsSrSegment) GetRemoteAddress() string { + if x != nil { + return x.RemoteAddress + } + return "" +} + +func (x *LsSrSegment) GetLocalInterfaceId() uint32 { + if x != nil { + return x.LocalInterfaceId + } + return 0 +} + +func (x *LsSrSegment) GetRemoteInterfaceId() uint32 { + if x != nil { + return x.RemoteInterfaceId + } + return 0 +} + +func (x *LsSrSegment) GetEndpointBehavior() *LsSrv6EndpointBehavior { + if x != nil { + return x.EndpointBehavior + } + return nil +} + +func (x *LsSrSegment) GetSidStructure() *LsSrv6SIDStructure { + if x != nil { + return x.SidStructure + } + return nil +} + +type LsSrSegmentListFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + Srv6 bool `protobuf:"varint,1,opt,name=srv6,proto3" json:"srv6,omitempty"` + Explicit bool `protobuf:"varint,2,opt,name=explicit,proto3" json:"explicit,omitempty"` + Computed bool `protobuf:"varint,3,opt,name=computed,proto3" json:"computed,omitempty"` + Verified bool `protobuf:"varint,4,opt,name=verified,proto3" json:"verified,omitempty"` + Resolved bool `protobuf:"varint,5,opt,name=resolved,proto3" json:"resolved,omitempty"` + Failed bool `protobuf:"varint,6,opt,name=failed,proto3" json:"failed,omitempty"` + AllAlgorithm bool `protobuf:"varint,7,opt,name=all_algorithm,json=allAlgorithm,proto3" json:"all_algorithm,omitempty"` + AllTopology bool `protobuf:"varint,8,opt,name=all_topology,json=allTopology,proto3" json:"all_topology,omitempty"` + RemovedByFault bool `protobuf:"varint,9,opt,name=removed_by_fault,json=removedByFault,proto3" json:"removed_by_fault,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrSegmentListFlags) Reset() { + *x = LsSrSegmentListFlags{} + mi := &file_api_attribute_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrSegmentListFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrSegmentListFlags) ProtoMessage() {} + +func (x *LsSrSegmentListFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[74] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrSegmentListFlags.ProtoReflect.Descriptor instead. +func (*LsSrSegmentListFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{74} +} + +func (x *LsSrSegmentListFlags) GetSrv6() bool { + if x != nil { + return x.Srv6 + } + return false +} + +func (x *LsSrSegmentListFlags) GetExplicit() bool { + if x != nil { + return x.Explicit + } + return false +} + +func (x *LsSrSegmentListFlags) GetComputed() bool { + if x != nil { + return x.Computed + } + return false +} + +func (x *LsSrSegmentListFlags) GetVerified() bool { + if x != nil { + return x.Verified + } + return false +} + +func (x *LsSrSegmentListFlags) GetResolved() bool { + if x != nil { + return x.Resolved + } + return false +} + +func (x *LsSrSegmentListFlags) GetFailed() bool { + if x != nil { + return x.Failed + } + return false +} + +func (x *LsSrSegmentListFlags) GetAllAlgorithm() bool { + if x != nil { + return x.AllAlgorithm + } + return false +} + +func (x *LsSrSegmentListFlags) GetAllTopology() bool { + if x != nil { + return x.AllTopology + } + return false +} + +func (x *LsSrSegmentListFlags) GetRemovedByFault() bool { + if x != nil { + return x.RemovedByFault + } + return false +} + +type LsSrSegmentListMetricFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + Margin bool `protobuf:"varint,1,opt,name=margin,proto3" json:"margin,omitempty"` + Absolute bool `protobuf:"varint,2,opt,name=absolute,proto3" json:"absolute,omitempty"` + Bound bool `protobuf:"varint,3,opt,name=bound,proto3" json:"bound,omitempty"` + Value bool `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrSegmentListMetricFlags) Reset() { + *x = LsSrSegmentListMetricFlags{} + mi := &file_api_attribute_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrSegmentListMetricFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrSegmentListMetricFlags) ProtoMessage() {} + +func (x *LsSrSegmentListMetricFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[75] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrSegmentListMetricFlags.ProtoReflect.Descriptor instead. +func (*LsSrSegmentListMetricFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{75} +} + +func (x *LsSrSegmentListMetricFlags) GetMargin() bool { + if x != nil { + return x.Margin + } + return false +} + +func (x *LsSrSegmentListMetricFlags) GetAbsolute() bool { + if x != nil { + return x.Absolute + } + return false +} + +func (x *LsSrSegmentListMetricFlags) GetBound() bool { + if x != nil { + return x.Bound + } + return false +} + +func (x *LsSrSegmentListMetricFlags) GetValue() bool { + if x != nil { + return x.Value + } + return false +} + +// SR Segment List Metric sub-TLV (RFC 9857 Section 5.7.2). +type LsSrSegmentListMetric struct { + state protoimpl.MessageState `protogen:"open.v1"` + MetricType uint32 `protobuf:"varint,1,opt,name=metric_type,json=metricType,proto3" json:"metric_type,omitempty"` + Flags *LsSrSegmentListMetricFlags `protobuf:"bytes,2,opt,name=flags,proto3" json:"flags,omitempty"` + Margin uint32 `protobuf:"varint,3,opt,name=margin,proto3" json:"margin,omitempty"` + Bound uint32 `protobuf:"varint,4,opt,name=bound,proto3" json:"bound,omitempty"` + Value uint32 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrSegmentListMetric) Reset() { + *x = LsSrSegmentListMetric{} + mi := &file_api_attribute_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrSegmentListMetric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrSegmentListMetric) ProtoMessage() {} + +func (x *LsSrSegmentListMetric) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[76] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrSegmentListMetric.ProtoReflect.Descriptor instead. +func (*LsSrSegmentListMetric) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{76} +} + +func (x *LsSrSegmentListMetric) GetMetricType() uint32 { + if x != nil { + return x.MetricType + } + return 0 +} + +func (x *LsSrSegmentListMetric) GetFlags() *LsSrSegmentListMetricFlags { + if x != nil { + return x.Flags + } + return nil +} + +func (x *LsSrSegmentListMetric) GetMargin() uint32 { + if x != nil { + return x.Margin + } + return 0 +} + +func (x *LsSrSegmentListMetric) GetBound() uint32 { + if x != nil { + return x.Bound + } + return 0 +} + +func (x *LsSrSegmentListMetric) GetValue() uint32 { + if x != nil { + return x.Value + } + return 0 +} + +// SR Segment List Bandwidth sub-TLV (RFC 9857 Section 5.7.3), bytes per second. +type LsSrSegmentListBandwidth struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bandwidth float32 `protobuf:"fixed32,1,opt,name=bandwidth,proto3" json:"bandwidth,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrSegmentListBandwidth) Reset() { + *x = LsSrSegmentListBandwidth{} + mi := &file_api_attribute_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrSegmentListBandwidth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrSegmentListBandwidth) ProtoMessage() {} + +func (x *LsSrSegmentListBandwidth) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[77] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrSegmentListBandwidth.ProtoReflect.Descriptor instead. +func (*LsSrSegmentListBandwidth) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{77} +} + +func (x *LsSrSegmentListBandwidth) GetBandwidth() float32 { + if x != nil { + return x.Bandwidth + } + return 0 +} + +// SR Segment List Identifier sub-TLV (RFC 9857 Section 5.7.4). +type LsSrSegmentListIdentifier struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identifier uint32 `protobuf:"varint,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrSegmentListIdentifier) Reset() { + *x = LsSrSegmentListIdentifier{} + mi := &file_api_attribute_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrSegmentListIdentifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrSegmentListIdentifier) ProtoMessage() {} + +func (x *LsSrSegmentListIdentifier) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[78] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrSegmentListIdentifier.ProtoReflect.Descriptor instead. +func (*LsSrSegmentListIdentifier) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{78} +} + +func (x *LsSrSegmentListIdentifier) GetIdentifier() uint32 { + if x != nil { + return x.Identifier + } + return 0 +} + +// SR Segment List TLV (RFC 9857 Section 5.7). +type LsSrSegmentList struct { + state protoimpl.MessageState `protogen:"open.v1"` + Flags *LsSrSegmentListFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + Mtid uint32 `protobuf:"varint,2,opt,name=mtid,proto3" json:"mtid,omitempty"` + Algorithm uint32 `protobuf:"varint,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + Weight uint32 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"` + Segments []*LsSrSegment `protobuf:"bytes,5,rep,name=segments,proto3" json:"segments,omitempty"` + Metrics []*LsSrSegmentListMetric `protobuf:"bytes,6,rep,name=metrics,proto3" json:"metrics,omitempty"` + Bandwidth *LsSrSegmentListBandwidth `protobuf:"bytes,7,opt,name=bandwidth,proto3" json:"bandwidth,omitempty"` + Identifier *LsSrSegmentListIdentifier `protobuf:"bytes,8,opt,name=identifier,proto3" json:"identifier,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrSegmentList) Reset() { + *x = LsSrSegmentList{} + mi := &file_api_attribute_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrSegmentList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrSegmentList) ProtoMessage() {} + +func (x *LsSrSegmentList) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[79] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrSegmentList.ProtoReflect.Descriptor instead. +func (*LsSrSegmentList) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{79} +} + +func (x *LsSrSegmentList) GetFlags() *LsSrSegmentListFlags { + if x != nil { + return x.Flags + } + return nil +} + +func (x *LsSrSegmentList) GetMtid() uint32 { + if x != nil { + return x.Mtid + } + return 0 +} + +func (x *LsSrSegmentList) GetAlgorithm() uint32 { + if x != nil { + return x.Algorithm + } + return 0 +} + +func (x *LsSrSegmentList) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *LsSrSegmentList) GetSegments() []*LsSrSegment { + if x != nil { + return x.Segments + } + return nil +} + +func (x *LsSrSegmentList) GetMetrics() []*LsSrSegmentListMetric { + if x != nil { + return x.Metrics + } + return nil +} + +func (x *LsSrSegmentList) GetBandwidth() *LsSrSegmentListBandwidth { + if x != nil { + return x.Bandwidth + } + return nil +} + +func (x *LsSrSegmentList) GetIdentifier() *LsSrSegmentListIdentifier { + if x != nil { + return x.Identifier + } + return nil +} + +// Flags of the SR Candidate Path Constraints TLV (RFC 9857 Section 5.6). +type LsSrCandidatePathConstraintsFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + // D-Flag: the candidate path uses an SRv6 data plane. + Srv6 bool `protobuf:"varint,1,opt,name=srv6,proto3" json:"srv6,omitempty"` + // P-Flag: prefer only protected SIDs. + ProtectedOnly bool `protobuf:"varint,2,opt,name=protected_only,json=protectedOnly,proto3" json:"protected_only,omitempty"` + // U-Flag: prefer only unprotected SIDs. + UnprotectedOnly bool `protobuf:"varint,3,opt,name=unprotected_only,json=unprotectedOnly,proto3" json:"unprotected_only,omitempty"` + // A-Flag: use only SIDs of the specified algorithm. + AlgorithmOnly bool `protobuf:"varint,4,opt,name=algorithm_only,json=algorithmOnly,proto3" json:"algorithm_only,omitempty"` + // T-Flag: use only SIDs of the specified topology. + TopologyOnly bool `protobuf:"varint,5,opt,name=topology_only,json=topologyOnly,proto3" json:"topology_only,omitempty"` + // S-Flag: P or U is a strict constraint rather than a preference. + Strict bool `protobuf:"varint,6,opt,name=strict,proto3" json:"strict,omitempty"` + // F-Flag: the path is fixed once computed. + Fixed bool `protobuf:"varint,7,opt,name=fixed,proto3" json:"fixed,omitempty"` + // H-Flag: the path uses only hop-by-hop adjacency SIDs. + HopByHop bool `protobuf:"varint,8,opt,name=hop_by_hop,json=hopByHop,proto3" json:"hop_by_hop,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrCandidatePathConstraintsFlags) Reset() { + *x = LsSrCandidatePathConstraintsFlags{} + mi := &file_api_attribute_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrCandidatePathConstraintsFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrCandidatePathConstraintsFlags) ProtoMessage() {} + +func (x *LsSrCandidatePathConstraintsFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[80] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrCandidatePathConstraintsFlags.ProtoReflect.Descriptor instead. +func (*LsSrCandidatePathConstraintsFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{80} +} + +func (x *LsSrCandidatePathConstraintsFlags) GetSrv6() bool { + if x != nil { + return x.Srv6 + } + return false +} + +func (x *LsSrCandidatePathConstraintsFlags) GetProtectedOnly() bool { + if x != nil { + return x.ProtectedOnly + } + return false +} + +func (x *LsSrCandidatePathConstraintsFlags) GetUnprotectedOnly() bool { + if x != nil { + return x.UnprotectedOnly + } + return false +} + +func (x *LsSrCandidatePathConstraintsFlags) GetAlgorithmOnly() bool { + if x != nil { + return x.AlgorithmOnly + } + return false +} + +func (x *LsSrCandidatePathConstraintsFlags) GetTopologyOnly() bool { + if x != nil { + return x.TopologyOnly + } + return false +} + +func (x *LsSrCandidatePathConstraintsFlags) GetStrict() bool { + if x != nil { + return x.Strict + } + return false +} + +func (x *LsSrCandidatePathConstraintsFlags) GetFixed() bool { + if x != nil { + return x.Fixed + } + return false +} + +func (x *LsSrCandidatePathConstraintsFlags) GetHopByHop() bool { + if x != nil { + return x.HopByHop + } + return false +} + +// SR Affinity Constraint sub-TLV (RFC 9857 Section 5.6.1). Each Extended +// Administrative Group is a list of 32-bit words, the first word holding +// bits 0 to 31. +type LsSrAffinityConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + ExcludeAny []uint32 `protobuf:"varint,1,rep,packed,name=exclude_any,json=excludeAny,proto3" json:"exclude_any,omitempty"` + IncludeAny []uint32 `protobuf:"varint,2,rep,packed,name=include_any,json=includeAny,proto3" json:"include_any,omitempty"` + IncludeAll []uint32 `protobuf:"varint,3,rep,packed,name=include_all,json=includeAll,proto3" json:"include_all,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrAffinityConstraint) Reset() { + *x = LsSrAffinityConstraint{} + mi := &file_api_attribute_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrAffinityConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrAffinityConstraint) ProtoMessage() {} + +func (x *LsSrAffinityConstraint) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[81] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrAffinityConstraint.ProtoReflect.Descriptor instead. +func (*LsSrAffinityConstraint) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{81} +} + +func (x *LsSrAffinityConstraint) GetExcludeAny() []uint32 { + if x != nil { + return x.ExcludeAny + } + return nil +} + +func (x *LsSrAffinityConstraint) GetIncludeAny() []uint32 { + if x != nil { + return x.IncludeAny + } + return nil +} + +func (x *LsSrAffinityConstraint) GetIncludeAll() []uint32 { + if x != nil { + return x.IncludeAll + } + return nil +} + +// SR Bandwidth Constraint sub-TLV (RFC 9857 Section 5.6.3), bytes per second. +type LsSrBandwidthConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bandwidth float32 `protobuf:"fixed32,1,opt,name=bandwidth,proto3" json:"bandwidth,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrBandwidthConstraint) Reset() { + *x = LsSrBandwidthConstraint{} + mi := &file_api_attribute_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrBandwidthConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrBandwidthConstraint) ProtoMessage() {} + +func (x *LsSrBandwidthConstraint) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[82] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrBandwidthConstraint.ProtoReflect.Descriptor instead. +func (*LsSrBandwidthConstraint) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{82} +} + +func (x *LsSrBandwidthConstraint) GetBandwidth() float32 { + if x != nil { + return x.Bandwidth + } + return 0 +} + +type LsSrDisjointGroupRequestFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + Srlg bool `protobuf:"varint,1,opt,name=srlg,proto3" json:"srlg,omitempty"` + Node bool `protobuf:"varint,2,opt,name=node,proto3" json:"node,omitempty"` + Link bool `protobuf:"varint,3,opt,name=link,proto3" json:"link,omitempty"` + Fallback bool `protobuf:"varint,4,opt,name=fallback,proto3" json:"fallback,omitempty"` + BestPathFallback bool `protobuf:"varint,5,opt,name=best_path_fallback,json=bestPathFallback,proto3" json:"best_path_fallback,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrDisjointGroupRequestFlags) Reset() { + *x = LsSrDisjointGroupRequestFlags{} + mi := &file_api_attribute_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrDisjointGroupRequestFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrDisjointGroupRequestFlags) ProtoMessage() {} + +func (x *LsSrDisjointGroupRequestFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[83] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrDisjointGroupRequestFlags.ProtoReflect.Descriptor instead. +func (*LsSrDisjointGroupRequestFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{83} +} + +func (x *LsSrDisjointGroupRequestFlags) GetSrlg() bool { + if x != nil { + return x.Srlg + } + return false +} + +func (x *LsSrDisjointGroupRequestFlags) GetNode() bool { + if x != nil { + return x.Node + } + return false +} + +func (x *LsSrDisjointGroupRequestFlags) GetLink() bool { + if x != nil { + return x.Link + } + return false +} + +func (x *LsSrDisjointGroupRequestFlags) GetFallback() bool { + if x != nil { + return x.Fallback + } + return false +} + +func (x *LsSrDisjointGroupRequestFlags) GetBestPathFallback() bool { + if x != nil { + return x.BestPathFallback + } + return false +} + +type LsSrDisjointGroupStatusFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + Srlg bool `protobuf:"varint,1,opt,name=srlg,proto3" json:"srlg,omitempty"` + Node bool `protobuf:"varint,2,opt,name=node,proto3" json:"node,omitempty"` + Link bool `protobuf:"varint,3,opt,name=link,proto3" json:"link,omitempty"` + Fallback bool `protobuf:"varint,4,opt,name=fallback,proto3" json:"fallback,omitempty"` + BestPathFallback bool `protobuf:"varint,5,opt,name=best_path_fallback,json=bestPathFallback,proto3" json:"best_path_fallback,omitempty"` + Invalidated bool `protobuf:"varint,6,opt,name=invalidated,proto3" json:"invalidated,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrDisjointGroupStatusFlags) Reset() { + *x = LsSrDisjointGroupStatusFlags{} + mi := &file_api_attribute_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrDisjointGroupStatusFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrDisjointGroupStatusFlags) ProtoMessage() {} + +func (x *LsSrDisjointGroupStatusFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[84] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrDisjointGroupStatusFlags.ProtoReflect.Descriptor instead. +func (*LsSrDisjointGroupStatusFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{84} +} + +func (x *LsSrDisjointGroupStatusFlags) GetSrlg() bool { + if x != nil { + return x.Srlg + } + return false +} + +func (x *LsSrDisjointGroupStatusFlags) GetNode() bool { + if x != nil { + return x.Node + } + return false +} + +func (x *LsSrDisjointGroupStatusFlags) GetLink() bool { + if x != nil { + return x.Link + } + return false +} + +func (x *LsSrDisjointGroupStatusFlags) GetFallback() bool { + if x != nil { + return x.Fallback + } + return false +} + +func (x *LsSrDisjointGroupStatusFlags) GetBestPathFallback() bool { + if x != nil { + return x.BestPathFallback + } + return false +} + +func (x *LsSrDisjointGroupStatusFlags) GetInvalidated() bool { + if x != nil { + return x.Invalidated + } + return false +} + +// SR Disjoint Group Constraint sub-TLV (RFC 9857 Section 5.6.4). The group +// is identified by group_id, or by pcep_association when the producer +// encoded a whole PCEP ASSOCIATION Object instead of a 4-octet identifier. +type LsSrDisjointGroupConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestFlags *LsSrDisjointGroupRequestFlags `protobuf:"bytes,1,opt,name=request_flags,json=requestFlags,proto3" json:"request_flags,omitempty"` + StatusFlags *LsSrDisjointGroupStatusFlags `protobuf:"bytes,2,opt,name=status_flags,json=statusFlags,proto3" json:"status_flags,omitempty"` + GroupId uint32 `protobuf:"varint,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + PcepAssociation []byte `protobuf:"bytes,4,opt,name=pcep_association,json=pcepAssociation,proto3" json:"pcep_association,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrDisjointGroupConstraint) Reset() { + *x = LsSrDisjointGroupConstraint{} + mi := &file_api_attribute_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrDisjointGroupConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrDisjointGroupConstraint) ProtoMessage() {} + +func (x *LsSrDisjointGroupConstraint) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[85] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrDisjointGroupConstraint.ProtoReflect.Descriptor instead. +func (*LsSrDisjointGroupConstraint) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{85} +} + +func (x *LsSrDisjointGroupConstraint) GetRequestFlags() *LsSrDisjointGroupRequestFlags { + if x != nil { + return x.RequestFlags + } + return nil +} + +func (x *LsSrDisjointGroupConstraint) GetStatusFlags() *LsSrDisjointGroupStatusFlags { + if x != nil { + return x.StatusFlags + } + return nil +} + +func (x *LsSrDisjointGroupConstraint) GetGroupId() uint32 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *LsSrDisjointGroupConstraint) GetPcepAssociation() []byte { + if x != nil { + return x.PcepAssociation + } + return nil +} + +type LsSrBidirectionalGroupFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + // R-Flag: the candidate path forms the reverse path. + Reverse bool `protobuf:"varint,1,opt,name=reverse,proto3" json:"reverse,omitempty"` + // C-Flag: the bidirectional path is co-routed. + CoRouted bool `protobuf:"varint,2,opt,name=co_routed,json=coRouted,proto3" json:"co_routed,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrBidirectionalGroupFlags) Reset() { + *x = LsSrBidirectionalGroupFlags{} + mi := &file_api_attribute_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrBidirectionalGroupFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrBidirectionalGroupFlags) ProtoMessage() {} + +func (x *LsSrBidirectionalGroupFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[86] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrBidirectionalGroupFlags.ProtoReflect.Descriptor instead. +func (*LsSrBidirectionalGroupFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{86} +} + +func (x *LsSrBidirectionalGroupFlags) GetReverse() bool { + if x != nil { + return x.Reverse + } + return false +} + +func (x *LsSrBidirectionalGroupFlags) GetCoRouted() bool { + if x != nil { + return x.CoRouted + } + return false +} + +// SR Bidirectional Group Constraint sub-TLV (RFC 9857 Section 5.6.5). +type LsSrBidirectionalGroupConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + Flags *LsSrBidirectionalGroupFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + GroupId uint32 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + PcepAssociation []byte `protobuf:"bytes,3,opt,name=pcep_association,json=pcepAssociation,proto3" json:"pcep_association,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrBidirectionalGroupConstraint) Reset() { + *x = LsSrBidirectionalGroupConstraint{} + mi := &file_api_attribute_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrBidirectionalGroupConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrBidirectionalGroupConstraint) ProtoMessage() {} + +func (x *LsSrBidirectionalGroupConstraint) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[87] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrBidirectionalGroupConstraint.ProtoReflect.Descriptor instead. +func (*LsSrBidirectionalGroupConstraint) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{87} +} + +func (x *LsSrBidirectionalGroupConstraint) GetFlags() *LsSrBidirectionalGroupFlags { + if x != nil { + return x.Flags + } + return nil +} + +func (x *LsSrBidirectionalGroupConstraint) GetGroupId() uint32 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *LsSrBidirectionalGroupConstraint) GetPcepAssociation() []byte { + if x != nil { + return x.PcepAssociation + } + return nil +} + +type LsSrMetricConstraintFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + // O-Flag: this is the optimization metric of a dynamic path. + Optimization bool `protobuf:"varint,1,opt,name=optimization,proto3" json:"optimization,omitempty"` + // M-Flag: margin is specified. + Margin bool `protobuf:"varint,2,opt,name=margin,proto3" json:"margin,omitempty"` + // A-Flag: the margin is an absolute value rather than a percentage. + Absolute bool `protobuf:"varint,3,opt,name=absolute,proto3" json:"absolute,omitempty"` + // B-Flag: bound is specified. + Bound bool `protobuf:"varint,4,opt,name=bound,proto3" json:"bound,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrMetricConstraintFlags) Reset() { + *x = LsSrMetricConstraintFlags{} + mi := &file_api_attribute_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrMetricConstraintFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrMetricConstraintFlags) ProtoMessage() {} + +func (x *LsSrMetricConstraintFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[88] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrMetricConstraintFlags.ProtoReflect.Descriptor instead. +func (*LsSrMetricConstraintFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{88} +} + +func (x *LsSrMetricConstraintFlags) GetOptimization() bool { + if x != nil { + return x.Optimization + } + return false +} + +func (x *LsSrMetricConstraintFlags) GetMargin() bool { + if x != nil { + return x.Margin + } + return false +} + +func (x *LsSrMetricConstraintFlags) GetAbsolute() bool { + if x != nil { + return x.Absolute + } + return false +} + +func (x *LsSrMetricConstraintFlags) GetBound() bool { + if x != nil { + return x.Bound + } + return false +} + +// SR Metric Constraint sub-TLV (RFC 9857 Section 5.6.6). +type LsSrMetricConstraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + MetricType uint32 `protobuf:"varint,1,opt,name=metric_type,json=metricType,proto3" json:"metric_type,omitempty"` + Flags *LsSrMetricConstraintFlags `protobuf:"bytes,2,opt,name=flags,proto3" json:"flags,omitempty"` + Margin uint32 `protobuf:"varint,3,opt,name=margin,proto3" json:"margin,omitempty"` + Bound uint32 `protobuf:"varint,4,opt,name=bound,proto3" json:"bound,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrMetricConstraint) Reset() { + *x = LsSrMetricConstraint{} + mi := &file_api_attribute_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrMetricConstraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrMetricConstraint) ProtoMessage() {} + +func (x *LsSrMetricConstraint) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[89] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrMetricConstraint.ProtoReflect.Descriptor instead. +func (*LsSrMetricConstraint) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{89} +} + +func (x *LsSrMetricConstraint) GetMetricType() uint32 { + if x != nil { + return x.MetricType + } + return 0 +} + +func (x *LsSrMetricConstraint) GetFlags() *LsSrMetricConstraintFlags { + if x != nil { + return x.Flags + } + return nil +} + +func (x *LsSrMetricConstraint) GetMargin() uint32 { + if x != nil { + return x.Margin + } + return 0 +} + +func (x *LsSrMetricConstraint) GetBound() uint32 { + if x != nil { + return x.Bound + } + return 0 +} + +// SR Candidate Path Constraints TLV (RFC 9857 Section 5.6). +type LsSrCandidatePathConstraints struct { + state protoimpl.MessageState `protogen:"open.v1"` + Flags *LsSrCandidatePathConstraintsFlags `protobuf:"bytes,1,opt,name=flags,proto3" json:"flags,omitempty"` + Mtid uint32 `protobuf:"varint,2,opt,name=mtid,proto3" json:"mtid,omitempty"` + Algorithm uint32 `protobuf:"varint,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + Affinity *LsSrAffinityConstraint `protobuf:"bytes,4,opt,name=affinity,proto3" json:"affinity,omitempty"` + // SR SRLG Constraint sub-TLV (RFC 9857 Section 5.6.2). + Srlgs []uint32 `protobuf:"varint,5,rep,packed,name=srlgs,proto3" json:"srlgs,omitempty"` + Bandwidth *LsSrBandwidthConstraint `protobuf:"bytes,6,opt,name=bandwidth,proto3" json:"bandwidth,omitempty"` + DisjointGroup *LsSrDisjointGroupConstraint `protobuf:"bytes,7,opt,name=disjoint_group,json=disjointGroup,proto3" json:"disjoint_group,omitempty"` + BidirectionalGroup *LsSrBidirectionalGroupConstraint `protobuf:"bytes,8,opt,name=bidirectional_group,json=bidirectionalGroup,proto3" json:"bidirectional_group,omitempty"` + Metrics []*LsSrMetricConstraint `protobuf:"bytes,9,rep,name=metrics,proto3" json:"metrics,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrCandidatePathConstraints) Reset() { + *x = LsSrCandidatePathConstraints{} + mi := &file_api_attribute_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrCandidatePathConstraints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrCandidatePathConstraints) ProtoMessage() {} + +func (x *LsSrCandidatePathConstraints) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[90] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrCandidatePathConstraints.ProtoReflect.Descriptor instead. +func (*LsSrCandidatePathConstraints) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{90} +} + +func (x *LsSrCandidatePathConstraints) GetFlags() *LsSrCandidatePathConstraintsFlags { + if x != nil { + return x.Flags + } + return nil +} + +func (x *LsSrCandidatePathConstraints) GetMtid() uint32 { + if x != nil { + return x.Mtid + } + return 0 +} + +func (x *LsSrCandidatePathConstraints) GetAlgorithm() uint32 { + if x != nil { + return x.Algorithm + } + return 0 +} + +func (x *LsSrCandidatePathConstraints) GetAffinity() *LsSrAffinityConstraint { + if x != nil { + return x.Affinity + } + return nil +} + +func (x *LsSrCandidatePathConstraints) GetSrlgs() []uint32 { + if x != nil { + return x.Srlgs + } + return nil +} + +func (x *LsSrCandidatePathConstraints) GetBandwidth() *LsSrBandwidthConstraint { + if x != nil { + return x.Bandwidth + } + return nil +} + +func (x *LsSrCandidatePathConstraints) GetDisjointGroup() *LsSrDisjointGroupConstraint { + if x != nil { + return x.DisjointGroup + } + return nil +} + +func (x *LsSrCandidatePathConstraints) GetBidirectionalGroup() *LsSrBidirectionalGroupConstraint { + if x != nil { + return x.BidirectionalGroup + } + return nil +} + +func (x *LsSrCandidatePathConstraints) GetMetrics() []*LsSrMetricConstraint { + if x != nil { + return x.Metrics + } + return nil +} + +// BGP-LS attribute TLVs of an SR Policy Candidate Path NLRI (RFC 9857 Section 5). +type LsAttributeSrPolicy struct { + state protoimpl.MessageState `protogen:"open.v1"` + BindingSid *LsSrBindingSID `protobuf:"bytes,1,opt,name=binding_sid,json=bindingSid,proto3" json:"binding_sid,omitempty"` + Srv6BindingSids []*LsSrv6BindingSID `protobuf:"bytes,2,rep,name=srv6_binding_sids,json=srv6BindingSids,proto3" json:"srv6_binding_sids,omitempty"` + State *LsSrCandidatePathState `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + CandidatePathName string `protobuf:"bytes,4,opt,name=candidate_path_name,json=candidatePathName,proto3" json:"candidate_path_name,omitempty"` + PolicyName string `protobuf:"bytes,5,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` + SegmentLists []*LsSrSegmentList `protobuf:"bytes,6,rep,name=segment_lists,json=segmentLists,proto3" json:"segment_lists,omitempty"` + Constraints *LsSrCandidatePathConstraints `protobuf:"bytes,7,opt,name=constraints,proto3" json:"constraints,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsAttributeSrPolicy) Reset() { + *x = LsAttributeSrPolicy{} + mi := &file_api_attribute_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsAttributeSrPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsAttributeSrPolicy) ProtoMessage() {} + +func (x *LsAttributeSrPolicy) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[91] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsAttributeSrPolicy.ProtoReflect.Descriptor instead. +func (*LsAttributeSrPolicy) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{91} +} + +func (x *LsAttributeSrPolicy) GetBindingSid() *LsSrBindingSID { + if x != nil { + return x.BindingSid + } + return nil +} + +func (x *LsAttributeSrPolicy) GetSrv6BindingSids() []*LsSrv6BindingSID { + if x != nil { + return x.Srv6BindingSids + } + return nil +} + +func (x *LsAttributeSrPolicy) GetState() *LsSrCandidatePathState { + if x != nil { + return x.State + } + return nil +} + +func (x *LsAttributeSrPolicy) GetCandidatePathName() string { + if x != nil { + return x.CandidatePathName + } + return "" +} + +func (x *LsAttributeSrPolicy) GetPolicyName() string { + if x != nil { + return x.PolicyName + } + return "" +} + +func (x *LsAttributeSrPolicy) GetSegmentLists() []*LsSrSegmentList { + if x != nil { + return x.SegmentLists + } + return nil +} + +func (x *LsAttributeSrPolicy) GetConstraints() *LsSrCandidatePathConstraints { + if x != nil { + return x.Constraints + } + return nil +} + +type LsAttribute struct { + state protoimpl.MessageState `protogen:"open.v1"` + Node *LsAttributeNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + Link *LsAttributeLink `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` + Prefix *LsAttributePrefix `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` + BgpPeerSegment *LsAttributeBgpPeerSegment `protobuf:"bytes,4,opt,name=bgp_peer_segment,json=bgpPeerSegment,proto3" json:"bgp_peer_segment,omitempty"` + Srv6Sid *LsAttributeSrv6SID `protobuf:"bytes,5,opt,name=srv6_sid,json=srv6Sid,proto3" json:"srv6_sid,omitempty"` + SrPolicy *LsAttributeSrPolicy `protobuf:"bytes,6,opt,name=sr_policy,json=srPolicy,proto3" json:"sr_policy,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsAttribute) Reset() { + *x = LsAttribute{} + mi := &file_api_attribute_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsAttribute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsAttribute) ProtoMessage() {} + +func (x *LsAttribute) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[92] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsAttribute.ProtoReflect.Descriptor instead. +func (*LsAttribute) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{92} +} + +func (x *LsAttribute) GetNode() *LsAttributeNode { + if x != nil { + return x.Node + } + return nil +} + +func (x *LsAttribute) GetLink() *LsAttributeLink { + if x != nil { + return x.Link + } + return nil +} + +func (x *LsAttribute) GetPrefix() *LsAttributePrefix { + if x != nil { + return x.Prefix + } + return nil +} + +func (x *LsAttribute) GetBgpPeerSegment() *LsAttributeBgpPeerSegment { + if x != nil { + return x.BgpPeerSegment + } + return nil +} + +func (x *LsAttribute) GetSrv6Sid() *LsAttributeSrv6SID { + if x != nil { + return x.Srv6Sid + } + return nil +} + +func (x *LsAttribute) GetSrPolicy() *LsAttributeSrPolicy { + if x != nil { + return x.SrPolicy + } + return nil +} + +type UnknownAttribute struct { + state protoimpl.MessageState `protogen:"open.v1"` + Flags uint32 `protobuf:"varint,1,opt,name=flags,proto3" json:"flags,omitempty"` + Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnknownAttribute) Reset() { + *x = UnknownAttribute{} + mi := &file_api_attribute_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnknownAttribute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnknownAttribute) ProtoMessage() {} + +func (x *UnknownAttribute) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[93] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnknownAttribute.ProtoReflect.Descriptor instead. +func (*UnknownAttribute) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{93} +} + +func (x *UnknownAttribute) GetFlags() uint32 { + if x != nil { + return x.Flags + } + return 0 +} + +func (x *UnknownAttribute) GetType() uint32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *UnknownAttribute) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +// https://www.rfc-editor.org/rfc/rfc9252.html#section-3.2.1 +type SRv6StructureSubSubTLV struct { + state protoimpl.MessageState `protogen:"open.v1"` + LocatorBlockLength uint32 `protobuf:"varint,1,opt,name=locator_block_length,json=locatorBlockLength,proto3" json:"locator_block_length,omitempty"` + LocatorNodeLength uint32 `protobuf:"varint,2,opt,name=locator_node_length,json=locatorNodeLength,proto3" json:"locator_node_length,omitempty"` + FunctionLength uint32 `protobuf:"varint,3,opt,name=function_length,json=functionLength,proto3" json:"function_length,omitempty"` + ArgumentLength uint32 `protobuf:"varint,4,opt,name=argument_length,json=argumentLength,proto3" json:"argument_length,omitempty"` + TranspositionLength uint32 `protobuf:"varint,5,opt,name=transposition_length,json=transpositionLength,proto3" json:"transposition_length,omitempty"` + TranspositionOffset uint32 `protobuf:"varint,6,opt,name=transposition_offset,json=transpositionOffset,proto3" json:"transposition_offset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SRv6StructureSubSubTLV) Reset() { + *x = SRv6StructureSubSubTLV{} + mi := &file_api_attribute_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SRv6StructureSubSubTLV) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SRv6StructureSubSubTLV) ProtoMessage() {} + +func (x *SRv6StructureSubSubTLV) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[94] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SRv6StructureSubSubTLV.ProtoReflect.Descriptor instead. +func (*SRv6StructureSubSubTLV) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{94} +} + +func (x *SRv6StructureSubSubTLV) GetLocatorBlockLength() uint32 { + if x != nil { + return x.LocatorBlockLength + } + return 0 +} + +func (x *SRv6StructureSubSubTLV) GetLocatorNodeLength() uint32 { + if x != nil { + return x.LocatorNodeLength + } + return 0 +} + +func (x *SRv6StructureSubSubTLV) GetFunctionLength() uint32 { + if x != nil { + return x.FunctionLength + } + return 0 +} + +func (x *SRv6StructureSubSubTLV) GetArgumentLength() uint32 { + if x != nil { + return x.ArgumentLength + } + return 0 +} + +func (x *SRv6StructureSubSubTLV) GetTranspositionLength() uint32 { + if x != nil { + return x.TranspositionLength + } + return 0 +} + +func (x *SRv6StructureSubSubTLV) GetTranspositionOffset() uint32 { + if x != nil { + return x.TranspositionOffset + } + return 0 +} + +type SRv6SubSubTLV struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Tlv: + // + // *SRv6SubSubTLV_Structure + Tlv isSRv6SubSubTLV_Tlv `protobuf_oneof:"tlv"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SRv6SubSubTLV) Reset() { + *x = SRv6SubSubTLV{} + mi := &file_api_attribute_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SRv6SubSubTLV) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SRv6SubSubTLV) ProtoMessage() {} + +func (x *SRv6SubSubTLV) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[95] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SRv6SubSubTLV.ProtoReflect.Descriptor instead. +func (*SRv6SubSubTLV) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{95} +} + +func (x *SRv6SubSubTLV) GetTlv() isSRv6SubSubTLV_Tlv { + if x != nil { + return x.Tlv + } + return nil +} + +func (x *SRv6SubSubTLV) GetStructure() *SRv6StructureSubSubTLV { + if x != nil { + if x, ok := x.Tlv.(*SRv6SubSubTLV_Structure); ok { + return x.Structure + } + } + return nil +} + +type isSRv6SubSubTLV_Tlv interface { + isSRv6SubSubTLV_Tlv() +} + +type SRv6SubSubTLV_Structure struct { + Structure *SRv6StructureSubSubTLV `protobuf:"bytes,1,opt,name=structure,proto3,oneof"` +} + +func (*SRv6SubSubTLV_Structure) isSRv6SubSubTLV_Tlv() {} + +type SRv6SubSubTLVs struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tlvs []*SRv6SubSubTLV `protobuf:"bytes,1,rep,name=tlvs,proto3" json:"tlvs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SRv6SubSubTLVs) Reset() { + *x = SRv6SubSubTLVs{} + mi := &file_api_attribute_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SRv6SubSubTLVs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SRv6SubSubTLVs) ProtoMessage() {} + +func (x *SRv6SubSubTLVs) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[96] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SRv6SubSubTLVs.ProtoReflect.Descriptor instead. +func (*SRv6SubSubTLVs) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{96} +} + +func (x *SRv6SubSubTLVs) GetTlvs() []*SRv6SubSubTLV { + if x != nil { + return x.Tlvs + } + return nil +} + +type SRv6SIDFlags struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Placeholder for future sid flags + Flag_1 bool `protobuf:"varint,1,opt,name=flag_1,json=flag1,proto3" json:"flag_1,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SRv6SIDFlags) Reset() { + *x = SRv6SIDFlags{} + mi := &file_api_attribute_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SRv6SIDFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SRv6SIDFlags) ProtoMessage() {} + +func (x *SRv6SIDFlags) ProtoReflect() protoreflect.Message { + mi := &file_api_attribute_proto_msgTypes[97] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SRv6SIDFlags.ProtoReflect.Descriptor instead. +func (*SRv6SIDFlags) Descriptor() ([]byte, []int) { + return file_api_attribute_proto_rawDescGZIP(), []int{97} +} + +func (x *SRv6SIDFlags) GetFlag_1() bool { + if x != nil { + return x.Flag_1 } return false } @@ -4989,7 +7114,7 @@ type SRv6InformationSubTLV struct { func (x *SRv6InformationSubTLV) Reset() { *x = SRv6InformationSubTLV{} - mi := &file_api_attribute_proto_msgTypes[72] + mi := &file_api_attribute_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5001,7 +7126,7 @@ func (x *SRv6InformationSubTLV) String() string { func (*SRv6InformationSubTLV) ProtoMessage() {} func (x *SRv6InformationSubTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[72] + mi := &file_api_attribute_proto_msgTypes[98] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5014,7 +7139,7 @@ func (x *SRv6InformationSubTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use SRv6InformationSubTLV.ProtoReflect.Descriptor instead. func (*SRv6InformationSubTLV) Descriptor() ([]byte, []int) { - return file_api_attribute_proto_rawDescGZIP(), []int{72} + return file_api_attribute_proto_rawDescGZIP(), []int{98} } func (x *SRv6InformationSubTLV) GetSid() []byte { @@ -5057,7 +7182,7 @@ type SRv6SubTLV struct { func (x *SRv6SubTLV) Reset() { *x = SRv6SubTLV{} - mi := &file_api_attribute_proto_msgTypes[73] + mi := &file_api_attribute_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5069,7 +7194,7 @@ func (x *SRv6SubTLV) String() string { func (*SRv6SubTLV) ProtoMessage() {} func (x *SRv6SubTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[73] + mi := &file_api_attribute_proto_msgTypes[99] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5082,7 +7207,7 @@ func (x *SRv6SubTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use SRv6SubTLV.ProtoReflect.Descriptor instead. func (*SRv6SubTLV) Descriptor() ([]byte, []int) { - return file_api_attribute_proto_rawDescGZIP(), []int{73} + return file_api_attribute_proto_rawDescGZIP(), []int{99} } func (x *SRv6SubTLV) GetTlv() isSRv6SubTLV_Tlv { @@ -5120,7 +7245,7 @@ type SRv6SubTLVs struct { func (x *SRv6SubTLVs) Reset() { *x = SRv6SubTLVs{} - mi := &file_api_attribute_proto_msgTypes[74] + mi := &file_api_attribute_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5132,7 +7257,7 @@ func (x *SRv6SubTLVs) String() string { func (*SRv6SubTLVs) ProtoMessage() {} func (x *SRv6SubTLVs) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[74] + mi := &file_api_attribute_proto_msgTypes[100] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5145,7 +7270,7 @@ func (x *SRv6SubTLVs) ProtoReflect() protoreflect.Message { // Deprecated: Use SRv6SubTLVs.ProtoReflect.Descriptor instead. func (*SRv6SubTLVs) Descriptor() ([]byte, []int) { - return file_api_attribute_proto_rawDescGZIP(), []int{74} + return file_api_attribute_proto_rawDescGZIP(), []int{100} } func (x *SRv6SubTLVs) GetTlvs() []*SRv6SubTLV { @@ -5165,7 +7290,7 @@ type SRv6L3ServiceTLV struct { func (x *SRv6L3ServiceTLV) Reset() { *x = SRv6L3ServiceTLV{} - mi := &file_api_attribute_proto_msgTypes[75] + mi := &file_api_attribute_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5177,7 +7302,7 @@ func (x *SRv6L3ServiceTLV) String() string { func (*SRv6L3ServiceTLV) ProtoMessage() {} func (x *SRv6L3ServiceTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[75] + mi := &file_api_attribute_proto_msgTypes[101] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5190,7 +7315,7 @@ func (x *SRv6L3ServiceTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use SRv6L3ServiceTLV.ProtoReflect.Descriptor instead. func (*SRv6L3ServiceTLV) Descriptor() ([]byte, []int) { - return file_api_attribute_proto_rawDescGZIP(), []int{75} + return file_api_attribute_proto_rawDescGZIP(), []int{101} } func (x *SRv6L3ServiceTLV) GetSubTlvs() map[uint32]*SRv6SubTLVs { @@ -5210,7 +7335,7 @@ type SRv6L2ServiceTLV struct { func (x *SRv6L2ServiceTLV) Reset() { *x = SRv6L2ServiceTLV{} - mi := &file_api_attribute_proto_msgTypes[76] + mi := &file_api_attribute_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5222,7 +7347,7 @@ func (x *SRv6L2ServiceTLV) String() string { func (*SRv6L2ServiceTLV) ProtoMessage() {} func (x *SRv6L2ServiceTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[76] + mi := &file_api_attribute_proto_msgTypes[102] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5235,7 +7360,7 @@ func (x *SRv6L2ServiceTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use SRv6L2ServiceTLV.ProtoReflect.Descriptor instead. func (*SRv6L2ServiceTLV) Descriptor() ([]byte, []int) { - return file_api_attribute_proto_rawDescGZIP(), []int{76} + return file_api_attribute_proto_rawDescGZIP(), []int{102} } func (x *SRv6L2ServiceTLV) GetSubTlvs() map[uint32]*SRv6SubTLVs { @@ -5255,7 +7380,7 @@ type PrefixSID struct { func (x *PrefixSID) Reset() { *x = PrefixSID{} - mi := &file_api_attribute_proto_msgTypes[77] + mi := &file_api_attribute_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5267,7 +7392,7 @@ func (x *PrefixSID) String() string { func (*PrefixSID) ProtoMessage() {} func (x *PrefixSID) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[77] + mi := &file_api_attribute_proto_msgTypes[103] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5280,7 +7405,7 @@ func (x *PrefixSID) ProtoReflect() protoreflect.Message { // Deprecated: Use PrefixSID.ProtoReflect.Descriptor instead. func (*PrefixSID) Descriptor() ([]byte, []int) { - return file_api_attribute_proto_rawDescGZIP(), []int{77} + return file_api_attribute_proto_rawDescGZIP(), []int{103} } func (x *PrefixSID) GetTlvs() []*PrefixSID_TLV { @@ -5303,7 +7428,7 @@ type TunnelEncapSubTLVSRSegmentList_Segment struct { func (x *TunnelEncapSubTLVSRSegmentList_Segment) Reset() { *x = TunnelEncapSubTLVSRSegmentList_Segment{} - mi := &file_api_attribute_proto_msgTypes[78] + mi := &file_api_attribute_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5315,7 +7440,7 @@ func (x *TunnelEncapSubTLVSRSegmentList_Segment) String() string { func (*TunnelEncapSubTLVSRSegmentList_Segment) ProtoMessage() {} func (x *TunnelEncapSubTLVSRSegmentList_Segment) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[78] + mi := &file_api_attribute_proto_msgTypes[104] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5395,7 +7520,7 @@ type TunnelEncapTLV_TLV struct { func (x *TunnelEncapTLV_TLV) Reset() { *x = TunnelEncapTLV_TLV{} - mi := &file_api_attribute_proto_msgTypes[79] + mi := &file_api_attribute_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5407,7 +7532,7 @@ func (x *TunnelEncapTLV_TLV) String() string { func (*TunnelEncapTLV_TLV) ProtoMessage() {} func (x *TunnelEncapTLV_TLV) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[79] + mi := &file_api_attribute_proto_msgTypes[105] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5628,7 +7753,7 @@ type IP6ExtendedCommunitiesAttribute_Community struct { func (x *IP6ExtendedCommunitiesAttribute_Community) Reset() { *x = IP6ExtendedCommunitiesAttribute_Community{} - mi := &file_api_attribute_proto_msgTypes[80] + mi := &file_api_attribute_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5640,7 +7765,7 @@ func (x *IP6ExtendedCommunitiesAttribute_Community) String() string { func (*IP6ExtendedCommunitiesAttribute_Community) ProtoMessage() {} func (x *IP6ExtendedCommunitiesAttribute_Community) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[80] + mi := &file_api_attribute_proto_msgTypes[106] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5728,7 +7853,7 @@ type AigpAttribute_TLV struct { func (x *AigpAttribute_TLV) Reset() { *x = AigpAttribute_TLV{} - mi := &file_api_attribute_proto_msgTypes[81] + mi := &file_api_attribute_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5740,7 +7865,7 @@ func (x *AigpAttribute_TLV) String() string { func (*AigpAttribute_TLV) ProtoMessage() {} func (x *AigpAttribute_TLV) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[81] + mi := &file_api_attribute_proto_msgTypes[107] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5811,7 +7936,7 @@ type PrefixSID_TLV struct { func (x *PrefixSID_TLV) Reset() { *x = PrefixSID_TLV{} - mi := &file_api_attribute_proto_msgTypes[85] + mi := &file_api_attribute_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5823,7 +7948,7 @@ func (x *PrefixSID_TLV) String() string { func (*PrefixSID_TLV) ProtoMessage() {} func (x *PrefixSID_TLV) ProtoReflect() protoreflect.Message { - mi := &file_api_attribute_proto_msgTypes[85] + mi := &file_api_attribute_proto_msgTypes[111] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5836,7 +7961,7 @@ func (x *PrefixSID_TLV) ProtoReflect() protoreflect.Message { // Deprecated: Use PrefixSID_TLV.ProtoReflect.Descriptor instead. func (*PrefixSID_TLV) Descriptor() ([]byte, []int) { - return file_api_attribute_proto_rawDescGZIP(), []int{77, 0} + return file_api_attribute_proto_rawDescGZIP(), []int{103, 0} } func (x *PrefixSID_TLV) GetTlv() isPrefixSID_TLV_Tlv { @@ -6224,13 +8349,189 @@ const file_api_attribute_proto_rawDesc = "" + "\x12LsAttributeSrv6SID\x12E\n" + "\x12srv6_sid_structure\x18\x01 \x01(\v2\x17.api.LsSrv6SIDStructureR\x10srv6SidStructure\x12Q\n" + "\x16srv6_endpoint_behavior\x18\x02 \x01(\v2\x1b.api.LsSrv6EndpointBehaviorR\x14srv6EndpointBehavior\x12M\n" + - "\x16srv6_bgp_peer_node_sid\x18\x03 \x01(\v2\x19.api.LsSrv6BgpPeerNodeSIDR\x12srv6BgpPeerNodeSid\"\x8f\x02\n" + + "\x16srv6_bgp_peer_node_sid\x18\x03 \x01(\v2\x19.api.LsSrv6BgpPeerNodeSIDR\x12srv6BgpPeerNodeSid\"\xa2\x01\n" + + "\x13LsSrBindingSIDFlags\x12\x12\n" + + "\x04srv6\x18\x01 \x01(\bR\x04srv6\x12\x1c\n" + + "\tallocated\x18\x02 \x01(\bR\tallocated\x12 \n" + + "\vunavailable\x18\x03 \x01(\bR\vunavailable\x12\x1b\n" + + "\tfrom_srlb\x18\x04 \x01(\bR\bfromSrlb\x12\x1a\n" + + "\bfallback\x18\x05 \x01(\bR\bfallback\"\xb6\x01\n" + + "\x0eLsSrBindingSID\x12.\n" + + "\x05flags\x18\x01 \x01(\v2\x18.api.LsSrBindingSIDFlagsR\x05flags\x12\x14\n" + + "\x05label\x18\x02 \x01(\rR\x05label\x12'\n" + + "\x0fspecified_label\x18\x03 \x01(\rR\x0especifiedLabel\x12\x10\n" + + "\x03sid\x18\x04 \x01(\tR\x03sid\x12#\n" + + "\rspecified_sid\x18\x05 \x01(\tR\fspecifiedSid\"s\n" + + "\x15LsSrv6BindingSIDFlags\x12\x1c\n" + + "\tallocated\x18\x01 \x01(\bR\tallocated\x12 \n" + + "\vunavailable\x18\x02 \x01(\bR\vunavailable\x12\x1a\n" + + "\bfallback\x18\x03 \x01(\bR\bfallback\"\x83\x02\n" + + "\x10LsSrv6BindingSID\x120\n" + + "\x05flags\x18\x01 \x01(\v2\x1a.api.LsSrv6BindingSIDFlagsR\x05flags\x12\x10\n" + + "\x03sid\x18\x02 \x01(\tR\x03sid\x12#\n" + + "\rspecified_sid\x18\x03 \x01(\tR\fspecifiedSid\x12H\n" + + "\x11endpoint_behavior\x18\x04 \x01(\v2\x1b.api.LsSrv6EndpointBehaviorR\x10endpointBehavior\x12<\n" + + "\rsid_structure\x18\x05 \x01(\v2\x17.api.LsSrv6SIDStructureR\fsidStructure\"\xfd\x02\n" + + "\x1bLsSrCandidatePathStateFlags\x12\x1a\n" + + "\bshutdown\x18\x01 \x01(\bR\bshutdown\x12\x16\n" + + "\x06active\x18\x02 \x01(\bR\x06active\x12\x16\n" + + "\x06backup\x18\x03 \x01(\bR\x06backup\x12\x1c\n" + + "\tevaluated\x18\x04 \x01(\bR\tevaluated\x12$\n" + + "\x0evalid_sid_list\x18\x05 \x01(\bR\fvalidSidList\x12\x1b\n" + + "\ton_demand\x18\x06 \x01(\bR\bonDemand\x12\x1c\n" + + "\tdelegated\x18\a \x01(\bR\tdelegated\x12 \n" + + "\vprovisioned\x18\b \x01(\bR\vprovisioned\x12*\n" + + "\x11drop_upon_invalid\x18\t \x01(\bR\x0fdropUponInvalid\x12)\n" + + "\x10transit_eligible\x18\n" + + " \x01(\bR\x0ftransitEligible\x12\x1a\n" + + "\bdropping\x18\v \x01(\bR\bdropping\"\x8c\x01\n" + + "\x16LsSrCandidatePathState\x12\x1a\n" + + "\bpriority\x18\x01 \x01(\rR\bpriority\x126\n" + + "\x05flags\x18\x02 \x01(\v2 .api.LsSrCandidatePathStateFlagsR\x05flags\x12\x1e\n" + + "\n" + + "preference\x18\x03 \x01(\rR\n" + + "preference\"\xb0\x01\n" + + "\x10LsSrSegmentFlags\x12\x1f\n" + + "\vsid_present\x18\x01 \x01(\bR\n" + + "sidPresent\x12\x1a\n" + + "\bexplicit\x18\x02 \x01(\bR\bexplicit\x12\x1a\n" + + "\bverified\x18\x03 \x01(\bR\bverified\x12\x1a\n" + + "\bresolved\x18\x04 \x01(\bR\bresolved\x12'\n" + + "\x0falgorithm_valid\x18\x05 \x01(\bR\x0ealgorithmValid\"\xeb\x03\n" + + "\vLsSrSegment\x127\n" + + "\fsegment_type\x18\x01 \x01(\x0e2\x14.api.LsSrSegmentTypeR\vsegmentType\x12+\n" + + "\x05flags\x18\x02 \x01(\v2\x15.api.LsSrSegmentFlagsR\x05flags\x12\x14\n" + + "\x05label\x18\x03 \x01(\rR\x05label\x12\x10\n" + + "\x03sid\x18\x04 \x01(\tR\x03sid\x12\x1c\n" + + "\talgorithm\x18\x05 \x01(\rR\talgorithm\x12#\n" + + "\rlocal_address\x18\x06 \x01(\tR\flocalAddress\x12%\n" + + "\x0eremote_address\x18\a \x01(\tR\rremoteAddress\x12,\n" + + "\x12local_interface_id\x18\b \x01(\rR\x10localInterfaceId\x12.\n" + + "\x13remote_interface_id\x18\t \x01(\rR\x11remoteInterfaceId\x12H\n" + + "\x11endpoint_behavior\x18\n" + + " \x01(\v2\x1b.api.LsSrv6EndpointBehaviorR\x10endpointBehavior\x12<\n" + + "\rsid_structure\x18\v \x01(\v2\x17.api.LsSrv6SIDStructureR\fsidStructure\"\xa4\x02\n" + + "\x14LsSrSegmentListFlags\x12\x12\n" + + "\x04srv6\x18\x01 \x01(\bR\x04srv6\x12\x1a\n" + + "\bexplicit\x18\x02 \x01(\bR\bexplicit\x12\x1a\n" + + "\bcomputed\x18\x03 \x01(\bR\bcomputed\x12\x1a\n" + + "\bverified\x18\x04 \x01(\bR\bverified\x12\x1a\n" + + "\bresolved\x18\x05 \x01(\bR\bresolved\x12\x16\n" + + "\x06failed\x18\x06 \x01(\bR\x06failed\x12#\n" + + "\rall_algorithm\x18\a \x01(\bR\fallAlgorithm\x12!\n" + + "\fall_topology\x18\b \x01(\bR\vallTopology\x12(\n" + + "\x10removed_by_fault\x18\t \x01(\bR\x0eremovedByFault\"|\n" + + "\x1aLsSrSegmentListMetricFlags\x12\x16\n" + + "\x06margin\x18\x01 \x01(\bR\x06margin\x12\x1a\n" + + "\babsolute\x18\x02 \x01(\bR\babsolute\x12\x14\n" + + "\x05bound\x18\x03 \x01(\bR\x05bound\x12\x14\n" + + "\x05value\x18\x04 \x01(\bR\x05value\"\xb3\x01\n" + + "\x15LsSrSegmentListMetric\x12\x1f\n" + + "\vmetric_type\x18\x01 \x01(\rR\n" + + "metricType\x125\n" + + "\x05flags\x18\x02 \x01(\v2\x1f.api.LsSrSegmentListMetricFlagsR\x05flags\x12\x16\n" + + "\x06margin\x18\x03 \x01(\rR\x06margin\x12\x14\n" + + "\x05bound\x18\x04 \x01(\rR\x05bound\x12\x14\n" + + "\x05value\x18\x05 \x01(\rR\x05value\"8\n" + + "\x18LsSrSegmentListBandwidth\x12\x1c\n" + + "\tbandwidth\x18\x01 \x01(\x02R\tbandwidth\";\n" + + "\x19LsSrSegmentListIdentifier\x12\x1e\n" + + "\n" + + "identifier\x18\x01 \x01(\rR\n" + + "identifier\"\xed\x02\n" + + "\x0fLsSrSegmentList\x12/\n" + + "\x05flags\x18\x01 \x01(\v2\x19.api.LsSrSegmentListFlagsR\x05flags\x12\x12\n" + + "\x04mtid\x18\x02 \x01(\rR\x04mtid\x12\x1c\n" + + "\talgorithm\x18\x03 \x01(\rR\talgorithm\x12\x16\n" + + "\x06weight\x18\x04 \x01(\rR\x06weight\x12,\n" + + "\bsegments\x18\x05 \x03(\v2\x10.api.LsSrSegmentR\bsegments\x124\n" + + "\ametrics\x18\x06 \x03(\v2\x1a.api.LsSrSegmentListMetricR\ametrics\x12;\n" + + "\tbandwidth\x18\a \x01(\v2\x1d.api.LsSrSegmentListBandwidthR\tbandwidth\x12>\n" + + "\n" + + "identifier\x18\b \x01(\v2\x1e.api.LsSrSegmentListIdentifierR\n" + + "identifier\"\xa1\x02\n" + + "!LsSrCandidatePathConstraintsFlags\x12\x12\n" + + "\x04srv6\x18\x01 \x01(\bR\x04srv6\x12%\n" + + "\x0eprotected_only\x18\x02 \x01(\bR\rprotectedOnly\x12)\n" + + "\x10unprotected_only\x18\x03 \x01(\bR\x0funprotectedOnly\x12%\n" + + "\x0ealgorithm_only\x18\x04 \x01(\bR\ralgorithmOnly\x12#\n" + + "\rtopology_only\x18\x05 \x01(\bR\ftopologyOnly\x12\x16\n" + + "\x06strict\x18\x06 \x01(\bR\x06strict\x12\x14\n" + + "\x05fixed\x18\a \x01(\bR\x05fixed\x12\x1c\n" + + "\n" + + "hop_by_hop\x18\b \x01(\bR\bhopByHop\"{\n" + + "\x16LsSrAffinityConstraint\x12\x1f\n" + + "\vexclude_any\x18\x01 \x03(\rR\n" + + "excludeAny\x12\x1f\n" + + "\vinclude_any\x18\x02 \x03(\rR\n" + + "includeAny\x12\x1f\n" + + "\vinclude_all\x18\x03 \x03(\rR\n" + + "includeAll\"7\n" + + "\x17LsSrBandwidthConstraint\x12\x1c\n" + + "\tbandwidth\x18\x01 \x01(\x02R\tbandwidth\"\xa5\x01\n" + + "\x1dLsSrDisjointGroupRequestFlags\x12\x12\n" + + "\x04srlg\x18\x01 \x01(\bR\x04srlg\x12\x12\n" + + "\x04node\x18\x02 \x01(\bR\x04node\x12\x12\n" + + "\x04link\x18\x03 \x01(\bR\x04link\x12\x1a\n" + + "\bfallback\x18\x04 \x01(\bR\bfallback\x12,\n" + + "\x12best_path_fallback\x18\x05 \x01(\bR\x10bestPathFallback\"\xc6\x01\n" + + "\x1cLsSrDisjointGroupStatusFlags\x12\x12\n" + + "\x04srlg\x18\x01 \x01(\bR\x04srlg\x12\x12\n" + + "\x04node\x18\x02 \x01(\bR\x04node\x12\x12\n" + + "\x04link\x18\x03 \x01(\bR\x04link\x12\x1a\n" + + "\bfallback\x18\x04 \x01(\bR\bfallback\x12,\n" + + "\x12best_path_fallback\x18\x05 \x01(\bR\x10bestPathFallback\x12 \n" + + "\vinvalidated\x18\x06 \x01(\bR\vinvalidated\"\xf2\x01\n" + + "\x1bLsSrDisjointGroupConstraint\x12G\n" + + "\rrequest_flags\x18\x01 \x01(\v2\".api.LsSrDisjointGroupRequestFlagsR\frequestFlags\x12D\n" + + "\fstatus_flags\x18\x02 \x01(\v2!.api.LsSrDisjointGroupStatusFlagsR\vstatusFlags\x12\x19\n" + + "\bgroup_id\x18\x03 \x01(\rR\agroupId\x12)\n" + + "\x10pcep_association\x18\x04 \x01(\fR\x0fpcepAssociation\"T\n" + + "\x1bLsSrBidirectionalGroupFlags\x12\x18\n" + + "\areverse\x18\x01 \x01(\bR\areverse\x12\x1b\n" + + "\tco_routed\x18\x02 \x01(\bR\bcoRouted\"\xa0\x01\n" + + " LsSrBidirectionalGroupConstraint\x126\n" + + "\x05flags\x18\x01 \x01(\v2 .api.LsSrBidirectionalGroupFlagsR\x05flags\x12\x19\n" + + "\bgroup_id\x18\x02 \x01(\rR\agroupId\x12)\n" + + "\x10pcep_association\x18\x03 \x01(\fR\x0fpcepAssociation\"\x89\x01\n" + + "\x19LsSrMetricConstraintFlags\x12\"\n" + + "\foptimization\x18\x01 \x01(\bR\foptimization\x12\x16\n" + + "\x06margin\x18\x02 \x01(\bR\x06margin\x12\x1a\n" + + "\babsolute\x18\x03 \x01(\bR\babsolute\x12\x14\n" + + "\x05bound\x18\x04 \x01(\bR\x05bound\"\x9b\x01\n" + + "\x14LsSrMetricConstraint\x12\x1f\n" + + "\vmetric_type\x18\x01 \x01(\rR\n" + + "metricType\x124\n" + + "\x05flags\x18\x02 \x01(\v2\x1e.api.LsSrMetricConstraintFlagsR\x05flags\x12\x16\n" + + "\x06margin\x18\x03 \x01(\rR\x06margin\x12\x14\n" + + "\x05bound\x18\x04 \x01(\rR\x05bound\"\xef\x03\n" + + "\x1cLsSrCandidatePathConstraints\x12<\n" + + "\x05flags\x18\x01 \x01(\v2&.api.LsSrCandidatePathConstraintsFlagsR\x05flags\x12\x12\n" + + "\x04mtid\x18\x02 \x01(\rR\x04mtid\x12\x1c\n" + + "\talgorithm\x18\x03 \x01(\rR\talgorithm\x127\n" + + "\baffinity\x18\x04 \x01(\v2\x1b.api.LsSrAffinityConstraintR\baffinity\x12\x14\n" + + "\x05srlgs\x18\x05 \x03(\rR\x05srlgs\x12:\n" + + "\tbandwidth\x18\x06 \x01(\v2\x1c.api.LsSrBandwidthConstraintR\tbandwidth\x12G\n" + + "\x0edisjoint_group\x18\a \x01(\v2 .api.LsSrDisjointGroupConstraintR\rdisjointGroup\x12V\n" + + "\x13bidirectional_group\x18\b \x01(\v2%.api.LsSrBidirectionalGroupConstraintR\x12bidirectionalGroup\x123\n" + + "\ametrics\x18\t \x03(\v2\x19.api.LsSrMetricConstraintR\ametrics\"\x92\x03\n" + + "\x13LsAttributeSrPolicy\x124\n" + + "\vbinding_sid\x18\x01 \x01(\v2\x13.api.LsSrBindingSIDR\n" + + "bindingSid\x12A\n" + + "\x11srv6_binding_sids\x18\x02 \x03(\v2\x15.api.LsSrv6BindingSIDR\x0fsrv6BindingSids\x121\n" + + "\x05state\x18\x03 \x01(\v2\x1b.api.LsSrCandidatePathStateR\x05state\x12.\n" + + "\x13candidate_path_name\x18\x04 \x01(\tR\x11candidatePathName\x12\x1f\n" + + "\vpolicy_name\x18\x05 \x01(\tR\n" + + "policyName\x129\n" + + "\rsegment_lists\x18\x06 \x03(\v2\x14.api.LsSrSegmentListR\fsegmentLists\x12C\n" + + "\vconstraints\x18\a \x01(\v2!.api.LsSrCandidatePathConstraintsR\vconstraints\"\xc6\x02\n" + "\vLsAttribute\x12(\n" + "\x04node\x18\x01 \x01(\v2\x14.api.LsAttributeNodeR\x04node\x12(\n" + "\x04link\x18\x02 \x01(\v2\x14.api.LsAttributeLinkR\x04link\x12.\n" + "\x06prefix\x18\x03 \x01(\v2\x16.api.LsAttributePrefixR\x06prefix\x12H\n" + "\x10bgp_peer_segment\x18\x04 \x01(\v2\x1e.api.LsAttributeBgpPeerSegmentR\x0ebgpPeerSegment\x122\n" + - "\bsrv6_sid\x18\x05 \x01(\v2\x17.api.LsAttributeSrv6SIDR\asrv6Sid\"R\n" + + "\bsrv6_sid\x18\x05 \x01(\v2\x17.api.LsAttributeSrv6SIDR\asrv6Sid\x125\n" + + "\tsr_policy\x18\x06 \x01(\v2\x18.api.LsAttributeSrPolicyR\bsrPolicy\"R\n" + "\x10UnknownAttribute\x12\x14\n" + "\x05flags\x18\x01 \x01(\rR\x05flags\x12\x12\n" + "\x04type\x18\x02 \x01(\rR\x04type\x12\x14\n" + @@ -6331,7 +8632,21 @@ const file_api_attribute_proto_rawDesc = "" + "\x0fENLP_TYPE_TYPE1\x10\x01\x12\x13\n" + "\x0fENLP_TYPE_TYPE2\x10\x02\x12\x13\n" + "\x0fENLP_TYPE_TYPE3\x10\x03\x12\x13\n" + - "\x0fENLP_TYPE_TYPE4\x10\x04B\"Z github.com/osrg/gobgp/v4/api;apib\x06proto3" + "\x0fENLP_TYPE_TYPE4\x10\x04*\x8c\x04\n" + + "\x0fLsSrSegmentType\x12\"\n" + + "\x1eLS_SR_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12#\n" + + "\x1fLS_SR_SEGMENT_TYPE_A_MPLS_LABEL\x10\x01\x12!\n" + + "\x1dLS_SR_SEGMENT_TYPE_B_SRV6_SID\x10\x02\x12\"\n" + + "\x1eLS_SR_SEGMENT_TYPE_C_IPV4_NODE\x10\x03\x12'\n" + + "#LS_SR_SEGMENT_TYPE_D_IPV6_NODE_MPLS\x10\x04\x12,\n" + + "(LS_SR_SEGMENT_TYPE_E_IPV4_NODE_INTERFACE\x10\x05\x12'\n" + + "#LS_SR_SEGMENT_TYPE_F_IPV4_ADJACENCY\x10\x06\x121\n" + + "-LS_SR_SEGMENT_TYPE_G_IPV6_NODE_INTERFACE_MPLS\x10\a\x12,\n" + + "(LS_SR_SEGMENT_TYPE_H_IPV6_ADJACENCY_MPLS\x10\b\x12'\n" + + "#LS_SR_SEGMENT_TYPE_I_IPV6_NODE_SRV6\x10\t\x121\n" + + "-LS_SR_SEGMENT_TYPE_J_IPV6_NODE_INTERFACE_SRV6\x10\n" + + "\x12,\n" + + "(LS_SR_SEGMENT_TYPE_K_IPV6_ADJACENCY_SRV6\x10\vB\"Z github.com/osrg/gobgp/v4/api;apib\x06proto3" var ( file_api_attribute_proto_rawDescOnce sync.Once @@ -6345,211 +8660,269 @@ func file_api_attribute_proto_rawDescGZIP() []byte { return file_api_attribute_proto_rawDescData } -var file_api_attribute_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_api_attribute_proto_msgTypes = make([]protoimpl.MessageInfo, 86) +var file_api_attribute_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_api_attribute_proto_msgTypes = make([]protoimpl.MessageInfo, 112) var file_api_attribute_proto_goTypes = []any{ (SRV6Behavior)(0), // 0: api.SRV6Behavior (ENLPType)(0), // 1: api.ENLPType - (AsSegment_Type)(0), // 2: api.AsSegment.Type - (*Attribute)(nil), // 3: api.Attribute - (*OriginAttribute)(nil), // 4: api.OriginAttribute - (*AsSegment)(nil), // 5: api.AsSegment - (*AsPathAttribute)(nil), // 6: api.AsPathAttribute - (*NextHopAttribute)(nil), // 7: api.NextHopAttribute - (*MultiExitDiscAttribute)(nil), // 8: api.MultiExitDiscAttribute - (*LocalPrefAttribute)(nil), // 9: api.LocalPrefAttribute - (*AtomicAggregateAttribute)(nil), // 10: api.AtomicAggregateAttribute - (*AggregatorAttribute)(nil), // 11: api.AggregatorAttribute - (*CommunitiesAttribute)(nil), // 12: api.CommunitiesAttribute - (*OriginatorIdAttribute)(nil), // 13: api.OriginatorIdAttribute - (*ClusterListAttribute)(nil), // 14: api.ClusterListAttribute - (*MpReachNLRIAttribute)(nil), // 15: api.MpReachNLRIAttribute - (*MpUnreachNLRIAttribute)(nil), // 16: api.MpUnreachNLRIAttribute - (*ExtendedCommunitiesAttribute)(nil), // 17: api.ExtendedCommunitiesAttribute - (*As4PathAttribute)(nil), // 18: api.As4PathAttribute - (*As4AggregatorAttribute)(nil), // 19: api.As4AggregatorAttribute - (*PmsiTunnelAttribute)(nil), // 20: api.PmsiTunnelAttribute - (*TunnelEncapSubTLVEncapsulation)(nil), // 21: api.TunnelEncapSubTLVEncapsulation - (*TunnelEncapSubTLVProtocol)(nil), // 22: api.TunnelEncapSubTLVProtocol - (*TunnelEncapSubTLVColor)(nil), // 23: api.TunnelEncapSubTLVColor - (*TunnelEncapSubTLVSRPreference)(nil), // 24: api.TunnelEncapSubTLVSRPreference - (*TunnelEncapSubTLVSRCandidatePathName)(nil), // 25: api.TunnelEncapSubTLVSRCandidatePathName - (*TunnelEncapSubTLVSRPriority)(nil), // 26: api.TunnelEncapSubTLVSRPriority - (*TunnelEncapSubTLVSRBindingSID)(nil), // 27: api.TunnelEncapSubTLVSRBindingSID - (*SRBindingSID)(nil), // 28: api.SRBindingSID - (*SRv6EndPointBehavior)(nil), // 29: api.SRv6EndPointBehavior - (*SRv6BindingSID)(nil), // 30: api.SRv6BindingSID - (*TunnelEncapSubTLVSRENLP)(nil), // 31: api.TunnelEncapSubTLVSRENLP - (*SRWeight)(nil), // 32: api.SRWeight - (*SegmentFlags)(nil), // 33: api.SegmentFlags - (*SegmentTypeA)(nil), // 34: api.SegmentTypeA - (*SegmentTypeB)(nil), // 35: api.SegmentTypeB - (*TunnelEncapSubTLVSRSegmentList)(nil), // 36: api.TunnelEncapSubTLVSRSegmentList - (*TunnelEncapSubTLVEgressEndpoint)(nil), // 37: api.TunnelEncapSubTLVEgressEndpoint - (*TunnelEncapSubTLVUDPDestPort)(nil), // 38: api.TunnelEncapSubTLVUDPDestPort - (*TunnelEncapSubTLVUnknown)(nil), // 39: api.TunnelEncapSubTLVUnknown - (*TunnelEncapTLV)(nil), // 40: api.TunnelEncapTLV - (*TunnelEncapAttribute)(nil), // 41: api.TunnelEncapAttribute - (*IPv6AddressSpecificExtended)(nil), // 42: api.IPv6AddressSpecificExtended - (*RedirectIPv6AddressSpecificExtended)(nil), // 43: api.RedirectIPv6AddressSpecificExtended - (*IP6ExtendedCommunitiesAttribute)(nil), // 44: api.IP6ExtendedCommunitiesAttribute - (*AigpTLVIGPMetric)(nil), // 45: api.AigpTLVIGPMetric - (*AigpTLVUnknown)(nil), // 46: api.AigpTLVUnknown - (*AigpAttribute)(nil), // 47: api.AigpAttribute - (*LargeCommunity)(nil), // 48: api.LargeCommunity - (*LargeCommunitiesAttribute)(nil), // 49: api.LargeCommunitiesAttribute - (*LsNodeFlags)(nil), // 50: api.LsNodeFlags - (*LsIGPFlags)(nil), // 51: api.LsIGPFlags - (*LsSrRange)(nil), // 52: api.LsSrRange - (*LsSrCapabilities)(nil), // 53: api.LsSrCapabilities - (*LsSrLocalBlock)(nil), // 54: api.LsSrLocalBlock - (*LsAttributeNode)(nil), // 55: api.LsAttributeNode - (*LsAttributeFlexAlgoDef)(nil), // 56: api.LsAttributeFlexAlgoDef - (*LsAttributeLink)(nil), // 57: api.LsAttributeLink - (*LsAttributePrefix)(nil), // 58: api.LsAttributePrefix - (*LsAttributePrefixSID)(nil), // 59: api.LsAttributePrefixSID - (*LsAttributeFADPrefixMetric)(nil), // 60: api.LsAttributeFADPrefixMetric - (*LsBgpPeerSegmentSIDFlags)(nil), // 61: api.LsBgpPeerSegmentSIDFlags - (*LsBgpPeerSegmentSID)(nil), // 62: api.LsBgpPeerSegmentSID - (*LsAttributeBgpPeerSegment)(nil), // 63: api.LsAttributeBgpPeerSegment - (*LsSrv6EndXSID)(nil), // 64: api.LsSrv6EndXSID - (*LsSrv6SIDStructure)(nil), // 65: api.LsSrv6SIDStructure - (*LsSrv6EndpointBehavior)(nil), // 66: api.LsSrv6EndpointBehavior - (*LsSrv6BgpPeerNodeSID)(nil), // 67: api.LsSrv6BgpPeerNodeSID - (*LsAttributeSrv6SID)(nil), // 68: api.LsAttributeSrv6SID - (*LsAttribute)(nil), // 69: api.LsAttribute - (*UnknownAttribute)(nil), // 70: api.UnknownAttribute - (*SRv6StructureSubSubTLV)(nil), // 71: api.SRv6StructureSubSubTLV - (*SRv6SubSubTLV)(nil), // 72: api.SRv6SubSubTLV - (*SRv6SubSubTLVs)(nil), // 73: api.SRv6SubSubTLVs - (*SRv6SIDFlags)(nil), // 74: api.SRv6SIDFlags - (*SRv6InformationSubTLV)(nil), // 75: api.SRv6InformationSubTLV - (*SRv6SubTLV)(nil), // 76: api.SRv6SubTLV - (*SRv6SubTLVs)(nil), // 77: api.SRv6SubTLVs - (*SRv6L3ServiceTLV)(nil), // 78: api.SRv6L3ServiceTLV - (*SRv6L2ServiceTLV)(nil), // 79: api.SRv6L2ServiceTLV - (*PrefixSID)(nil), // 80: api.PrefixSID - (*TunnelEncapSubTLVSRSegmentList_Segment)(nil), // 81: api.TunnelEncapSubTLVSRSegmentList.Segment - (*TunnelEncapTLV_TLV)(nil), // 82: api.TunnelEncapTLV.TLV - (*IP6ExtendedCommunitiesAttribute_Community)(nil), // 83: api.IP6ExtendedCommunitiesAttribute.Community - (*AigpAttribute_TLV)(nil), // 84: api.AigpAttribute.TLV - nil, // 85: api.SRv6InformationSubTLV.SubSubTlvsEntry - nil, // 86: api.SRv6L3ServiceTLV.SubTlvsEntry - nil, // 87: api.SRv6L2ServiceTLV.SubTlvsEntry - (*PrefixSID_TLV)(nil), // 88: api.PrefixSID.TLV - (*Family)(nil), // 89: api.Family - (*NLRI)(nil), // 90: api.NLRI - (*ExtendedCommunity)(nil), // 91: api.ExtendedCommunity - (*FlowSpecRedirectToIPv6Extended)(nil), // 92: api.FlowSpecRedirectToIPv6Extended + (LsSrSegmentType)(0), // 2: api.LsSrSegmentType + (AsSegment_Type)(0), // 3: api.AsSegment.Type + (*Attribute)(nil), // 4: api.Attribute + (*OriginAttribute)(nil), // 5: api.OriginAttribute + (*AsSegment)(nil), // 6: api.AsSegment + (*AsPathAttribute)(nil), // 7: api.AsPathAttribute + (*NextHopAttribute)(nil), // 8: api.NextHopAttribute + (*MultiExitDiscAttribute)(nil), // 9: api.MultiExitDiscAttribute + (*LocalPrefAttribute)(nil), // 10: api.LocalPrefAttribute + (*AtomicAggregateAttribute)(nil), // 11: api.AtomicAggregateAttribute + (*AggregatorAttribute)(nil), // 12: api.AggregatorAttribute + (*CommunitiesAttribute)(nil), // 13: api.CommunitiesAttribute + (*OriginatorIdAttribute)(nil), // 14: api.OriginatorIdAttribute + (*ClusterListAttribute)(nil), // 15: api.ClusterListAttribute + (*MpReachNLRIAttribute)(nil), // 16: api.MpReachNLRIAttribute + (*MpUnreachNLRIAttribute)(nil), // 17: api.MpUnreachNLRIAttribute + (*ExtendedCommunitiesAttribute)(nil), // 18: api.ExtendedCommunitiesAttribute + (*As4PathAttribute)(nil), // 19: api.As4PathAttribute + (*As4AggregatorAttribute)(nil), // 20: api.As4AggregatorAttribute + (*PmsiTunnelAttribute)(nil), // 21: api.PmsiTunnelAttribute + (*TunnelEncapSubTLVEncapsulation)(nil), // 22: api.TunnelEncapSubTLVEncapsulation + (*TunnelEncapSubTLVProtocol)(nil), // 23: api.TunnelEncapSubTLVProtocol + (*TunnelEncapSubTLVColor)(nil), // 24: api.TunnelEncapSubTLVColor + (*TunnelEncapSubTLVSRPreference)(nil), // 25: api.TunnelEncapSubTLVSRPreference + (*TunnelEncapSubTLVSRCandidatePathName)(nil), // 26: api.TunnelEncapSubTLVSRCandidatePathName + (*TunnelEncapSubTLVSRPriority)(nil), // 27: api.TunnelEncapSubTLVSRPriority + (*TunnelEncapSubTLVSRBindingSID)(nil), // 28: api.TunnelEncapSubTLVSRBindingSID + (*SRBindingSID)(nil), // 29: api.SRBindingSID + (*SRv6EndPointBehavior)(nil), // 30: api.SRv6EndPointBehavior + (*SRv6BindingSID)(nil), // 31: api.SRv6BindingSID + (*TunnelEncapSubTLVSRENLP)(nil), // 32: api.TunnelEncapSubTLVSRENLP + (*SRWeight)(nil), // 33: api.SRWeight + (*SegmentFlags)(nil), // 34: api.SegmentFlags + (*SegmentTypeA)(nil), // 35: api.SegmentTypeA + (*SegmentTypeB)(nil), // 36: api.SegmentTypeB + (*TunnelEncapSubTLVSRSegmentList)(nil), // 37: api.TunnelEncapSubTLVSRSegmentList + (*TunnelEncapSubTLVEgressEndpoint)(nil), // 38: api.TunnelEncapSubTLVEgressEndpoint + (*TunnelEncapSubTLVUDPDestPort)(nil), // 39: api.TunnelEncapSubTLVUDPDestPort + (*TunnelEncapSubTLVUnknown)(nil), // 40: api.TunnelEncapSubTLVUnknown + (*TunnelEncapTLV)(nil), // 41: api.TunnelEncapTLV + (*TunnelEncapAttribute)(nil), // 42: api.TunnelEncapAttribute + (*IPv6AddressSpecificExtended)(nil), // 43: api.IPv6AddressSpecificExtended + (*RedirectIPv6AddressSpecificExtended)(nil), // 44: api.RedirectIPv6AddressSpecificExtended + (*IP6ExtendedCommunitiesAttribute)(nil), // 45: api.IP6ExtendedCommunitiesAttribute + (*AigpTLVIGPMetric)(nil), // 46: api.AigpTLVIGPMetric + (*AigpTLVUnknown)(nil), // 47: api.AigpTLVUnknown + (*AigpAttribute)(nil), // 48: api.AigpAttribute + (*LargeCommunity)(nil), // 49: api.LargeCommunity + (*LargeCommunitiesAttribute)(nil), // 50: api.LargeCommunitiesAttribute + (*LsNodeFlags)(nil), // 51: api.LsNodeFlags + (*LsIGPFlags)(nil), // 52: api.LsIGPFlags + (*LsSrRange)(nil), // 53: api.LsSrRange + (*LsSrCapabilities)(nil), // 54: api.LsSrCapabilities + (*LsSrLocalBlock)(nil), // 55: api.LsSrLocalBlock + (*LsAttributeNode)(nil), // 56: api.LsAttributeNode + (*LsAttributeFlexAlgoDef)(nil), // 57: api.LsAttributeFlexAlgoDef + (*LsAttributeLink)(nil), // 58: api.LsAttributeLink + (*LsAttributePrefix)(nil), // 59: api.LsAttributePrefix + (*LsAttributePrefixSID)(nil), // 60: api.LsAttributePrefixSID + (*LsAttributeFADPrefixMetric)(nil), // 61: api.LsAttributeFADPrefixMetric + (*LsBgpPeerSegmentSIDFlags)(nil), // 62: api.LsBgpPeerSegmentSIDFlags + (*LsBgpPeerSegmentSID)(nil), // 63: api.LsBgpPeerSegmentSID + (*LsAttributeBgpPeerSegment)(nil), // 64: api.LsAttributeBgpPeerSegment + (*LsSrv6EndXSID)(nil), // 65: api.LsSrv6EndXSID + (*LsSrv6SIDStructure)(nil), // 66: api.LsSrv6SIDStructure + (*LsSrv6EndpointBehavior)(nil), // 67: api.LsSrv6EndpointBehavior + (*LsSrv6BgpPeerNodeSID)(nil), // 68: api.LsSrv6BgpPeerNodeSID + (*LsAttributeSrv6SID)(nil), // 69: api.LsAttributeSrv6SID + (*LsSrBindingSIDFlags)(nil), // 70: api.LsSrBindingSIDFlags + (*LsSrBindingSID)(nil), // 71: api.LsSrBindingSID + (*LsSrv6BindingSIDFlags)(nil), // 72: api.LsSrv6BindingSIDFlags + (*LsSrv6BindingSID)(nil), // 73: api.LsSrv6BindingSID + (*LsSrCandidatePathStateFlags)(nil), // 74: api.LsSrCandidatePathStateFlags + (*LsSrCandidatePathState)(nil), // 75: api.LsSrCandidatePathState + (*LsSrSegmentFlags)(nil), // 76: api.LsSrSegmentFlags + (*LsSrSegment)(nil), // 77: api.LsSrSegment + (*LsSrSegmentListFlags)(nil), // 78: api.LsSrSegmentListFlags + (*LsSrSegmentListMetricFlags)(nil), // 79: api.LsSrSegmentListMetricFlags + (*LsSrSegmentListMetric)(nil), // 80: api.LsSrSegmentListMetric + (*LsSrSegmentListBandwidth)(nil), // 81: api.LsSrSegmentListBandwidth + (*LsSrSegmentListIdentifier)(nil), // 82: api.LsSrSegmentListIdentifier + (*LsSrSegmentList)(nil), // 83: api.LsSrSegmentList + (*LsSrCandidatePathConstraintsFlags)(nil), // 84: api.LsSrCandidatePathConstraintsFlags + (*LsSrAffinityConstraint)(nil), // 85: api.LsSrAffinityConstraint + (*LsSrBandwidthConstraint)(nil), // 86: api.LsSrBandwidthConstraint + (*LsSrDisjointGroupRequestFlags)(nil), // 87: api.LsSrDisjointGroupRequestFlags + (*LsSrDisjointGroupStatusFlags)(nil), // 88: api.LsSrDisjointGroupStatusFlags + (*LsSrDisjointGroupConstraint)(nil), // 89: api.LsSrDisjointGroupConstraint + (*LsSrBidirectionalGroupFlags)(nil), // 90: api.LsSrBidirectionalGroupFlags + (*LsSrBidirectionalGroupConstraint)(nil), // 91: api.LsSrBidirectionalGroupConstraint + (*LsSrMetricConstraintFlags)(nil), // 92: api.LsSrMetricConstraintFlags + (*LsSrMetricConstraint)(nil), // 93: api.LsSrMetricConstraint + (*LsSrCandidatePathConstraints)(nil), // 94: api.LsSrCandidatePathConstraints + (*LsAttributeSrPolicy)(nil), // 95: api.LsAttributeSrPolicy + (*LsAttribute)(nil), // 96: api.LsAttribute + (*UnknownAttribute)(nil), // 97: api.UnknownAttribute + (*SRv6StructureSubSubTLV)(nil), // 98: api.SRv6StructureSubSubTLV + (*SRv6SubSubTLV)(nil), // 99: api.SRv6SubSubTLV + (*SRv6SubSubTLVs)(nil), // 100: api.SRv6SubSubTLVs + (*SRv6SIDFlags)(nil), // 101: api.SRv6SIDFlags + (*SRv6InformationSubTLV)(nil), // 102: api.SRv6InformationSubTLV + (*SRv6SubTLV)(nil), // 103: api.SRv6SubTLV + (*SRv6SubTLVs)(nil), // 104: api.SRv6SubTLVs + (*SRv6L3ServiceTLV)(nil), // 105: api.SRv6L3ServiceTLV + (*SRv6L2ServiceTLV)(nil), // 106: api.SRv6L2ServiceTLV + (*PrefixSID)(nil), // 107: api.PrefixSID + (*TunnelEncapSubTLVSRSegmentList_Segment)(nil), // 108: api.TunnelEncapSubTLVSRSegmentList.Segment + (*TunnelEncapTLV_TLV)(nil), // 109: api.TunnelEncapTLV.TLV + (*IP6ExtendedCommunitiesAttribute_Community)(nil), // 110: api.IP6ExtendedCommunitiesAttribute.Community + (*AigpAttribute_TLV)(nil), // 111: api.AigpAttribute.TLV + nil, // 112: api.SRv6InformationSubTLV.SubSubTlvsEntry + nil, // 113: api.SRv6L3ServiceTLV.SubTlvsEntry + nil, // 114: api.SRv6L2ServiceTLV.SubTlvsEntry + (*PrefixSID_TLV)(nil), // 115: api.PrefixSID.TLV + (*Family)(nil), // 116: api.Family + (*NLRI)(nil), // 117: api.NLRI + (*ExtendedCommunity)(nil), // 118: api.ExtendedCommunity + (*FlowSpecRedirectToIPv6Extended)(nil), // 119: api.FlowSpecRedirectToIPv6Extended } var file_api_attribute_proto_depIdxs = []int32{ - 70, // 0: api.Attribute.unknown:type_name -> api.UnknownAttribute - 4, // 1: api.Attribute.origin:type_name -> api.OriginAttribute - 6, // 2: api.Attribute.as_path:type_name -> api.AsPathAttribute - 7, // 3: api.Attribute.next_hop:type_name -> api.NextHopAttribute - 8, // 4: api.Attribute.multi_exit_disc:type_name -> api.MultiExitDiscAttribute - 9, // 5: api.Attribute.local_pref:type_name -> api.LocalPrefAttribute - 10, // 6: api.Attribute.atomic_aggregate:type_name -> api.AtomicAggregateAttribute - 11, // 7: api.Attribute.aggregator:type_name -> api.AggregatorAttribute - 12, // 8: api.Attribute.communities:type_name -> api.CommunitiesAttribute - 13, // 9: api.Attribute.originator_id:type_name -> api.OriginatorIdAttribute - 14, // 10: api.Attribute.cluster_list:type_name -> api.ClusterListAttribute - 15, // 11: api.Attribute.mp_reach:type_name -> api.MpReachNLRIAttribute - 16, // 12: api.Attribute.mp_unreach:type_name -> api.MpUnreachNLRIAttribute - 17, // 13: api.Attribute.extended_communities:type_name -> api.ExtendedCommunitiesAttribute - 18, // 14: api.Attribute.as4_path:type_name -> api.As4PathAttribute - 19, // 15: api.Attribute.as4_aggregator:type_name -> api.As4AggregatorAttribute - 20, // 16: api.Attribute.pmsi_tunnel:type_name -> api.PmsiTunnelAttribute - 41, // 17: api.Attribute.tunnel_encap:type_name -> api.TunnelEncapAttribute - 44, // 18: api.Attribute.ip6_extended_communities:type_name -> api.IP6ExtendedCommunitiesAttribute - 47, // 19: api.Attribute.aigp:type_name -> api.AigpAttribute - 49, // 20: api.Attribute.large_communities:type_name -> api.LargeCommunitiesAttribute - 69, // 21: api.Attribute.ls:type_name -> api.LsAttribute - 80, // 22: api.Attribute.prefix_sid:type_name -> api.PrefixSID - 2, // 23: api.AsSegment.type:type_name -> api.AsSegment.Type - 5, // 24: api.AsPathAttribute.segments:type_name -> api.AsSegment - 89, // 25: api.MpReachNLRIAttribute.family:type_name -> api.Family - 90, // 26: api.MpReachNLRIAttribute.nlris:type_name -> api.NLRI - 89, // 27: api.MpUnreachNLRIAttribute.family:type_name -> api.Family - 90, // 28: api.MpUnreachNLRIAttribute.nlris:type_name -> api.NLRI - 91, // 29: api.ExtendedCommunitiesAttribute.communities:type_name -> api.ExtendedCommunity - 5, // 30: api.As4PathAttribute.segments:type_name -> api.AsSegment - 28, // 31: api.TunnelEncapSubTLVSRBindingSID.sr_binding_sid:type_name -> api.SRBindingSID - 30, // 32: api.TunnelEncapSubTLVSRBindingSID.srv6_binding_sid:type_name -> api.SRv6BindingSID + 97, // 0: api.Attribute.unknown:type_name -> api.UnknownAttribute + 5, // 1: api.Attribute.origin:type_name -> api.OriginAttribute + 7, // 2: api.Attribute.as_path:type_name -> api.AsPathAttribute + 8, // 3: api.Attribute.next_hop:type_name -> api.NextHopAttribute + 9, // 4: api.Attribute.multi_exit_disc:type_name -> api.MultiExitDiscAttribute + 10, // 5: api.Attribute.local_pref:type_name -> api.LocalPrefAttribute + 11, // 6: api.Attribute.atomic_aggregate:type_name -> api.AtomicAggregateAttribute + 12, // 7: api.Attribute.aggregator:type_name -> api.AggregatorAttribute + 13, // 8: api.Attribute.communities:type_name -> api.CommunitiesAttribute + 14, // 9: api.Attribute.originator_id:type_name -> api.OriginatorIdAttribute + 15, // 10: api.Attribute.cluster_list:type_name -> api.ClusterListAttribute + 16, // 11: api.Attribute.mp_reach:type_name -> api.MpReachNLRIAttribute + 17, // 12: api.Attribute.mp_unreach:type_name -> api.MpUnreachNLRIAttribute + 18, // 13: api.Attribute.extended_communities:type_name -> api.ExtendedCommunitiesAttribute + 19, // 14: api.Attribute.as4_path:type_name -> api.As4PathAttribute + 20, // 15: api.Attribute.as4_aggregator:type_name -> api.As4AggregatorAttribute + 21, // 16: api.Attribute.pmsi_tunnel:type_name -> api.PmsiTunnelAttribute + 42, // 17: api.Attribute.tunnel_encap:type_name -> api.TunnelEncapAttribute + 45, // 18: api.Attribute.ip6_extended_communities:type_name -> api.IP6ExtendedCommunitiesAttribute + 48, // 19: api.Attribute.aigp:type_name -> api.AigpAttribute + 50, // 20: api.Attribute.large_communities:type_name -> api.LargeCommunitiesAttribute + 96, // 21: api.Attribute.ls:type_name -> api.LsAttribute + 107, // 22: api.Attribute.prefix_sid:type_name -> api.PrefixSID + 3, // 23: api.AsSegment.type:type_name -> api.AsSegment.Type + 6, // 24: api.AsPathAttribute.segments:type_name -> api.AsSegment + 116, // 25: api.MpReachNLRIAttribute.family:type_name -> api.Family + 117, // 26: api.MpReachNLRIAttribute.nlris:type_name -> api.NLRI + 116, // 27: api.MpUnreachNLRIAttribute.family:type_name -> api.Family + 117, // 28: api.MpUnreachNLRIAttribute.nlris:type_name -> api.NLRI + 118, // 29: api.ExtendedCommunitiesAttribute.communities:type_name -> api.ExtendedCommunity + 6, // 30: api.As4PathAttribute.segments:type_name -> api.AsSegment + 29, // 31: api.TunnelEncapSubTLVSRBindingSID.sr_binding_sid:type_name -> api.SRBindingSID + 31, // 32: api.TunnelEncapSubTLVSRBindingSID.srv6_binding_sid:type_name -> api.SRv6BindingSID 0, // 33: api.SRv6EndPointBehavior.behavior:type_name -> api.SRV6Behavior - 29, // 34: api.SRv6BindingSID.endpoint_behavior_structure:type_name -> api.SRv6EndPointBehavior + 30, // 34: api.SRv6BindingSID.endpoint_behavior_structure:type_name -> api.SRv6EndPointBehavior 1, // 35: api.TunnelEncapSubTLVSRENLP.enlp:type_name -> api.ENLPType - 33, // 36: api.SegmentTypeA.flags:type_name -> api.SegmentFlags - 33, // 37: api.SegmentTypeB.flags:type_name -> api.SegmentFlags - 29, // 38: api.SegmentTypeB.endpoint_behavior_structure:type_name -> api.SRv6EndPointBehavior - 32, // 39: api.TunnelEncapSubTLVSRSegmentList.weight:type_name -> api.SRWeight - 81, // 40: api.TunnelEncapSubTLVSRSegmentList.segments:type_name -> api.TunnelEncapSubTLVSRSegmentList.Segment - 82, // 41: api.TunnelEncapTLV.tlvs:type_name -> api.TunnelEncapTLV.TLV - 40, // 42: api.TunnelEncapAttribute.tlvs:type_name -> api.TunnelEncapTLV - 83, // 43: api.IP6ExtendedCommunitiesAttribute.communities:type_name -> api.IP6ExtendedCommunitiesAttribute.Community - 84, // 44: api.AigpAttribute.tlvs:type_name -> api.AigpAttribute.TLV - 48, // 45: api.LargeCommunitiesAttribute.communities:type_name -> api.LargeCommunity - 52, // 46: api.LsSrCapabilities.ranges:type_name -> api.LsSrRange - 52, // 47: api.LsSrLocalBlock.ranges:type_name -> api.LsSrRange - 50, // 48: api.LsAttributeNode.flags:type_name -> api.LsNodeFlags - 53, // 49: api.LsAttributeNode.sr_capabilities:type_name -> api.LsSrCapabilities - 54, // 50: api.LsAttributeNode.sr_local_block:type_name -> api.LsSrLocalBlock - 56, // 51: api.LsAttributeNode.flex_algo_defs:type_name -> api.LsAttributeFlexAlgoDef - 64, // 52: api.LsAttributeLink.srv6_end_x_sid:type_name -> api.LsSrv6EndXSID - 51, // 53: api.LsAttributePrefix.igp_flags:type_name -> api.LsIGPFlags - 59, // 54: api.LsAttributePrefix.sr_prefix_sids:type_name -> api.LsAttributePrefixSID - 60, // 55: api.LsAttributePrefix.fad_prefix_metrics:type_name -> api.LsAttributeFADPrefixMetric - 61, // 56: api.LsBgpPeerSegmentSID.flags:type_name -> api.LsBgpPeerSegmentSIDFlags - 62, // 57: api.LsAttributeBgpPeerSegment.bgp_peer_node_sid:type_name -> api.LsBgpPeerSegmentSID - 62, // 58: api.LsAttributeBgpPeerSegment.bgp_peer_adjacency_sid:type_name -> api.LsBgpPeerSegmentSID - 62, // 59: api.LsAttributeBgpPeerSegment.bgp_peer_set_sid:type_name -> api.LsBgpPeerSegmentSID - 65, // 60: api.LsSrv6EndXSID.srv6_sid_structure:type_name -> api.LsSrv6SIDStructure - 65, // 61: api.LsAttributeSrv6SID.srv6_sid_structure:type_name -> api.LsSrv6SIDStructure - 66, // 62: api.LsAttributeSrv6SID.srv6_endpoint_behavior:type_name -> api.LsSrv6EndpointBehavior - 67, // 63: api.LsAttributeSrv6SID.srv6_bgp_peer_node_sid:type_name -> api.LsSrv6BgpPeerNodeSID - 55, // 64: api.LsAttribute.node:type_name -> api.LsAttributeNode - 57, // 65: api.LsAttribute.link:type_name -> api.LsAttributeLink - 58, // 66: api.LsAttribute.prefix:type_name -> api.LsAttributePrefix - 63, // 67: api.LsAttribute.bgp_peer_segment:type_name -> api.LsAttributeBgpPeerSegment - 68, // 68: api.LsAttribute.srv6_sid:type_name -> api.LsAttributeSrv6SID - 71, // 69: api.SRv6SubSubTLV.structure:type_name -> api.SRv6StructureSubSubTLV - 72, // 70: api.SRv6SubSubTLVs.tlvs:type_name -> api.SRv6SubSubTLV - 74, // 71: api.SRv6InformationSubTLV.flags:type_name -> api.SRv6SIDFlags - 85, // 72: api.SRv6InformationSubTLV.sub_sub_tlvs:type_name -> api.SRv6InformationSubTLV.SubSubTlvsEntry - 75, // 73: api.SRv6SubTLV.information:type_name -> api.SRv6InformationSubTLV - 76, // 74: api.SRv6SubTLVs.tlvs:type_name -> api.SRv6SubTLV - 86, // 75: api.SRv6L3ServiceTLV.sub_tlvs:type_name -> api.SRv6L3ServiceTLV.SubTlvsEntry - 87, // 76: api.SRv6L2ServiceTLV.sub_tlvs:type_name -> api.SRv6L2ServiceTLV.SubTlvsEntry - 88, // 77: api.PrefixSID.tlvs:type_name -> api.PrefixSID.TLV - 34, // 78: api.TunnelEncapSubTLVSRSegmentList.Segment.a:type_name -> api.SegmentTypeA - 35, // 79: api.TunnelEncapSubTLVSRSegmentList.Segment.b:type_name -> api.SegmentTypeB - 39, // 80: api.TunnelEncapTLV.TLV.unknown:type_name -> api.TunnelEncapSubTLVUnknown - 21, // 81: api.TunnelEncapTLV.TLV.encapsulation:type_name -> api.TunnelEncapSubTLVEncapsulation - 22, // 82: api.TunnelEncapTLV.TLV.protocol:type_name -> api.TunnelEncapSubTLVProtocol - 23, // 83: api.TunnelEncapTLV.TLV.color:type_name -> api.TunnelEncapSubTLVColor - 37, // 84: api.TunnelEncapTLV.TLV.egress_endpoint:type_name -> api.TunnelEncapSubTLVEgressEndpoint - 38, // 85: api.TunnelEncapTLV.TLV.udp_dest_port:type_name -> api.TunnelEncapSubTLVUDPDestPort - 24, // 86: api.TunnelEncapTLV.TLV.sr_preference:type_name -> api.TunnelEncapSubTLVSRPreference - 26, // 87: api.TunnelEncapTLV.TLV.sr_priority:type_name -> api.TunnelEncapSubTLVSRPriority - 25, // 88: api.TunnelEncapTLV.TLV.sr_candidate_path_name:type_name -> api.TunnelEncapSubTLVSRCandidatePathName - 31, // 89: api.TunnelEncapTLV.TLV.sr_enlp:type_name -> api.TunnelEncapSubTLVSRENLP - 27, // 90: api.TunnelEncapTLV.TLV.sr_binding_sid:type_name -> api.TunnelEncapSubTLVSRBindingSID - 36, // 91: api.TunnelEncapTLV.TLV.sr_segment_list:type_name -> api.TunnelEncapSubTLVSRSegmentList - 42, // 92: api.IP6ExtendedCommunitiesAttribute.Community.ipv6_address_specific:type_name -> api.IPv6AddressSpecificExtended - 43, // 93: api.IP6ExtendedCommunitiesAttribute.Community.redirect_ipv6_address_specific:type_name -> api.RedirectIPv6AddressSpecificExtended - 92, // 94: api.IP6ExtendedCommunitiesAttribute.Community.flow_spec_redirect_to_ipv6:type_name -> api.FlowSpecRedirectToIPv6Extended - 46, // 95: api.AigpAttribute.TLV.unknown:type_name -> api.AigpTLVUnknown - 45, // 96: api.AigpAttribute.TLV.igp_metric:type_name -> api.AigpTLVIGPMetric - 73, // 97: api.SRv6InformationSubTLV.SubSubTlvsEntry.value:type_name -> api.SRv6SubSubTLVs - 77, // 98: api.SRv6L3ServiceTLV.SubTlvsEntry.value:type_name -> api.SRv6SubTLVs - 77, // 99: api.SRv6L2ServiceTLV.SubTlvsEntry.value:type_name -> api.SRv6SubTLVs - 78, // 100: api.PrefixSID.TLV.l3_service:type_name -> api.SRv6L3ServiceTLV - 79, // 101: api.PrefixSID.TLV.l2_service:type_name -> api.SRv6L2ServiceTLV - 102, // [102:102] is the sub-list for method output_type - 102, // [102:102] is the sub-list for method input_type - 102, // [102:102] is the sub-list for extension type_name - 102, // [102:102] is the sub-list for extension extendee - 0, // [0:102] is the sub-list for field type_name + 34, // 36: api.SegmentTypeA.flags:type_name -> api.SegmentFlags + 34, // 37: api.SegmentTypeB.flags:type_name -> api.SegmentFlags + 30, // 38: api.SegmentTypeB.endpoint_behavior_structure:type_name -> api.SRv6EndPointBehavior + 33, // 39: api.TunnelEncapSubTLVSRSegmentList.weight:type_name -> api.SRWeight + 108, // 40: api.TunnelEncapSubTLVSRSegmentList.segments:type_name -> api.TunnelEncapSubTLVSRSegmentList.Segment + 109, // 41: api.TunnelEncapTLV.tlvs:type_name -> api.TunnelEncapTLV.TLV + 41, // 42: api.TunnelEncapAttribute.tlvs:type_name -> api.TunnelEncapTLV + 110, // 43: api.IP6ExtendedCommunitiesAttribute.communities:type_name -> api.IP6ExtendedCommunitiesAttribute.Community + 111, // 44: api.AigpAttribute.tlvs:type_name -> api.AigpAttribute.TLV + 49, // 45: api.LargeCommunitiesAttribute.communities:type_name -> api.LargeCommunity + 53, // 46: api.LsSrCapabilities.ranges:type_name -> api.LsSrRange + 53, // 47: api.LsSrLocalBlock.ranges:type_name -> api.LsSrRange + 51, // 48: api.LsAttributeNode.flags:type_name -> api.LsNodeFlags + 54, // 49: api.LsAttributeNode.sr_capabilities:type_name -> api.LsSrCapabilities + 55, // 50: api.LsAttributeNode.sr_local_block:type_name -> api.LsSrLocalBlock + 57, // 51: api.LsAttributeNode.flex_algo_defs:type_name -> api.LsAttributeFlexAlgoDef + 65, // 52: api.LsAttributeLink.srv6_end_x_sid:type_name -> api.LsSrv6EndXSID + 52, // 53: api.LsAttributePrefix.igp_flags:type_name -> api.LsIGPFlags + 60, // 54: api.LsAttributePrefix.sr_prefix_sids:type_name -> api.LsAttributePrefixSID + 61, // 55: api.LsAttributePrefix.fad_prefix_metrics:type_name -> api.LsAttributeFADPrefixMetric + 62, // 56: api.LsBgpPeerSegmentSID.flags:type_name -> api.LsBgpPeerSegmentSIDFlags + 63, // 57: api.LsAttributeBgpPeerSegment.bgp_peer_node_sid:type_name -> api.LsBgpPeerSegmentSID + 63, // 58: api.LsAttributeBgpPeerSegment.bgp_peer_adjacency_sid:type_name -> api.LsBgpPeerSegmentSID + 63, // 59: api.LsAttributeBgpPeerSegment.bgp_peer_set_sid:type_name -> api.LsBgpPeerSegmentSID + 66, // 60: api.LsSrv6EndXSID.srv6_sid_structure:type_name -> api.LsSrv6SIDStructure + 66, // 61: api.LsAttributeSrv6SID.srv6_sid_structure:type_name -> api.LsSrv6SIDStructure + 67, // 62: api.LsAttributeSrv6SID.srv6_endpoint_behavior:type_name -> api.LsSrv6EndpointBehavior + 68, // 63: api.LsAttributeSrv6SID.srv6_bgp_peer_node_sid:type_name -> api.LsSrv6BgpPeerNodeSID + 70, // 64: api.LsSrBindingSID.flags:type_name -> api.LsSrBindingSIDFlags + 72, // 65: api.LsSrv6BindingSID.flags:type_name -> api.LsSrv6BindingSIDFlags + 67, // 66: api.LsSrv6BindingSID.endpoint_behavior:type_name -> api.LsSrv6EndpointBehavior + 66, // 67: api.LsSrv6BindingSID.sid_structure:type_name -> api.LsSrv6SIDStructure + 74, // 68: api.LsSrCandidatePathState.flags:type_name -> api.LsSrCandidatePathStateFlags + 2, // 69: api.LsSrSegment.segment_type:type_name -> api.LsSrSegmentType + 76, // 70: api.LsSrSegment.flags:type_name -> api.LsSrSegmentFlags + 67, // 71: api.LsSrSegment.endpoint_behavior:type_name -> api.LsSrv6EndpointBehavior + 66, // 72: api.LsSrSegment.sid_structure:type_name -> api.LsSrv6SIDStructure + 79, // 73: api.LsSrSegmentListMetric.flags:type_name -> api.LsSrSegmentListMetricFlags + 78, // 74: api.LsSrSegmentList.flags:type_name -> api.LsSrSegmentListFlags + 77, // 75: api.LsSrSegmentList.segments:type_name -> api.LsSrSegment + 80, // 76: api.LsSrSegmentList.metrics:type_name -> api.LsSrSegmentListMetric + 81, // 77: api.LsSrSegmentList.bandwidth:type_name -> api.LsSrSegmentListBandwidth + 82, // 78: api.LsSrSegmentList.identifier:type_name -> api.LsSrSegmentListIdentifier + 87, // 79: api.LsSrDisjointGroupConstraint.request_flags:type_name -> api.LsSrDisjointGroupRequestFlags + 88, // 80: api.LsSrDisjointGroupConstraint.status_flags:type_name -> api.LsSrDisjointGroupStatusFlags + 90, // 81: api.LsSrBidirectionalGroupConstraint.flags:type_name -> api.LsSrBidirectionalGroupFlags + 92, // 82: api.LsSrMetricConstraint.flags:type_name -> api.LsSrMetricConstraintFlags + 84, // 83: api.LsSrCandidatePathConstraints.flags:type_name -> api.LsSrCandidatePathConstraintsFlags + 85, // 84: api.LsSrCandidatePathConstraints.affinity:type_name -> api.LsSrAffinityConstraint + 86, // 85: api.LsSrCandidatePathConstraints.bandwidth:type_name -> api.LsSrBandwidthConstraint + 89, // 86: api.LsSrCandidatePathConstraints.disjoint_group:type_name -> api.LsSrDisjointGroupConstraint + 91, // 87: api.LsSrCandidatePathConstraints.bidirectional_group:type_name -> api.LsSrBidirectionalGroupConstraint + 93, // 88: api.LsSrCandidatePathConstraints.metrics:type_name -> api.LsSrMetricConstraint + 71, // 89: api.LsAttributeSrPolicy.binding_sid:type_name -> api.LsSrBindingSID + 73, // 90: api.LsAttributeSrPolicy.srv6_binding_sids:type_name -> api.LsSrv6BindingSID + 75, // 91: api.LsAttributeSrPolicy.state:type_name -> api.LsSrCandidatePathState + 83, // 92: api.LsAttributeSrPolicy.segment_lists:type_name -> api.LsSrSegmentList + 94, // 93: api.LsAttributeSrPolicy.constraints:type_name -> api.LsSrCandidatePathConstraints + 56, // 94: api.LsAttribute.node:type_name -> api.LsAttributeNode + 58, // 95: api.LsAttribute.link:type_name -> api.LsAttributeLink + 59, // 96: api.LsAttribute.prefix:type_name -> api.LsAttributePrefix + 64, // 97: api.LsAttribute.bgp_peer_segment:type_name -> api.LsAttributeBgpPeerSegment + 69, // 98: api.LsAttribute.srv6_sid:type_name -> api.LsAttributeSrv6SID + 95, // 99: api.LsAttribute.sr_policy:type_name -> api.LsAttributeSrPolicy + 98, // 100: api.SRv6SubSubTLV.structure:type_name -> api.SRv6StructureSubSubTLV + 99, // 101: api.SRv6SubSubTLVs.tlvs:type_name -> api.SRv6SubSubTLV + 101, // 102: api.SRv6InformationSubTLV.flags:type_name -> api.SRv6SIDFlags + 112, // 103: api.SRv6InformationSubTLV.sub_sub_tlvs:type_name -> api.SRv6InformationSubTLV.SubSubTlvsEntry + 102, // 104: api.SRv6SubTLV.information:type_name -> api.SRv6InformationSubTLV + 103, // 105: api.SRv6SubTLVs.tlvs:type_name -> api.SRv6SubTLV + 113, // 106: api.SRv6L3ServiceTLV.sub_tlvs:type_name -> api.SRv6L3ServiceTLV.SubTlvsEntry + 114, // 107: api.SRv6L2ServiceTLV.sub_tlvs:type_name -> api.SRv6L2ServiceTLV.SubTlvsEntry + 115, // 108: api.PrefixSID.tlvs:type_name -> api.PrefixSID.TLV + 35, // 109: api.TunnelEncapSubTLVSRSegmentList.Segment.a:type_name -> api.SegmentTypeA + 36, // 110: api.TunnelEncapSubTLVSRSegmentList.Segment.b:type_name -> api.SegmentTypeB + 40, // 111: api.TunnelEncapTLV.TLV.unknown:type_name -> api.TunnelEncapSubTLVUnknown + 22, // 112: api.TunnelEncapTLV.TLV.encapsulation:type_name -> api.TunnelEncapSubTLVEncapsulation + 23, // 113: api.TunnelEncapTLV.TLV.protocol:type_name -> api.TunnelEncapSubTLVProtocol + 24, // 114: api.TunnelEncapTLV.TLV.color:type_name -> api.TunnelEncapSubTLVColor + 38, // 115: api.TunnelEncapTLV.TLV.egress_endpoint:type_name -> api.TunnelEncapSubTLVEgressEndpoint + 39, // 116: api.TunnelEncapTLV.TLV.udp_dest_port:type_name -> api.TunnelEncapSubTLVUDPDestPort + 25, // 117: api.TunnelEncapTLV.TLV.sr_preference:type_name -> api.TunnelEncapSubTLVSRPreference + 27, // 118: api.TunnelEncapTLV.TLV.sr_priority:type_name -> api.TunnelEncapSubTLVSRPriority + 26, // 119: api.TunnelEncapTLV.TLV.sr_candidate_path_name:type_name -> api.TunnelEncapSubTLVSRCandidatePathName + 32, // 120: api.TunnelEncapTLV.TLV.sr_enlp:type_name -> api.TunnelEncapSubTLVSRENLP + 28, // 121: api.TunnelEncapTLV.TLV.sr_binding_sid:type_name -> api.TunnelEncapSubTLVSRBindingSID + 37, // 122: api.TunnelEncapTLV.TLV.sr_segment_list:type_name -> api.TunnelEncapSubTLVSRSegmentList + 43, // 123: api.IP6ExtendedCommunitiesAttribute.Community.ipv6_address_specific:type_name -> api.IPv6AddressSpecificExtended + 44, // 124: api.IP6ExtendedCommunitiesAttribute.Community.redirect_ipv6_address_specific:type_name -> api.RedirectIPv6AddressSpecificExtended + 119, // 125: api.IP6ExtendedCommunitiesAttribute.Community.flow_spec_redirect_to_ipv6:type_name -> api.FlowSpecRedirectToIPv6Extended + 47, // 126: api.AigpAttribute.TLV.unknown:type_name -> api.AigpTLVUnknown + 46, // 127: api.AigpAttribute.TLV.igp_metric:type_name -> api.AigpTLVIGPMetric + 100, // 128: api.SRv6InformationSubTLV.SubSubTlvsEntry.value:type_name -> api.SRv6SubSubTLVs + 104, // 129: api.SRv6L3ServiceTLV.SubTlvsEntry.value:type_name -> api.SRv6SubTLVs + 104, // 130: api.SRv6L2ServiceTLV.SubTlvsEntry.value:type_name -> api.SRv6SubTLVs + 105, // 131: api.PrefixSID.TLV.l3_service:type_name -> api.SRv6L3ServiceTLV + 106, // 132: api.PrefixSID.TLV.l2_service:type_name -> api.SRv6L2ServiceTLV + 133, // [133:133] is the sub-list for method output_type + 133, // [133:133] is the sub-list for method input_type + 133, // [133:133] is the sub-list for extension type_name + 133, // [133:133] is the sub-list for extension extendee + 0, // [0:133] is the sub-list for field type_name } func init() { file_api_attribute_proto_init() } @@ -6589,17 +8962,17 @@ func file_api_attribute_proto_init() { (*TunnelEncapSubTLVSRBindingSID_SrBindingSid)(nil), (*TunnelEncapSubTLVSRBindingSID_Srv6BindingSid)(nil), } - file_api_attribute_proto_msgTypes[69].OneofWrappers = []any{ + file_api_attribute_proto_msgTypes[95].OneofWrappers = []any{ (*SRv6SubSubTLV_Structure)(nil), } - file_api_attribute_proto_msgTypes[73].OneofWrappers = []any{ + file_api_attribute_proto_msgTypes[99].OneofWrappers = []any{ (*SRv6SubTLV_Information)(nil), } - file_api_attribute_proto_msgTypes[78].OneofWrappers = []any{ + file_api_attribute_proto_msgTypes[104].OneofWrappers = []any{ (*TunnelEncapSubTLVSRSegmentList_Segment_A)(nil), (*TunnelEncapSubTLVSRSegmentList_Segment_B)(nil), } - file_api_attribute_proto_msgTypes[79].OneofWrappers = []any{ + file_api_attribute_proto_msgTypes[105].OneofWrappers = []any{ (*TunnelEncapTLV_TLV_Unknown)(nil), (*TunnelEncapTLV_TLV_Encapsulation)(nil), (*TunnelEncapTLV_TLV_Protocol)(nil), @@ -6613,16 +8986,16 @@ func file_api_attribute_proto_init() { (*TunnelEncapTLV_TLV_SrBindingSid)(nil), (*TunnelEncapTLV_TLV_SrSegmentList)(nil), } - file_api_attribute_proto_msgTypes[80].OneofWrappers = []any{ + file_api_attribute_proto_msgTypes[106].OneofWrappers = []any{ (*IP6ExtendedCommunitiesAttribute_Community_Ipv6AddressSpecific)(nil), (*IP6ExtendedCommunitiesAttribute_Community_RedirectIpv6AddressSpecific)(nil), (*IP6ExtendedCommunitiesAttribute_Community_FlowSpecRedirectToIpv6)(nil), } - file_api_attribute_proto_msgTypes[81].OneofWrappers = []any{ + file_api_attribute_proto_msgTypes[107].OneofWrappers = []any{ (*AigpAttribute_TLV_Unknown)(nil), (*AigpAttribute_TLV_IgpMetric)(nil), } - file_api_attribute_proto_msgTypes[85].OneofWrappers = []any{ + file_api_attribute_proto_msgTypes[111].OneofWrappers = []any{ (*PrefixSID_TLV_L3Service)(nil), (*PrefixSID_TLV_L2Service)(nil), } @@ -6631,8 +9004,8 @@ func file_api_attribute_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_attribute_proto_rawDesc), len(file_api_attribute_proto_rawDesc)), - NumEnums: 3, - NumMessages: 86, + NumEnums: 4, + NumMessages: 112, NumExtensions: 0, NumServices: 0, }, diff --git a/api/nlri.pb.go b/api/nlri.pb.go index bf9cc3ddd..0e2d13db6 100644 --- a/api/nlri.pb.go +++ b/api/nlri.pb.go @@ -25,12 +25,13 @@ const ( type LsNLRIType int32 const ( - LsNLRIType_LS_NLRI_TYPE_UNSPECIFIED LsNLRIType = 0 - LsNLRIType_LS_NLRI_TYPE_NODE LsNLRIType = 1 - LsNLRIType_LS_NLRI_TYPE_LINK LsNLRIType = 2 - LsNLRIType_LS_NLRI_TYPE_PREFIX_V4 LsNLRIType = 3 - LsNLRIType_LS_NLRI_TYPE_PREFIX_V6 LsNLRIType = 4 - LsNLRIType_LS_NLRI_TYPE_SRV6_SID LsNLRIType = 6 + LsNLRIType_LS_NLRI_TYPE_UNSPECIFIED LsNLRIType = 0 + LsNLRIType_LS_NLRI_TYPE_NODE LsNLRIType = 1 + LsNLRIType_LS_NLRI_TYPE_LINK LsNLRIType = 2 + LsNLRIType_LS_NLRI_TYPE_PREFIX_V4 LsNLRIType = 3 + LsNLRIType_LS_NLRI_TYPE_PREFIX_V6 LsNLRIType = 4 + LsNLRIType_LS_NLRI_TYPE_SR_POLICY_CANDIDATE_PATH LsNLRIType = 5 + LsNLRIType_LS_NLRI_TYPE_SRV6_SID LsNLRIType = 6 ) // Enum value maps for LsNLRIType. @@ -41,15 +42,17 @@ var ( 2: "LS_NLRI_TYPE_LINK", 3: "LS_NLRI_TYPE_PREFIX_V4", 4: "LS_NLRI_TYPE_PREFIX_V6", + 5: "LS_NLRI_TYPE_SR_POLICY_CANDIDATE_PATH", 6: "LS_NLRI_TYPE_SRV6_SID", } LsNLRIType_value = map[string]int32{ - "LS_NLRI_TYPE_UNSPECIFIED": 0, - "LS_NLRI_TYPE_NODE": 1, - "LS_NLRI_TYPE_LINK": 2, - "LS_NLRI_TYPE_PREFIX_V4": 3, - "LS_NLRI_TYPE_PREFIX_V6": 4, - "LS_NLRI_TYPE_SRV6_SID": 6, + "LS_NLRI_TYPE_UNSPECIFIED": 0, + "LS_NLRI_TYPE_NODE": 1, + "LS_NLRI_TYPE_LINK": 2, + "LS_NLRI_TYPE_PREFIX_V4": 3, + "LS_NLRI_TYPE_PREFIX_V6": 4, + "LS_NLRI_TYPE_SR_POLICY_CANDIDATE_PATH": 5, + "LS_NLRI_TYPE_SRV6_SID": 6, } ) @@ -83,13 +86,16 @@ func (LsNLRIType) EnumDescriptor() ([]byte, []int) { type LsProtocolID int32 const ( - LsProtocolID_LS_PROTOCOL_ID_UNSPECIFIED LsProtocolID = 0 - LsProtocolID_LS_PROTOCOL_ID_ISIS_L1 LsProtocolID = 1 - LsProtocolID_LS_PROTOCOL_ID_ISIS_L2 LsProtocolID = 2 - LsProtocolID_LS_PROTOCOL_ID_OSPF_V2 LsProtocolID = 3 - LsProtocolID_LS_PROTOCOL_ID_DIRECT LsProtocolID = 4 - LsProtocolID_LS_PROTOCOL_ID_STATIC LsProtocolID = 5 - LsProtocolID_LS_PROTOCOL_ID_OSPF_V3 LsProtocolID = 6 + LsProtocolID_LS_PROTOCOL_ID_UNSPECIFIED LsProtocolID = 0 + LsProtocolID_LS_PROTOCOL_ID_ISIS_L1 LsProtocolID = 1 + LsProtocolID_LS_PROTOCOL_ID_ISIS_L2 LsProtocolID = 2 + LsProtocolID_LS_PROTOCOL_ID_OSPF_V2 LsProtocolID = 3 + LsProtocolID_LS_PROTOCOL_ID_DIRECT LsProtocolID = 4 + LsProtocolID_LS_PROTOCOL_ID_STATIC LsProtocolID = 5 + LsProtocolID_LS_PROTOCOL_ID_OSPF_V3 LsProtocolID = 6 + LsProtocolID_LS_PROTOCOL_ID_BGP LsProtocolID = 7 + LsProtocolID_LS_PROTOCOL_ID_RSVP_TE LsProtocolID = 8 + LsProtocolID_LS_PROTOCOL_ID_SEGMENT_ROUTING LsProtocolID = 9 ) // Enum value maps for LsProtocolID. @@ -102,15 +108,21 @@ var ( 4: "LS_PROTOCOL_ID_DIRECT", 5: "LS_PROTOCOL_ID_STATIC", 6: "LS_PROTOCOL_ID_OSPF_V3", + 7: "LS_PROTOCOL_ID_BGP", + 8: "LS_PROTOCOL_ID_RSVP_TE", + 9: "LS_PROTOCOL_ID_SEGMENT_ROUTING", } LsProtocolID_value = map[string]int32{ - "LS_PROTOCOL_ID_UNSPECIFIED": 0, - "LS_PROTOCOL_ID_ISIS_L1": 1, - "LS_PROTOCOL_ID_ISIS_L2": 2, - "LS_PROTOCOL_ID_OSPF_V2": 3, - "LS_PROTOCOL_ID_DIRECT": 4, - "LS_PROTOCOL_ID_STATIC": 5, - "LS_PROTOCOL_ID_OSPF_V3": 6, + "LS_PROTOCOL_ID_UNSPECIFIED": 0, + "LS_PROTOCOL_ID_ISIS_L1": 1, + "LS_PROTOCOL_ID_ISIS_L2": 2, + "LS_PROTOCOL_ID_OSPF_V2": 3, + "LS_PROTOCOL_ID_DIRECT": 4, + "LS_PROTOCOL_ID_STATIC": 5, + "LS_PROTOCOL_ID_OSPF_V3": 6, + "LS_PROTOCOL_ID_BGP": 7, + "LS_PROTOCOL_ID_RSVP_TE": 8, + "LS_PROTOCOL_ID_SEGMENT_ROUTING": 9, } ) @@ -2015,8 +2027,11 @@ type LsNodeDescriptor struct { IgpRouterId string `protobuf:"bytes,5,opt,name=igp_router_id,json=igpRouterId,proto3" json:"igp_router_id,omitempty"` BgpRouterId string `protobuf:"bytes,6,opt,name=bgp_router_id,json=bgpRouterId,proto3" json:"bgp_router_id,omitempty"` BgpConfederationMember uint32 `protobuf:"varint,7,opt,name=bgp_confederation_member,json=bgpConfederationMember,proto3" json:"bgp_confederation_member,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // RFC 9857 requires at least one of these in the headend descriptors. + LocalRouterIdIpv4 string `protobuf:"bytes,8,opt,name=local_router_id_ipv4,json=localRouterIdIpv4,proto3" json:"local_router_id_ipv4,omitempty"` + LocalRouterIdIpv6 string `protobuf:"bytes,9,opt,name=local_router_id_ipv6,json=localRouterIdIpv6,proto3" json:"local_router_id_ipv6,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *LsNodeDescriptor) Reset() { @@ -2098,6 +2113,20 @@ func (x *LsNodeDescriptor) GetBgpConfederationMember() uint32 { return 0 } +func (x *LsNodeDescriptor) GetLocalRouterIdIpv4() string { + if x != nil { + return x.LocalRouterIdIpv4 + } + return "" +} + +func (x *LsNodeDescriptor) GetLocalRouterIdIpv6() string { + if x != nil { + return x.LocalRouterIdIpv6 + } + return "" +} + type LsLinkDescriptor struct { state protoimpl.MessageState `protogen:"open.v1"` // The Link Local/Remote Identifiers TLV carries both identifiers together, and @@ -2534,7 +2563,6 @@ func (x *LsMultiTopologyIdentifier) GetMultiTopoIds() []uint32 { return nil } -// TODO: LsSrPolicyiCandidatePathNLRI type LsSrv6SIDNLRI struct { state protoimpl.MessageState `protogen:"open.v1"` LocalNode *LsNodeDescriptor `protobuf:"bytes,1,opt,name=local_node,json=localNode,proto3" json:"local_node,omitempty"` @@ -2595,6 +2623,149 @@ func (x *LsSrv6SIDNLRI) GetMultiTopoId() *LsMultiTopologyIdentifier { return nil } +// SR Policy Candidate Path Descriptor TLV (RFC 9857 Section 4.1). +type LsSrPolicyCandidatePathDescriptor struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Protocol-Origin (RFC 9857): 1 PCEP, 2 BGP, 3 configuration; + // 10, 20 and 30 are the corresponding values when the producer is a PCE. + ProtocolOrigin uint32 `protobuf:"varint,1,opt,name=protocol_origin,json=protocolOrigin,proto3" json:"protocol_origin,omitempty"` + // IPv4 or IPv6 endpoint of the SR Policy. + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Color uint32 `protobuf:"varint,3,opt,name=color,proto3" json:"color,omitempty"` + OriginatorAsn uint32 `protobuf:"varint,4,opt,name=originator_asn,json=originatorAsn,proto3" json:"originator_asn,omitempty"` + // IPv4 or IPv6 address of the originator of the candidate path. + OriginatorAddress string `protobuf:"bytes,5,opt,name=originator_address,json=originatorAddress,proto3" json:"originator_address,omitempty"` + Discriminator uint32 `protobuf:"varint,6,opt,name=discriminator,proto3" json:"discriminator,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrPolicyCandidatePathDescriptor) Reset() { + *x = LsSrPolicyCandidatePathDescriptor{} + mi := &file_api_nlri_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrPolicyCandidatePathDescriptor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrPolicyCandidatePathDescriptor) ProtoMessage() {} + +func (x *LsSrPolicyCandidatePathDescriptor) ProtoReflect() protoreflect.Message { + mi := &file_api_nlri_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrPolicyCandidatePathDescriptor.ProtoReflect.Descriptor instead. +func (*LsSrPolicyCandidatePathDescriptor) Descriptor() ([]byte, []int) { + return file_api_nlri_proto_rawDescGZIP(), []int{33} +} + +func (x *LsSrPolicyCandidatePathDescriptor) GetProtocolOrigin() uint32 { + if x != nil { + return x.ProtocolOrigin + } + return 0 +} + +func (x *LsSrPolicyCandidatePathDescriptor) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *LsSrPolicyCandidatePathDescriptor) GetColor() uint32 { + if x != nil { + return x.Color + } + return 0 +} + +func (x *LsSrPolicyCandidatePathDescriptor) GetOriginatorAsn() uint32 { + if x != nil { + return x.OriginatorAsn + } + return 0 +} + +func (x *LsSrPolicyCandidatePathDescriptor) GetOriginatorAddress() string { + if x != nil { + return x.OriginatorAddress + } + return "" +} + +func (x *LsSrPolicyCandidatePathDescriptor) GetDiscriminator() uint32 { + if x != nil { + return x.Discriminator + } + return 0 +} + +// SR Policy Candidate Path NLRI (RFC 9857 Section 4). +type LsSrPolicyCandidatePathNLRI struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Node descriptors of the headend of the SR Policy. + LocalNode *LsNodeDescriptor `protobuf:"bytes,1,opt,name=local_node,json=localNode,proto3" json:"local_node,omitempty"` + CandidatePathDescriptor *LsSrPolicyCandidatePathDescriptor `protobuf:"bytes,2,opt,name=candidate_path_descriptor,json=candidatePathDescriptor,proto3" json:"candidate_path_descriptor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LsSrPolicyCandidatePathNLRI) Reset() { + *x = LsSrPolicyCandidatePathNLRI{} + mi := &file_api_nlri_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LsSrPolicyCandidatePathNLRI) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LsSrPolicyCandidatePathNLRI) ProtoMessage() {} + +func (x *LsSrPolicyCandidatePathNLRI) ProtoReflect() protoreflect.Message { + mi := &file_api_nlri_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LsSrPolicyCandidatePathNLRI.ProtoReflect.Descriptor instead. +func (*LsSrPolicyCandidatePathNLRI) Descriptor() ([]byte, []int) { + return file_api_nlri_proto_rawDescGZIP(), []int{34} +} + +func (x *LsSrPolicyCandidatePathNLRI) GetLocalNode() *LsNodeDescriptor { + if x != nil { + return x.LocalNode + } + return nil +} + +func (x *LsSrPolicyCandidatePathNLRI) GetCandidatePathDescriptor() *LsSrPolicyCandidatePathDescriptor { + if x != nil { + return x.CandidatePathDescriptor + } + return nil +} + // LsAddrPrefix represents the NLRI for: // - AFI=16388, SAFI=71 type LsAddrPrefix struct { @@ -2610,7 +2781,7 @@ type LsAddrPrefix struct { func (x *LsAddrPrefix) Reset() { *x = LsAddrPrefix{} - mi := &file_api_nlri_proto_msgTypes[33] + mi := &file_api_nlri_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2622,7 +2793,7 @@ func (x *LsAddrPrefix) String() string { func (*LsAddrPrefix) ProtoMessage() {} func (x *LsAddrPrefix) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[33] + mi := &file_api_nlri_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2635,7 +2806,7 @@ func (x *LsAddrPrefix) ProtoReflect() protoreflect.Message { // Deprecated: Use LsAddrPrefix.ProtoReflect.Descriptor instead. func (*LsAddrPrefix) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{33} + return file_api_nlri_proto_rawDescGZIP(), []int{35} } func (x *LsAddrPrefix) GetType() LsNLRIType { @@ -2683,7 +2854,7 @@ type MUPInterworkSegmentDiscoveryRoute struct { func (x *MUPInterworkSegmentDiscoveryRoute) Reset() { *x = MUPInterworkSegmentDiscoveryRoute{} - mi := &file_api_nlri_proto_msgTypes[34] + mi := &file_api_nlri_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2695,7 +2866,7 @@ func (x *MUPInterworkSegmentDiscoveryRoute) String() string { func (*MUPInterworkSegmentDiscoveryRoute) ProtoMessage() {} func (x *MUPInterworkSegmentDiscoveryRoute) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[34] + mi := &file_api_nlri_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2708,7 +2879,7 @@ func (x *MUPInterworkSegmentDiscoveryRoute) ProtoReflect() protoreflect.Message // Deprecated: Use MUPInterworkSegmentDiscoveryRoute.ProtoReflect.Descriptor instead. func (*MUPInterworkSegmentDiscoveryRoute) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{34} + return file_api_nlri_proto_rawDescGZIP(), []int{36} } func (x *MUPInterworkSegmentDiscoveryRoute) GetRd() *RouteDistinguisher { @@ -2735,7 +2906,7 @@ type MUPDirectSegmentDiscoveryRoute struct { func (x *MUPDirectSegmentDiscoveryRoute) Reset() { *x = MUPDirectSegmentDiscoveryRoute{} - mi := &file_api_nlri_proto_msgTypes[35] + mi := &file_api_nlri_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2747,7 +2918,7 @@ func (x *MUPDirectSegmentDiscoveryRoute) String() string { func (*MUPDirectSegmentDiscoveryRoute) ProtoMessage() {} func (x *MUPDirectSegmentDiscoveryRoute) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[35] + mi := &file_api_nlri_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2760,7 +2931,7 @@ func (x *MUPDirectSegmentDiscoveryRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use MUPDirectSegmentDiscoveryRoute.ProtoReflect.Descriptor instead. func (*MUPDirectSegmentDiscoveryRoute) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{35} + return file_api_nlri_proto_rawDescGZIP(), []int{37} } func (x *MUPDirectSegmentDiscoveryRoute) GetRd() *RouteDistinguisher { @@ -2787,7 +2958,7 @@ type MUPSessionParametersTLV struct { func (x *MUPSessionParametersTLV) Reset() { *x = MUPSessionParametersTLV{} - mi := &file_api_nlri_proto_msgTypes[36] + mi := &file_api_nlri_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2799,7 +2970,7 @@ func (x *MUPSessionParametersTLV) String() string { func (*MUPSessionParametersTLV) ProtoMessage() {} func (x *MUPSessionParametersTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[36] + mi := &file_api_nlri_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2812,7 +2983,7 @@ func (x *MUPSessionParametersTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use MUPSessionParametersTLV.ProtoReflect.Descriptor instead. func (*MUPSessionParametersTLV) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{36} + return file_api_nlri_proto_rawDescGZIP(), []int{38} } func (x *MUPSessionParametersTLV) GetTeid() uint32 { @@ -2838,7 +3009,7 @@ type MUPInterworkEndpointTLV struct { func (x *MUPInterworkEndpointTLV) Reset() { *x = MUPInterworkEndpointTLV{} - mi := &file_api_nlri_proto_msgTypes[37] + mi := &file_api_nlri_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2850,7 +3021,7 @@ func (x *MUPInterworkEndpointTLV) String() string { func (*MUPInterworkEndpointTLV) ProtoMessage() {} func (x *MUPInterworkEndpointTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[37] + mi := &file_api_nlri_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2863,7 +3034,7 @@ func (x *MUPInterworkEndpointTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use MUPInterworkEndpointTLV.ProtoReflect.Descriptor instead. func (*MUPInterworkEndpointTLV) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{37} + return file_api_nlri_proto_rawDescGZIP(), []int{39} } func (x *MUPInterworkEndpointTLV) GetAddress() string { @@ -2882,7 +3053,7 @@ type MUPSourceAddressTLV struct { func (x *MUPSourceAddressTLV) Reset() { *x = MUPSourceAddressTLV{} - mi := &file_api_nlri_proto_msgTypes[38] + mi := &file_api_nlri_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2894,7 +3065,7 @@ func (x *MUPSourceAddressTLV) String() string { func (*MUPSourceAddressTLV) ProtoMessage() {} func (x *MUPSourceAddressTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[38] + mi := &file_api_nlri_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2907,7 +3078,7 @@ func (x *MUPSourceAddressTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use MUPSourceAddressTLV.ProtoReflect.Descriptor instead. func (*MUPSourceAddressTLV) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{38} + return file_api_nlri_proto_rawDescGZIP(), []int{40} } func (x *MUPSourceAddressTLV) GetAddress() string { @@ -2927,7 +3098,7 @@ type MUPUnknownTLV struct { func (x *MUPUnknownTLV) Reset() { *x = MUPUnknownTLV{} - mi := &file_api_nlri_proto_msgTypes[39] + mi := &file_api_nlri_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2939,7 +3110,7 @@ func (x *MUPUnknownTLV) String() string { func (*MUPUnknownTLV) ProtoMessage() {} func (x *MUPUnknownTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[39] + mi := &file_api_nlri_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2952,7 +3123,7 @@ func (x *MUPUnknownTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use MUPUnknownTLV.ProtoReflect.Descriptor instead. func (*MUPUnknownTLV) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{39} + return file_api_nlri_proto_rawDescGZIP(), []int{41} } func (x *MUPUnknownTLV) GetType() uint32 { @@ -2984,7 +3155,7 @@ type MUPTLV struct { func (x *MUPTLV) Reset() { *x = MUPTLV{} - mi := &file_api_nlri_proto_msgTypes[40] + mi := &file_api_nlri_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2996,7 +3167,7 @@ func (x *MUPTLV) String() string { func (*MUPTLV) ProtoMessage() {} func (x *MUPTLV) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[40] + mi := &file_api_nlri_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3009,7 +3180,7 @@ func (x *MUPTLV) ProtoReflect() protoreflect.Message { // Deprecated: Use MUPTLV.ProtoReflect.Descriptor instead. func (*MUPTLV) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{40} + return file_api_nlri_proto_rawDescGZIP(), []int{42} } func (x *MUPTLV) GetTlv() isMUPTLV_Tlv { @@ -3102,7 +3273,7 @@ type MUPType1SessionTransformedRoute struct { func (x *MUPType1SessionTransformedRoute) Reset() { *x = MUPType1SessionTransformedRoute{} - mi := &file_api_nlri_proto_msgTypes[41] + mi := &file_api_nlri_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3114,7 +3285,7 @@ func (x *MUPType1SessionTransformedRoute) String() string { func (*MUPType1SessionTransformedRoute) ProtoMessage() {} func (x *MUPType1SessionTransformedRoute) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[41] + mi := &file_api_nlri_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3127,7 +3298,7 @@ func (x *MUPType1SessionTransformedRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use MUPType1SessionTransformedRoute.ProtoReflect.Descriptor instead. func (*MUPType1SessionTransformedRoute) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{41} + return file_api_nlri_proto_rawDescGZIP(), []int{43} } func (x *MUPType1SessionTransformedRoute) GetRd() *RouteDistinguisher { @@ -3214,7 +3385,7 @@ type MUPType2SessionTransformedRoute struct { func (x *MUPType2SessionTransformedRoute) Reset() { *x = MUPType2SessionTransformedRoute{} - mi := &file_api_nlri_proto_msgTypes[42] + mi := &file_api_nlri_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3226,7 +3397,7 @@ func (x *MUPType2SessionTransformedRoute) String() string { func (*MUPType2SessionTransformedRoute) ProtoMessage() {} func (x *MUPType2SessionTransformedRoute) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[42] + mi := &file_api_nlri_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3239,7 +3410,7 @@ func (x *MUPType2SessionTransformedRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use MUPType2SessionTransformedRoute.ProtoReflect.Descriptor instead. func (*MUPType2SessionTransformedRoute) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{42} + return file_api_nlri_proto_rawDescGZIP(), []int{44} } func (x *MUPType2SessionTransformedRoute) GetRd() *RouteDistinguisher { @@ -3286,6 +3457,7 @@ type LsAddrPrefix_LsNLRI struct { // *LsAddrPrefix_LsNLRI_PrefixV4 // *LsAddrPrefix_LsNLRI_PrefixV6 // *LsAddrPrefix_LsNLRI_Srv6Sid + // *LsAddrPrefix_LsNLRI_SrPolicyCandidatePath Nlri isLsAddrPrefix_LsNLRI_Nlri `protobuf_oneof:"nlri"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -3293,7 +3465,7 @@ type LsAddrPrefix_LsNLRI struct { func (x *LsAddrPrefix_LsNLRI) Reset() { *x = LsAddrPrefix_LsNLRI{} - mi := &file_api_nlri_proto_msgTypes[43] + mi := &file_api_nlri_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3305,7 +3477,7 @@ func (x *LsAddrPrefix_LsNLRI) String() string { func (*LsAddrPrefix_LsNLRI) ProtoMessage() {} func (x *LsAddrPrefix_LsNLRI) ProtoReflect() protoreflect.Message { - mi := &file_api_nlri_proto_msgTypes[43] + mi := &file_api_nlri_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3318,7 +3490,7 @@ func (x *LsAddrPrefix_LsNLRI) ProtoReflect() protoreflect.Message { // Deprecated: Use LsAddrPrefix_LsNLRI.ProtoReflect.Descriptor instead. func (*LsAddrPrefix_LsNLRI) Descriptor() ([]byte, []int) { - return file_api_nlri_proto_rawDescGZIP(), []int{33, 0} + return file_api_nlri_proto_rawDescGZIP(), []int{35, 0} } func (x *LsAddrPrefix_LsNLRI) GetNlri() isLsAddrPrefix_LsNLRI_Nlri { @@ -3373,6 +3545,15 @@ func (x *LsAddrPrefix_LsNLRI) GetSrv6Sid() *LsSrv6SIDNLRI { return nil } +func (x *LsAddrPrefix_LsNLRI) GetSrPolicyCandidatePath() *LsSrPolicyCandidatePathNLRI { + if x != nil { + if x, ok := x.Nlri.(*LsAddrPrefix_LsNLRI_SrPolicyCandidatePath); ok { + return x.SrPolicyCandidatePath + } + } + return nil +} + type isLsAddrPrefix_LsNLRI_Nlri interface { isLsAddrPrefix_LsNLRI_Nlri() } @@ -3397,6 +3578,10 @@ type LsAddrPrefix_LsNLRI_Srv6Sid struct { Srv6Sid *LsSrv6SIDNLRI `protobuf:"bytes,5,opt,name=srv6_sid,json=srv6Sid,proto3,oneof"` } +type LsAddrPrefix_LsNLRI_SrPolicyCandidatePath struct { + SrPolicyCandidatePath *LsSrPolicyCandidatePathNLRI `protobuf:"bytes,6,opt,name=sr_policy_candidate_path,json=srPolicyCandidatePath,proto3,oneof"` +} + func (*LsAddrPrefix_LsNLRI_Node) isLsAddrPrefix_LsNLRI_Nlri() {} func (*LsAddrPrefix_LsNLRI_Link) isLsAddrPrefix_LsNLRI_Nlri() {} @@ -3407,6 +3592,8 @@ func (*LsAddrPrefix_LsNLRI_PrefixV6) isLsAddrPrefix_LsNLRI_Nlri() {} func (*LsAddrPrefix_LsNLRI_Srv6Sid) isLsAddrPrefix_LsNLRI_Nlri() {} +func (*LsAddrPrefix_LsNLRI_SrPolicyCandidatePath) isLsAddrPrefix_LsNLRI_Nlri() {} + var File_api_nlri_proto protoreflect.FileDescriptor const file_api_nlri_proto_rawDesc = "" + @@ -3536,7 +3723,7 @@ const file_api_nlri_proto_rawDesc = "" + "\n" + "OpaqueNLRI\x12\x10\n" + "\x03key\x18\x01 \x01(\fR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\fR\x05value\"\x84\x02\n" + + "\x05value\x18\x02 \x01(\fR\x05value\"\xe6\x02\n" + "\x10LsNodeDescriptor\x12\x10\n" + "\x03asn\x18\x01 \x01(\rR\x03asn\x12\x1a\n" + "\tbgp_ls_id\x18\x02 \x01(\rR\abgpLsId\x12 \n" + @@ -3547,7 +3734,9 @@ const file_api_nlri_proto_rawDesc = "" + "pseudonode\x12\"\n" + "\rigp_router_id\x18\x05 \x01(\tR\vigpRouterId\x12\"\n" + "\rbgp_router_id\x18\x06 \x01(\tR\vbgpRouterId\x128\n" + - "\x18bgp_confederation_member\x18\a \x01(\rR\x16bgpConfederationMember\"\xc7\x02\n" + + "\x18bgp_confederation_member\x18\a \x01(\rR\x16bgpConfederationMember\x12/\n" + + "\x14local_router_id_ipv4\x18\b \x01(\tR\x11localRouterIdIpv4\x12/\n" + + "\x14local_router_id_ipv6\x18\t \x01(\tR\x11localRouterIdIpv6\"\xc7\x02\n" + "\x10LsLinkDescriptor\x12'\n" + "\rlink_local_id\x18\x01 \x01(\rH\x00R\vlinkLocalId\x88\x01\x01\x12)\n" + "\x0elink_remote_id\x18\x02 \x01(\rH\x01R\flinkRemoteId\x88\x01\x01\x12.\n" + @@ -3587,7 +3776,18 @@ const file_api_nlri_proto_rawDesc = "" + "\n" + "local_node\x18\x01 \x01(\v2\x15.api.LsNodeDescriptorR\tlocalNode\x12K\n" + "\x14srv6_sid_information\x18\x02 \x01(\v2\x19.api.LsSrv6SIDInformationR\x12srv6SidInformation\x12B\n" + - "\rmulti_topo_id\x18\x03 \x01(\v2\x1e.api.LsMultiTopologyIdentifierR\vmultiTopoId\"\xc7\x03\n" + + "\rmulti_topo_id\x18\x03 \x01(\v2\x1e.api.LsMultiTopologyIdentifierR\vmultiTopoId\"\xfa\x01\n" + + "!LsSrPolicyCandidatePathDescriptor\x12'\n" + + "\x0fprotocol_origin\x18\x01 \x01(\rR\x0eprotocolOrigin\x12\x1a\n" + + "\bendpoint\x18\x02 \x01(\tR\bendpoint\x12\x14\n" + + "\x05color\x18\x03 \x01(\rR\x05color\x12%\n" + + "\x0eoriginator_asn\x18\x04 \x01(\rR\roriginatorAsn\x12-\n" + + "\x12originator_address\x18\x05 \x01(\tR\x11originatorAddress\x12$\n" + + "\rdiscriminator\x18\x06 \x01(\rR\rdiscriminator\"\xb7\x01\n" + + "\x1bLsSrPolicyCandidatePathNLRI\x124\n" + + "\n" + + "local_node\x18\x01 \x01(\v2\x15.api.LsNodeDescriptorR\tlocalNode\x12b\n" + + "\x19candidate_path_descriptor\x18\x02 \x01(\v2&.api.LsSrPolicyCandidatePathDescriptorR\x17candidatePathDescriptor\"\xa4\x04\n" + "\fLsAddrPrefix\x12#\n" + "\x04type\x18\x01 \x01(\x0e2\x0f.api.LsNLRITypeR\x04type\x12,\n" + "\x04nlri\x18\x02 \x01(\v2\x18.api.LsAddrPrefix.LsNLRIR\x04nlri\x12\x16\n" + @@ -3596,13 +3796,14 @@ const file_api_nlri_proto_rawDesc = "" + "protocolId\x12\x1e\n" + "\n" + "identifier\x18\x05 \x01(\x04R\n" + - "identifier\x1a\xf7\x01\n" + + "identifier\x1a\xd4\x02\n" + "\x06LsNLRI\x12%\n" + "\x04node\x18\x01 \x01(\v2\x0f.api.LsNodeNLRIH\x00R\x04node\x12%\n" + "\x04link\x18\x02 \x01(\v2\x0f.api.LsLinkNLRIH\x00R\x04link\x122\n" + "\tprefix_v4\x18\x03 \x01(\v2\x13.api.LsPrefixV4NLRIH\x00R\bprefixV4\x122\n" + "\tprefix_v6\x18\x04 \x01(\v2\x13.api.LsPrefixV6NLRIH\x00R\bprefixV6\x12/\n" + - "\bsrv6_sid\x18\x05 \x01(\v2\x12.api.LsSrv6SIDNLRIH\x00R\asrv6SidB\x06\n" + + "\bsrv6_sid\x18\x05 \x01(\v2\x12.api.LsSrv6SIDNLRIH\x00R\asrv6Sid\x12[\n" + + "\x18sr_policy_candidate_path\x18\x06 \x01(\v2 .api.LsSrPolicyCandidatePathNLRIH\x00R\x15srPolicyCandidatePathB\x06\n" + "\x04nlri\"d\n" + "!MUPInterworkSegmentDiscoveryRoute\x12'\n" + "\x02rd\x18\x01 \x01(\v2\x17.api.RouteDistinguisherR\x02rd\x12\x16\n" + @@ -3643,15 +3844,16 @@ const file_api_nlri_proto_rawDesc = "" + "\x17endpoint_address_length\x18\x02 \x01(\rR\x15endpointAddressLength\x12)\n" + "\x10endpoint_address\x18\x03 \x01(\tR\x0fendpointAddress\x12\x12\n" + "\x04teid\x18\x04 \x01(\rR\x04teid\x12\x1f\n" + - "\x04tlvs\x18\x05 \x03(\v2\v.api.MUPTLVR\x04tlvs*\xab\x01\n" + + "\x04tlvs\x18\x05 \x03(\v2\v.api.MUPTLVR\x04tlvs*\xd6\x01\n" + "\n" + "LsNLRIType\x12\x1c\n" + "\x18LS_NLRI_TYPE_UNSPECIFIED\x10\x00\x12\x15\n" + "\x11LS_NLRI_TYPE_NODE\x10\x01\x12\x15\n" + "\x11LS_NLRI_TYPE_LINK\x10\x02\x12\x1a\n" + "\x16LS_NLRI_TYPE_PREFIX_V4\x10\x03\x12\x1a\n" + - "\x16LS_NLRI_TYPE_PREFIX_V6\x10\x04\x12\x19\n" + - "\x15LS_NLRI_TYPE_SRV6_SID\x10\x06*\xd4\x01\n" + + "\x16LS_NLRI_TYPE_PREFIX_V6\x10\x04\x12)\n" + + "%LS_NLRI_TYPE_SR_POLICY_CANDIDATE_PATH\x10\x05\x12\x19\n" + + "\x15LS_NLRI_TYPE_SRV6_SID\x10\x06*\xac\x02\n" + "\fLsProtocolID\x12\x1e\n" + "\x1aLS_PROTOCOL_ID_UNSPECIFIED\x10\x00\x12\x1a\n" + "\x16LS_PROTOCOL_ID_ISIS_L1\x10\x01\x12\x1a\n" + @@ -3659,7 +3861,10 @@ const file_api_nlri_proto_rawDesc = "" + "\x16LS_PROTOCOL_ID_OSPF_V2\x10\x03\x12\x19\n" + "\x15LS_PROTOCOL_ID_DIRECT\x10\x04\x12\x19\n" + "\x15LS_PROTOCOL_ID_STATIC\x10\x05\x12\x1a\n" + - "\x16LS_PROTOCOL_ID_OSPF_V3\x10\x06*\xfb\x01\n" + + "\x16LS_PROTOCOL_ID_OSPF_V3\x10\x06\x12\x16\n" + + "\x12LS_PROTOCOL_ID_BGP\x10\a\x12\x1a\n" + + "\x16LS_PROTOCOL_ID_RSVP_TE\x10\b\x12\"\n" + + "\x1eLS_PROTOCOL_ID_SEGMENT_ROUTING\x10\t*\xfb\x01\n" + "\x0fLsOspfRouteType\x12\"\n" + "\x1eLS_OSPF_ROUTE_TYPE_UNSPECIFIED\x10\x00\x12!\n" + "\x1dLS_OSPF_ROUTE_TYPE_INTRA_AREA\x10\x01\x12!\n" + @@ -3682,7 +3887,7 @@ func file_api_nlri_proto_rawDescGZIP() []byte { } var file_api_nlri_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_api_nlri_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_api_nlri_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_api_nlri_proto_goTypes = []any{ (LsNLRIType)(0), // 0: api.LsNLRIType (LsProtocolID)(0), // 1: api.LsProtocolID @@ -3720,19 +3925,21 @@ var file_api_nlri_proto_goTypes = []any{ (*LsSrv6SIDInformation)(nil), // 33: api.LsSrv6SIDInformation (*LsMultiTopologyIdentifier)(nil), // 34: api.LsMultiTopologyIdentifier (*LsSrv6SIDNLRI)(nil), // 35: api.LsSrv6SIDNLRI - (*LsAddrPrefix)(nil), // 36: api.LsAddrPrefix - (*MUPInterworkSegmentDiscoveryRoute)(nil), // 37: api.MUPInterworkSegmentDiscoveryRoute - (*MUPDirectSegmentDiscoveryRoute)(nil), // 38: api.MUPDirectSegmentDiscoveryRoute - (*MUPSessionParametersTLV)(nil), // 39: api.MUPSessionParametersTLV - (*MUPInterworkEndpointTLV)(nil), // 40: api.MUPInterworkEndpointTLV - (*MUPSourceAddressTLV)(nil), // 41: api.MUPSourceAddressTLV - (*MUPUnknownTLV)(nil), // 42: api.MUPUnknownTLV - (*MUPTLV)(nil), // 43: api.MUPTLV - (*MUPType1SessionTransformedRoute)(nil), // 44: api.MUPType1SessionTransformedRoute - (*MUPType2SessionTransformedRoute)(nil), // 45: api.MUPType2SessionTransformedRoute - (*LsAddrPrefix_LsNLRI)(nil), // 46: api.LsAddrPrefix.LsNLRI - (*RouteDistinguisher)(nil), // 47: api.RouteDistinguisher - (*RouteTarget)(nil), // 48: api.RouteTarget + (*LsSrPolicyCandidatePathDescriptor)(nil), // 36: api.LsSrPolicyCandidatePathDescriptor + (*LsSrPolicyCandidatePathNLRI)(nil), // 37: api.LsSrPolicyCandidatePathNLRI + (*LsAddrPrefix)(nil), // 38: api.LsAddrPrefix + (*MUPInterworkSegmentDiscoveryRoute)(nil), // 39: api.MUPInterworkSegmentDiscoveryRoute + (*MUPDirectSegmentDiscoveryRoute)(nil), // 40: api.MUPDirectSegmentDiscoveryRoute + (*MUPSessionParametersTLV)(nil), // 41: api.MUPSessionParametersTLV + (*MUPInterworkEndpointTLV)(nil), // 42: api.MUPInterworkEndpointTLV + (*MUPSourceAddressTLV)(nil), // 43: api.MUPSourceAddressTLV + (*MUPUnknownTLV)(nil), // 44: api.MUPUnknownTLV + (*MUPTLV)(nil), // 45: api.MUPTLV + (*MUPType1SessionTransformedRoute)(nil), // 46: api.MUPType1SessionTransformedRoute + (*MUPType2SessionTransformedRoute)(nil), // 47: api.MUPType2SessionTransformedRoute + (*LsAddrPrefix_LsNLRI)(nil), // 48: api.LsAddrPrefix.LsNLRI + (*RouteDistinguisher)(nil), // 49: api.RouteDistinguisher + (*RouteTarget)(nil), // 50: api.RouteTarget } var file_api_nlri_proto_depIdxs = []int32{ 4, // 0: api.NLRI.prefix:type_name -> api.IPAddressPrefix @@ -3750,32 +3957,32 @@ var file_api_nlri_proto_depIdxs = []int32{ 23, // 12: api.NLRI.flow_spec:type_name -> api.FlowSpecNLRI 24, // 13: api.NLRI.vpn_flow_spec:type_name -> api.VPNFlowSpecNLRI 25, // 14: api.NLRI.opaque:type_name -> api.OpaqueNLRI - 36, // 15: api.NLRI.ls_addr_prefix:type_name -> api.LsAddrPrefix + 38, // 15: api.NLRI.ls_addr_prefix:type_name -> api.LsAddrPrefix 15, // 16: api.NLRI.sr_policy:type_name -> api.SRPolicyNLRI - 37, // 17: api.NLRI.mup_interwork_segment_discovery:type_name -> api.MUPInterworkSegmentDiscoveryRoute - 38, // 18: api.NLRI.mup_direct_segment_discovery:type_name -> api.MUPDirectSegmentDiscoveryRoute - 44, // 19: api.NLRI.mup_type_1_session_transformed:type_name -> api.MUPType1SessionTransformedRoute - 45, // 20: api.NLRI.mup_type_2_session_transformed:type_name -> api.MUPType2SessionTransformedRoute - 47, // 21: api.VPLSNLRI.rd:type_name -> api.RouteDistinguisher - 47, // 22: api.EVPNEthernetAutoDiscoveryRoute.rd:type_name -> api.RouteDistinguisher + 39, // 17: api.NLRI.mup_interwork_segment_discovery:type_name -> api.MUPInterworkSegmentDiscoveryRoute + 40, // 18: api.NLRI.mup_direct_segment_discovery:type_name -> api.MUPDirectSegmentDiscoveryRoute + 46, // 19: api.NLRI.mup_type_1_session_transformed:type_name -> api.MUPType1SessionTransformedRoute + 47, // 20: api.NLRI.mup_type_2_session_transformed:type_name -> api.MUPType2SessionTransformedRoute + 49, // 21: api.VPLSNLRI.rd:type_name -> api.RouteDistinguisher + 49, // 22: api.EVPNEthernetAutoDiscoveryRoute.rd:type_name -> api.RouteDistinguisher 8, // 23: api.EVPNEthernetAutoDiscoveryRoute.esi:type_name -> api.EthernetSegmentIdentifier - 47, // 24: api.EVPNMACIPAdvertisementRoute.rd:type_name -> api.RouteDistinguisher + 49, // 24: api.EVPNMACIPAdvertisementRoute.rd:type_name -> api.RouteDistinguisher 8, // 25: api.EVPNMACIPAdvertisementRoute.esi:type_name -> api.EthernetSegmentIdentifier - 47, // 26: api.EVPNInclusiveMulticastEthernetTagRoute.rd:type_name -> api.RouteDistinguisher - 47, // 27: api.EVPNEthernetSegmentRoute.rd:type_name -> api.RouteDistinguisher + 49, // 26: api.EVPNInclusiveMulticastEthernetTagRoute.rd:type_name -> api.RouteDistinguisher + 49, // 27: api.EVPNEthernetSegmentRoute.rd:type_name -> api.RouteDistinguisher 8, // 28: api.EVPNEthernetSegmentRoute.esi:type_name -> api.EthernetSegmentIdentifier - 47, // 29: api.EVPNIPPrefixRoute.rd:type_name -> api.RouteDistinguisher + 49, // 29: api.EVPNIPPrefixRoute.rd:type_name -> api.RouteDistinguisher 8, // 30: api.EVPNIPPrefixRoute.esi:type_name -> api.EthernetSegmentIdentifier - 47, // 31: api.EVPNIPMSIRoute.rd:type_name -> api.RouteDistinguisher - 48, // 32: api.EVPNIPMSIRoute.rt:type_name -> api.RouteTarget - 47, // 33: api.LabeledVPNIPAddressPrefix.rd:type_name -> api.RouteDistinguisher - 48, // 34: api.RouteTargetMembershipNLRI.rt:type_name -> api.RouteTarget + 49, // 31: api.EVPNIPMSIRoute.rd:type_name -> api.RouteDistinguisher + 50, // 32: api.EVPNIPMSIRoute.rt:type_name -> api.RouteTarget + 49, // 33: api.LabeledVPNIPAddressPrefix.rd:type_name -> api.RouteDistinguisher + 50, // 34: api.RouteTargetMembershipNLRI.rt:type_name -> api.RouteTarget 20, // 35: api.FlowSpecComponent.items:type_name -> api.FlowSpecComponentItem 18, // 36: api.FlowSpecRule.ip_prefix:type_name -> api.FlowSpecIPPrefix 19, // 37: api.FlowSpecRule.mac:type_name -> api.FlowSpecMAC 21, // 38: api.FlowSpecRule.component:type_name -> api.FlowSpecComponent 22, // 39: api.FlowSpecNLRI.rules:type_name -> api.FlowSpecRule - 47, // 40: api.VPNFlowSpecNLRI.rd:type_name -> api.RouteDistinguisher + 49, // 40: api.VPNFlowSpecNLRI.rd:type_name -> api.RouteDistinguisher 22, // 41: api.VPNFlowSpecNLRI.rules:type_name -> api.FlowSpecRule 2, // 42: api.LsPrefixDescriptor.ospf_route_type:type_name -> api.LsOspfRouteType 26, // 43: api.LsNodeNLRI.local_node:type_name -> api.LsNodeDescriptor @@ -3789,29 +3996,32 @@ var file_api_nlri_proto_depIdxs = []int32{ 26, // 51: api.LsSrv6SIDNLRI.local_node:type_name -> api.LsNodeDescriptor 33, // 52: api.LsSrv6SIDNLRI.srv6_sid_information:type_name -> api.LsSrv6SIDInformation 34, // 53: api.LsSrv6SIDNLRI.multi_topo_id:type_name -> api.LsMultiTopologyIdentifier - 0, // 54: api.LsAddrPrefix.type:type_name -> api.LsNLRIType - 46, // 55: api.LsAddrPrefix.nlri:type_name -> api.LsAddrPrefix.LsNLRI - 1, // 56: api.LsAddrPrefix.protocol_id:type_name -> api.LsProtocolID - 47, // 57: api.MUPInterworkSegmentDiscoveryRoute.rd:type_name -> api.RouteDistinguisher - 47, // 58: api.MUPDirectSegmentDiscoveryRoute.rd:type_name -> api.RouteDistinguisher - 39, // 59: api.MUPTLV.session_parameters:type_name -> api.MUPSessionParametersTLV - 40, // 60: api.MUPTLV.interwork_endpoint:type_name -> api.MUPInterworkEndpointTLV - 41, // 61: api.MUPTLV.source_address:type_name -> api.MUPSourceAddressTLV - 42, // 62: api.MUPTLV.unknown:type_name -> api.MUPUnknownTLV - 47, // 63: api.MUPType1SessionTransformedRoute.rd:type_name -> api.RouteDistinguisher - 43, // 64: api.MUPType1SessionTransformedRoute.tlvs:type_name -> api.MUPTLV - 47, // 65: api.MUPType2SessionTransformedRoute.rd:type_name -> api.RouteDistinguisher - 43, // 66: api.MUPType2SessionTransformedRoute.tlvs:type_name -> api.MUPTLV - 29, // 67: api.LsAddrPrefix.LsNLRI.node:type_name -> api.LsNodeNLRI - 30, // 68: api.LsAddrPrefix.LsNLRI.link:type_name -> api.LsLinkNLRI - 31, // 69: api.LsAddrPrefix.LsNLRI.prefix_v4:type_name -> api.LsPrefixV4NLRI - 32, // 70: api.LsAddrPrefix.LsNLRI.prefix_v6:type_name -> api.LsPrefixV6NLRI - 35, // 71: api.LsAddrPrefix.LsNLRI.srv6_sid:type_name -> api.LsSrv6SIDNLRI - 72, // [72:72] is the sub-list for method output_type - 72, // [72:72] is the sub-list for method input_type - 72, // [72:72] is the sub-list for extension type_name - 72, // [72:72] is the sub-list for extension extendee - 0, // [0:72] is the sub-list for field type_name + 26, // 54: api.LsSrPolicyCandidatePathNLRI.local_node:type_name -> api.LsNodeDescriptor + 36, // 55: api.LsSrPolicyCandidatePathNLRI.candidate_path_descriptor:type_name -> api.LsSrPolicyCandidatePathDescriptor + 0, // 56: api.LsAddrPrefix.type:type_name -> api.LsNLRIType + 48, // 57: api.LsAddrPrefix.nlri:type_name -> api.LsAddrPrefix.LsNLRI + 1, // 58: api.LsAddrPrefix.protocol_id:type_name -> api.LsProtocolID + 49, // 59: api.MUPInterworkSegmentDiscoveryRoute.rd:type_name -> api.RouteDistinguisher + 49, // 60: api.MUPDirectSegmentDiscoveryRoute.rd:type_name -> api.RouteDistinguisher + 41, // 61: api.MUPTLV.session_parameters:type_name -> api.MUPSessionParametersTLV + 42, // 62: api.MUPTLV.interwork_endpoint:type_name -> api.MUPInterworkEndpointTLV + 43, // 63: api.MUPTLV.source_address:type_name -> api.MUPSourceAddressTLV + 44, // 64: api.MUPTLV.unknown:type_name -> api.MUPUnknownTLV + 49, // 65: api.MUPType1SessionTransformedRoute.rd:type_name -> api.RouteDistinguisher + 45, // 66: api.MUPType1SessionTransformedRoute.tlvs:type_name -> api.MUPTLV + 49, // 67: api.MUPType2SessionTransformedRoute.rd:type_name -> api.RouteDistinguisher + 45, // 68: api.MUPType2SessionTransformedRoute.tlvs:type_name -> api.MUPTLV + 29, // 69: api.LsAddrPrefix.LsNLRI.node:type_name -> api.LsNodeNLRI + 30, // 70: api.LsAddrPrefix.LsNLRI.link:type_name -> api.LsLinkNLRI + 31, // 71: api.LsAddrPrefix.LsNLRI.prefix_v4:type_name -> api.LsPrefixV4NLRI + 32, // 72: api.LsAddrPrefix.LsNLRI.prefix_v6:type_name -> api.LsPrefixV6NLRI + 35, // 73: api.LsAddrPrefix.LsNLRI.srv6_sid:type_name -> api.LsSrv6SIDNLRI + 37, // 74: api.LsAddrPrefix.LsNLRI.sr_policy_candidate_path:type_name -> api.LsSrPolicyCandidatePathNLRI + 75, // [75:75] is the sub-list for method output_type + 75, // [75:75] is the sub-list for method input_type + 75, // [75:75] is the sub-list for extension type_name + 75, // [75:75] is the sub-list for extension extendee + 0, // [0:75] is the sub-list for field type_name } func init() { file_api_nlri_proto_init() } @@ -3850,18 +4060,19 @@ func file_api_nlri_proto_init() { (*FlowSpecRule_Component)(nil), } file_api_nlri_proto_msgTypes[24].OneofWrappers = []any{} - file_api_nlri_proto_msgTypes[40].OneofWrappers = []any{ + file_api_nlri_proto_msgTypes[42].OneofWrappers = []any{ (*MUPTLV_SessionParameters)(nil), (*MUPTLV_InterworkEndpoint)(nil), (*MUPTLV_SourceAddress)(nil), (*MUPTLV_Unknown)(nil), } - file_api_nlri_proto_msgTypes[43].OneofWrappers = []any{ + file_api_nlri_proto_msgTypes[45].OneofWrappers = []any{ (*LsAddrPrefix_LsNLRI_Node)(nil), (*LsAddrPrefix_LsNLRI_Link)(nil), (*LsAddrPrefix_LsNLRI_PrefixV4)(nil), (*LsAddrPrefix_LsNLRI_PrefixV6)(nil), (*LsAddrPrefix_LsNLRI_Srv6Sid)(nil), + (*LsAddrPrefix_LsNLRI_SrPolicyCandidatePath)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -3869,7 +4080,7 @@ func file_api_nlri_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_nlri_proto_rawDesc), len(file_api_nlri_proto_rawDesc)), NumEnums: 3, - NumMessages: 44, + NumMessages: 46, NumExtensions: 0, NumServices: 0, }, diff --git a/cmd/gobgp/global.go b/cmd/gobgp/global.go index 272b4fc39..343426d5a 100644 --- a/cmd/gobgp/global.go +++ b/cmd/gobgp/global.go @@ -20,6 +20,7 @@ import ( "encoding/hex" "encoding/json" "fmt" + "math" "net" "net/netip" "regexp" @@ -2782,6 +2783,562 @@ func parseLsSRv6SIDNLRIType(args []string) (bgp.NLRI, *bgp.PathAttributeLs, erro return nlri, pathAttr, nil } +// lsParseUintArg parses the single value of an optional reserved parameter. +func lsParseUintArg(m map[string][]string, key string, bits int) (uint64, bool, error) { + v, ok := m[key] + if !ok || len(v) == 0 { + return 0, false, nil + } + n, err := strconv.ParseUint(v[0], 10, bits) + if err != nil { + return 0, false, fmt.Errorf("invalid %s: %v", key, err) + } + return n, true, nil +} + +// lsParseSegmentListArg parses one ":[,...]" token. All +// SIDs must be either MPLS labels (segment type A) or SRv6 SIDs (type B). +func lsParseSegmentListArg(arg string) (*bgp.LsSrSegmentList, error) { + weightStr, sidsStr, ok := strings.Cut(arg, ":") + if !ok { + return nil, fmt.Errorf("invalid segment-list %q: expected :[,...]", arg) + } + weight, err := strconv.ParseUint(weightStr, 10, 32) + if err != nil { + return nil, fmt.Errorf("invalid segment-list weight %q: %v", weightStr, err) + } + + sl := &bgp.LsSrSegmentList{ + Flags: bgp.LsSrSegmentListFlags{Explicit: true, Computed: true}, + Weight: uint32(weight), + } + for _, sidStr := range strings.Split(sidsStr, ",") { + seg := bgp.LsSrSegment{Flags: bgp.LsSrSegmentFlags{SIDPresent: true, Explicit: true}} + if addr, err := netip.ParseAddr(sidStr); err == nil && addr.Is6() && !addr.Is4In6() && addr.Zone() == "" { + seg.SegmentType = bgp.LS_SR_SEGMENT_TYPE_B_SRV6_SID + seg.SID = addr + } else { + label, err := strconv.ParseUint(sidStr, 10, 20) + if err != nil { + return nil, fmt.Errorf("invalid segment %q: expected an MPLS label or an SRv6 SID", sidStr) + } + seg.SegmentType = bgp.LS_SR_SEGMENT_TYPE_A_MPLS_LABEL + seg.Label = uint32(label) + } + sl.Segments = append(sl.Segments, seg) + } + + srv6 := sl.Segments[0].SegmentType == bgp.LS_SR_SEGMENT_TYPE_B_SRV6_SID + for _, seg := range sl.Segments { + if seg.SegmentType == bgp.LS_SR_SEGMENT_TYPE_B_SRV6_SID != srv6 { + return nil, fmt.Errorf("invalid segment-list %q: cannot mix MPLS labels and SRv6 SIDs", arg) + } + } + sl.Flags.SRv6 = srv6 + + return sl, nil +} + +// lsParseFlagLetters returns the set of upper-case flag letters in value, +// each of which must come from letters. +func lsParseFlagLetters(name, value, letters string) (map[rune]bool, error) { + set := map[rune]bool{} + for _, r := range strings.ToUpper(value) { + if !strings.ContainsRune(letters, r) { + return nil, fmt.Errorf("invalid %s %q: expected letters from %s", name, value, letters) + } + set[r] = true + } + return set, nil +} + +// lsParseEAGArg parses an Extended Administrative Group given as +// comma-separated 32-bit words, the first word holding bits 0 to 31. +func lsParseEAGArg(name, value string) ([]uint32, error) { + words := []uint32{} + for _, s := range strings.Split(value, ",") { + w, err := strconv.ParseUint(s, 0, 32) + if err != nil { + return nil, fmt.Errorf("invalid %s: %v", name, err) + } + words = append(words, uint32(w)) + } + if len(words) > 0xff { + return nil, fmt.Errorf("invalid %s: at most 255 words", name) + } + return words, nil +} + +// lsParseGroupArg parses [:...] of a disjoint or bidirectional +// group constraint. letters holds the permitted letters of each flags field. +func lsParseGroupArg(name, value string, letters ...string) (uint32, []map[rune]bool, error) { + parts := strings.Split(value, ":") + if len(parts) > 1+len(letters) { + return 0, nil, fmt.Errorf("invalid %s %q", name, value) + } + id, err := strconv.ParseUint(parts[0], 0, 32) + if err != nil { + return 0, nil, fmt.Errorf("invalid %s: %v", name, err) + } + flags := make([]map[rune]bool, len(letters)) + for i := range letters { + flags[i] = map[rune]bool{} + if i+1 < len(parts) { + if flags[i], err = lsParseFlagLetters(name, parts[i+1], letters[i]); err != nil { + return 0, nil, err + } + } + } + return uint32(id), flags, nil +} + +// lsParseSrPolicyConstraintsArgs builds the SR Candidate Path Constraints +// from the constraint-* arguments, or returns nil when none is given. +func lsParseSrPolicyConstraintsArgs(m map[string][]string) (*bgp.LsSrCandidatePathConstraints, error) { + present := false + for _, key := range []string{ + "constraint-flags", "constraint-mtid", "constraint-algorithm", + "constraint-exclude-any", "constraint-include-any", "constraint-include-all", + "constraint-srlg", "constraint-bandwidth", "constraint-disjoint-group", + "constraint-bidir-group", "constraint-metric", + } { + if len(m[key]) > 0 { + present = true + break + } + } + if !present { + return nil, nil + } + + c := &bgp.LsSrCandidatePathConstraints{} + if v := m["constraint-flags"]; len(v) > 0 { + set, err := lsParseFlagLetters("constraint-flags", v[0], "DPUATSFH") + if err != nil { + return nil, err + } + if set['P'] && set['U'] { + return nil, fmt.Errorf("constraint-flags P and U are mutually exclusive") + } + c.Flags = bgp.LsSrCandidatePathConstraintsFlags{ + SRv6: set['D'], + ProtectedOnly: set['P'], + UnprotectedOnly: set['U'], + AlgorithmOnly: set['A'], + TopologyOnly: set['T'], + Strict: set['S'], + Fixed: set['F'], + HopByHop: set['H'], + } + } + mtid, _, err := lsParseUintArg(m, "constraint-mtid", 16) + if err != nil { + return nil, err + } + c.MTID = uint16(mtid) + algorithm, _, err := lsParseUintArg(m, "constraint-algorithm", 8) + if err != nil { + return nil, err + } + c.Algorithm = uint8(algorithm) + + for _, key := range []string{"constraint-exclude-any", "constraint-include-any", "constraint-include-all"} { + v := m[key] + if len(v) == 0 { + continue + } + words, err := lsParseEAGArg(key, v[0]) + if err != nil { + return nil, err + } + if c.Affinity == nil { + c.Affinity = &bgp.LsSrAffinityConstraint{} + } + switch key { + case "constraint-exclude-any": + c.Affinity.ExcludeAny = words + case "constraint-include-any": + c.Affinity.IncludeAny = words + default: + c.Affinity.IncludeAll = words + } + } + + for _, s := range m["constraint-srlg"] { + srlg, err := strconv.ParseUint(s, 0, 32) + if err != nil { + return nil, fmt.Errorf("invalid constraint-srlg: %v", err) + } + c.SRLGs = append(c.SRLGs, uint32(srlg)) + } + + if v := m["constraint-bandwidth"]; len(v) > 0 { + bw, err := strconv.ParseFloat(v[0], 32) + if err != nil || bw < 0 || math.IsInf(bw, 0) || math.IsNaN(bw) { + return nil, fmt.Errorf("invalid constraint-bandwidth %q", v[0]) + } + f := float32(bw) + c.Bandwidth = &f + } + + if v := m["constraint-disjoint-group"]; len(v) > 0 { + id, flags, err := lsParseGroupArg("constraint-disjoint-group", v[0], "SNLFI", "SNLFIX") + if err != nil { + return nil, err + } + request, status := flags[0], flags[1] + c.DisjointGroup = &bgp.LsSrDisjointGroupConstraint{ + RequestFlags: bgp.LsSrDisjointGroupRequestFlags{ + SRLG: request['S'], + Node: request['N'], + Link: request['L'], + Fallback: request['F'], + BestPathFallback: request['I'], + }, + StatusFlags: bgp.LsSrDisjointGroupStatusFlags{ + SRLG: status['S'], + Node: status['N'], + Link: status['L'], + Fallback: status['F'], + BestPathFallback: status['I'], + Invalidated: status['X'], + }, + GroupID: id, + } + } + + if v := m["constraint-bidir-group"]; len(v) > 0 { + id, flags, err := lsParseGroupArg("constraint-bidir-group", v[0], "RC") + if err != nil { + return nil, err + } + c.BidirectionalGroup = &bgp.LsSrBidirectionalGroupConstraint{ + Flags: bgp.LsSrBidirectionalGroupFlags{Reverse: flags[0]['R'], CoRouted: flags[0]['C']}, + GroupID: id, + } + } + + for _, arg := range m["constraint-metric"] { + // [:[:[:]]] + parts := strings.Split(arg, ":") + if len(parts) > 4 { + return nil, fmt.Errorf("invalid constraint-metric %q", arg) + } + metricType, err := strconv.ParseUint(parts[0], 10, 8) + if err != nil { + return nil, fmt.Errorf("invalid constraint-metric type: %v", err) + } + metric := bgp.LsSrMetricConstraint{MetricType: uint8(metricType)} + if len(parts) > 1 { + set, err := lsParseFlagLetters("constraint-metric flags", parts[1], "OMAB") + if err != nil { + return nil, err + } + metric.Flags = bgp.LsSrMetricConstraintFlags{Optimization: set['O'], Margin: set['M'], Absolute: set['A'], Bound: set['B']} + } + values := []*uint32{&metric.Margin, &metric.Bound} + for i, s := range parts[2:] { + value, err := strconv.ParseUint(s, 10, 32) + if err != nil { + return nil, fmt.Errorf("invalid constraint-metric value: %v", err) + } + *values[i] = uint32(value) + } + c.Metrics = append(c.Metrics, metric) + } + + return c, nil +} + +func parseLsSrPolicyCandidatePathNLRIType(args []string) (bgp.NLRI, *bgp.PathAttributeLs, error) { + // Format: + // gobgp global rib add -a ls srpolicy [protocol 9] identifier local-router-id [local-asn ] [local-bgp-ls-id ] [local-bgp-router-id ] [local-igp-router-id ] [local-bgp-confederation-member ] endpoint color originator-asn originator-address discriminator [protocol-origin ] [policy-name ] [cp-name ] [bsid