Documentation ¶
Index ¶
- Constants
- func AppendByteSlices(byteSlices ...[]byte) []byte
- func Uint16ToByteSlice(input uint16) []byte
- func Uint32ToByteSlice(input uint32) []byte
- type AssocType
- type AssocTypeList
- type AssociationObject
- type BandwidthObject
- type CapabilityInterface
- type CloseMessage
- type CloseObject
- type CommonHeader
- type CommonObjectHeader
- type EndpointsObject
- type EroObject
- type EroSubobject
- type IPv4LspIdentifiers
- type IPv6LspIdentifiers
- type KeepaliveMessage
- type LspObject
- type LspaObject
- type Message
- type MetricObject
- type OpenMessage
- type OpenObject
- type Opt
- type PCErrMessage
- type PCInitiateMessage
- type PCRptMessage
- type PCUpdMessage
- type PathSetupType
- type PathSetupTypeCapability
- func (tlv *PathSetupTypeCapability) DecodeFromBytes(data []uint8) error
- func (tlv *PathSetupTypeCapability) Len() uint16
- func (tlv *PathSetupTypeCapability) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (tlv *PathSetupTypeCapability) Serialize() []uint8
- func (tlv *PathSetupTypeCapability) Type() uint16
- type PccType
- type PcepErrorObject
- type Pst
- type Psts
- type SREroSubobject
- type SRPceCapability
- type SRv6EroSubobject
- type SrpObject
- type StateReport
- type StatefulPceCapability
- func (tlv *StatefulPceCapability) DecodeFromBytes(data []uint8) error
- func (tlv *StatefulPceCapability) Len() uint16
- func (tlv *StatefulPceCapability) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (tlv *StatefulPceCapability) Serialize() []uint8
- func (tlv *StatefulPceCapability) Type() uint16
- type SymbolicPathName
- type TLVInterface
- type UndefinedTLV
- type VendorInformationObject
Constants ¶
const ( MT_RESERVED uint8 = 0x00 // RFC5440 MT_OPEN uint8 = 0x01 // RFC5440 MT_KEEPALIVE uint8 = 0x02 // RFC5440 MT_PCREQ uint8 = 0x03 // RFC5440 MT_PCREP uint8 = 0x04 // RFC5440 MT_NOTIFICATION uint8 = 0x05 // RFC5440 MT_ERROR uint8 = 0x06 // RFC5440 MT_CLOSE uint8 = 0x07 // RFC5440 MT_PCMONREQ uint8 = 0x08 // RFC5886 MT_PCMONREP uint8 = 0x09 // RFC5886 MT_REPORT uint8 = 0x0a // RFC8231 MT_UPDATE uint8 = 0x0b // RFC8281 MT_LSPINITREQ uint8 = 0x0c // RFC8281 MT_STARTTLS uint8 = 0x0d // RFC8253 )
const ( OC_RESERVED uint8 = 0x00 // RFC5440 OC_OPEN uint8 = 0x01 // RFC5440 OC_RP uint8 = 0x02 // RFC5440 OC_NO_PATH uint8 = 0x03 // RFC5440 OC_END_POINTS uint8 = 0x04 // RFC5440 OC_BANDWIDTH uint8 = 0x05 // RFC5440 OC_METRIC uint8 = 0x06 // RFC5440 OC_ERO uint8 = 0x07 // RFC5440 OC_RRO uint8 = 0x08 // RFC5440 OC_LSPA uint8 = 0x09 // RFC5440 OC_IRO uint8 = 0x0a // RFC5440 OC_SVRC uint8 = 0x0b // RFC5440 OC_NOTIFICATION uint8 = 0x0c // RFC5440 OC_PCEP_ERROR uint8 = 0x0d // RFC5440 OC_LOAD_BALANCING uint8 = 0x0e // RFC5440 OC_CLOSE uint8 = 0x0f // RFC5440 OC_PATH_KEY uint8 = 0x10 // RFC5520 OC_XRO uint8 = 0x11 // RFC5521 // 0x12 is Unassigned OC_MONITORING uint8 = 0x13 // RFC5886 OC_PCC_REQ_ID uint8 = 0x14 // RFC5886 OC_OF uint8 = 0x15 // RFC5541 OC_CLASSTYPE uint8 = 0x16 // RFC5455 // 0x17 is Unassigned OC_GLOBAL_CONSTRAINTS uint8 = 0x18 // RFC5557 OC_PCE_ID uint8 = 0x19 // RFC5886 OC_PROC_TIME uint8 = 0x1a // RFC5886 OC_OVERLOAD uint8 = 0x1b // RFC5886 OC_UNREACH_DESTINATION uint8 = 0x1c // RFC8306 OC_SERO uint8 = 0x1d // RFC8306 OC_SRRO uint8 = 0x1e // RFC8306 OC_BNC uint8 = 0x1f // RFC8306 OC_LSP uint8 = 0x20 // RFC8231 OC_SRP uint8 = 0x21 // RFC8231 OC_VENDOR_INFORMATION uint8 = 0x22 // RFC7470 OC_BU uint8 = 0x23 // RFC8233 OC_INTER_LAYER uint8 = 0x24 // RFC8282 OC_SWITCH_LAYER uint8 = 0x25 // RFC8282 OC_REQ_ADAP_CAP uint8 = 0x26 // RFC8282 OC_SERVER_INDICATION uint8 = 0x27 // RFC8282 OC_ASSOCIATION uint8 = 0x28 // RFC8697 OC_S2LS uint8 = 0x29 // RFC8623 OC_WA uint8 = 0x2a // RFC8780 OC_FLOWSPEC uint8 = 0x2b // RFC9168 OC_CCI_OBJECT_TYPE uint8 = 0x2c // RFC9050 OC_PATH_ATTRIB uint8 = 0x2d // draft-ietf-pce-multipath-07 )
const ( R_NO_EXPLANATION_PROVIDED uint8 = 0x01 R_DEADTIMER_EXPIRED uint8 = 0x02 R_RECEPTION_OF_A_MALFORMED_PCEP_MESSAGE uint8 = 0x03 )
const ( NT_ABSENT uint8 = 0x00 // RFC 8664 4.3.1 NT_IPV4_NODE uint8 = 0x01 // RFC 8664 4.3.1 NT_IPV6_NODE uint8 = 0x02 // RFC 8664 4.3.1 NT_IPV4_ADJACENCY uint8 = 0x03 // RFC 8664 4.3.1 NT_IPV6_ADJACENCY_GLOBAL uint8 = 0x04 // RFC 8664 4.3.1 NT_UNNUMBERED_ADJACENCY uint8 = 0x05 // RFC 8664 4.3.1 NT_IPV6_ADJACENCY_LINKLOCAL uint8 = 0x06 // RFC 8664 4.3.1 )
const ( NT_MUST_NOT_BE_INCLUDED uint8 = 0x00 // draft-ietf-pce-segment-routing-ipv6 4.3.1 NT_SRV6_NODE uint8 = 0x02 // draft-ietf-pce-segment-routing-ipv6 4.3.1 NT_SRV6_ADJACENCY_GLOBAL uint8 = 0x04 // draft-ietf-pce-segment-routing-ipv6 4.3.1 NT_SRV6_ADJACENCY_LINKLOCAL uint8 = 0x06 // draft-ietf-pce-segment-routing-ipv6 4.3.1 )
const ( OT_EP_IPV4 uint8 = 1 OT_EP_IPV6 uint8 = 2 )
END-POINTS Object (RFC5440 7.6)
const ( OT_ASSOC_IPV4 uint8 = 1 OT_ASSOC_IPV6 uint8 = 2 )
ASSOCIATION Object (RFC8697 6.)
const ( JUNIPER_SPEC_TLV_EXTENDED_ASSOCIATION_ID uint16 = 65507 JUNIPER_SPEC_TLV_SRPOLICY_CPATH_ID uint16 = 65508 JUNIPER_SPEC_TLV_SRPOLICY_CPATH_PREFERENCE uint16 = 65509 JUNIPER_SPEC_ASSOC_TYPE_SR_POLICY_ASSOCIATION uint16 = 65505 )
Juniper specific TLV (deprecated)
const ( EN_CISCO uint32 = 9 CISCO_SPEC_TLV_COLOR uint16 = 1 CISCO_SPEC_TLV_PREFERENCE uint16 = 3 CISCO_SPEC_TLV_COLOR_LENGTH uint16 = 4 CISCO_SPEC_TLV_PREFERENCE_LENGTH uint16 = 4 )
const ( TLV_RESERVED uint16 = 0x00 // RFC5440 TLV_NO_PATH_VECTOR uint16 = 0x01 // RFC5440 TLV_OVERLOAD_DURATION uint16 = 0x02 // RFC5440 TLV_REQ_MISSING uint16 = 0x03 // RFC5440 TLV_OF_LIST uint16 = 0x04 // RFC5541 TLV_ORDER uint16 = 0x05 // RFC5557 TLV_P2MP_CAPABLE uint16 = 0x06 // RFC8306 TLV_VENDOR_INFORMATION uint16 = 0x07 // RFC7470 TLV_WAVELENGTH_SELECTION uint16 = 0x08 // RFC8780 TLV_WAVELENGTH_RESTRICTION uint16 = 0x09 // RFC8780 TLV_WAVELENGTH_ALLOCATION uint16 = 0x0a // RFC8780 TLV_OPTICAL_INTERFACE_CLASS_LIST uint16 = 0x0b // RFC8780 TLV_CLIENT_SIGNAL_INFORMATION uint16 = 0x0c // RFC8780 TLV_H_PCE_CAPABILITY uint16 = 0x0d // RFC8685 TLV_DOMAIN_ID uint16 = 0x0e // RFC8685 TLV_H_PCE_FLAG uint16 = 0x0f // RFC8685 TLV_STATEFUL_PCE_CAPABILITY uint16 = 0x10 // RFC8231 TLV_SYMBOLIC_PATH_NAME uint16 = 0x11 // RFC8231 TLV_IPV4_LSP_IDENTIFIERS uint16 = 0x12 // RFC8231 TLV_IPV6_LSP_IDENTIFIERS uint16 = 0x13 // RFC8231 TLV_LSP_ERROR_CODE uint16 = 0x14 // RFC8231 TLV_RSVP_ERROR_SPEC uint16 = 0x15 // RFC8231 TLV_LSP_DB_VERSION uint16 = 0x17 // RFC8232 TLV_SPEAKER_ENTITY_ID uint16 = 0x18 // RFC8232 TLV_SR_PCE_CAPABILITY uint16 = 0x1a // RFC8664 TLV_PATH_SETUP_TYPE uint16 = 0x1c // RFC8408 TLV_OPERATOR_CONFIGURED_ASSOCIATION_RANGE uint16 = 0x1d // RFC8697 TLV_GLOBAL_ASSOCIATION_SOURCE uint16 = 0x1e // RFC8697 TLV_EXTENDED_ASSOCIATION_ID uint16 = 0x1f // RFC8697 TLV_P2MP_IPV4_LSP_IDENTIFIERS uint16 = 0x20 // RFC8623 TLV_P2MP_IPV6_LSP_IDENTIFIERS uint16 = 0x21 // RFC8623 TLV_PATH_SETUP_TYPE_CAPABILITY uint16 = 0x22 // RFC8409 TLV_ASSOC_TYPE_LIST uint16 = 0x23 // RFC8697 TLV_AUTO_BANDWIDTH_CAPABILITY uint16 = 0x24 // RFC8733 TLV_AUTO_BANDWIDTH_ATTRIBUTES uint16 = 0x25 // RFC8733 TLV_PATH_PROTECTION_ASSOCIATION_GROUP_TLV uint16 = 0x26 // RFC8745 TLV_IPV4_ADDRESS uint16 = 0x27 // RFC8779 TLV_IPV6_ADDRESS uint16 = 0x28 // RFC8779 TLV_UNNUMBERED_ENDPOINT uint16 = 0x29 // RFC8779 TLV_LABEL_REQUEST uint16 = 0x2a // RFC8779 TLV_LABEL_SET uint16 = 0x2b // RFC8779 TLV_PROTECTION_ATTRIBUTE uint16 = 0x2c // RFC8779 TLV_GMPLS_CAPABILITY uint16 = 0x2d // RFC8779 TLV_DISJOINTNESS_CONFIGURATION uint16 = 0x2e // RFC8800 TLV_DISJOINTNESS_STATUS uint16 = 0x2f // RFC8800 TLV_POLICY_PARAMETERSjTLV uint16 = 0x30 // RFC9005 TLV_SCHED_LSP_ATTRIBUTE uint16 = 0x31 // RFC8934 TLV_SCHED_PD_LSP_ATTRIBUTE uint16 = 0x32 // RFC8934 TLV_PCE_FLOWSPEC_CAPABILITY uint16 = 0x33 // ietf-pce-pcep-flowspec-12 TLV_FLOW_FILTER uint16 = 0x34 // ietf-pce-pcep-flowspec-12 TLV_L2_FLOW_FILTER uint16 = 0x35 // ietf-pce-pcep-flowspec-12 TLV_BIDIRECTIONAL_LSP_ASSOCIATION_GROUP uint16 = 0x36 // RFC9059 TLV_SRPOLICY_POL_NAME uint16 = 0x38 // ietf-pce-segment-routing-policy-cp-07 TLV_SRPOLICY_CPATH_ID uint16 = 0x39 // ietf-pce-segment-routing-policy-cp-07 TLV_SRPOLICY_CPATH_NAME uint16 = 0x3a // ietf-pce-segment-routing-policy-cp-07 TLV_SRPOLICY_CPATH_PREFERENCE uint16 = 0x3b // ietf-pce-segment-routing-policy-cp-07 )
const ( TLV_STATEFUL_PCE_CAPABILITY_LENGTH uint16 = 4 TLV_SR_PCE_CAPABILITY_LENGTH uint16 = 4 TLV_PATH_SETUP_TYPE_LENGTH uint16 = 4 TLV_EXTENDED_ASSOCIATION_ID_IPV4_LENGTH uint16 = 8 TLV_EXTENDED_ASSOCIATION_ID_IPV6_LENGTH uint16 = 20 TLV_IPV4_LSP_IDENTIFIERS_LENGTH uint16 = 16 TLV_IPV6_LSP_IDENTIFIERS_LENGTH uint16 = 52 TLV_SRPOLICY_CPATH_ID_LENGTH uint16 = 28 TLV_SRPOLICY_CPATH_PREFERENCE_LENGTH uint16 = 4 )
const (
ASSOC_TYPE_SR_POLICY_ASSOCIATION uint16 = 0x06
)
const COMMON_HEADER_LENGTH uint16 = 4
const COMMON_OBJECT_HEADER_LENGTH uint16 = 4
const ERO_SUBOBJECT_SR uint8 = 0x24
SR-ERO Subobject (RFC8664 4.3.1)
const ERO_SUBOBJECT_SRV6 uint8 = 0x28
SRv6-ERO Subobject (draft-ietf-pce-segment-routing-ipv6 4.3.1)
const (
OT_CLOSE_CLOSE uint8 = 0x01
)
Close Object (RFC5440 7.17)
const (
OT_ERO_EXPLICIT_ROUTE uint8 = 0x01
)
ERO Object (RFC5440 7.9)
const (
OT_ERROR_ERROR uint8 = 0x01
)
PCEP Error Object (RFC5440 7.15)
const (
OT_LSP_LSP uint8 = 0x01
)
LSP Object (RFC8281 5.3.1)
const (
OT_OPEN_OPEN uint8 = 0x01
)
OPEN Object (RFC5440 7.3)
const (
OT_SRP_SRP uint8 = 0x01
)
SRP Object (RFC8231 7.2)
const (
OT_VENDOR_SPECIFIC_CONSTRAINTS uint8 = 1
)
VENDOR-INFORMATION Object (RFC7470 4)
const TL_LENGTH = 4
Variables ¶
This section is empty.
Functions ¶
func AppendByteSlices ¶
AppendByteSlices concatenates byte slices into a single slice.
func Uint16ToByteSlice ¶ added in v1.2.1
Uint16ToByteSlice converts a uint16 value to a big-endian byte slice.
func Uint32ToByteSlice ¶ added in v1.2.1
Uint32ToByteSlice converts a uint32 value to a big-endian byte slice.
Types ¶
type AssocType ¶ added in v1.2.0
type AssocType uint16
const ( AT_RESERVED AssocType = 0x00 AT_PATH_PROTECTION_ASSOCIATION AssocType = 0x01 AT_DISCOINT_ASSOCIATION AssocType = 0x02 AT_POLICY_ASSOCIATION AssocType = 0x03 AT_SINGLE_SIDED_BIDIRECTIONAL_LSP_ASSOCIATION AssocType = 0x04 AT_DOUBLE_SIDED_BIDIRECTIONAL_LSP_ASSOCIATION AssocType = 0x05 AT_SR_POLICY_ASSOCIATION AssocType = 0x06 AT_VN_ASSOCIATION_TYPE AssocType = 0x07 )
type AssocTypeList ¶ added in v1.2.0
type AssocTypeList struct {
AssocTypes []AssocType
}
func (*AssocTypeList) DecodeFromBytes ¶ added in v1.2.0
func (tlv *AssocTypeList) DecodeFromBytes(data []uint8) error
func (*AssocTypeList) Len ¶ added in v1.2.0
func (tlv *AssocTypeList) Len() uint16
func (*AssocTypeList) MarshalLogObject ¶ added in v1.2.0
func (tlv *AssocTypeList) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*AssocTypeList) Serialize ¶ added in v1.2.0
func (tlv *AssocTypeList) Serialize() []uint8
func (*AssocTypeList) Type ¶ added in v1.2.0
func (tlv *AssocTypeList) Type() uint16
type AssociationObject ¶ added in v1.1.1
type AssociationObject struct { ObjectType uint8 RFlag bool AssocType uint16 AssocID uint16 AssocSrc netip.Addr TLVs []TLVInterface }
func NewAssociationObject ¶ added in v1.1.1
func (*AssociationObject) Color ¶ added in v1.1.1
func (o *AssociationObject) Color() uint32
(I.D. pce-segment-routing-policy-cp-08 5.1)
func (*AssociationObject) DecodeFromBytes ¶ added in v1.1.1
func (o *AssociationObject) DecodeFromBytes(typ uint8, objectBody []uint8) error
func (AssociationObject) Len ¶ added in v1.2.1
func (o AssociationObject) Len() (uint16, error)
func (*AssociationObject) Preference ¶ added in v1.1.1
func (o *AssociationObject) Preference() uint32
(I.D. pce-segment-routing-policy-cp-08 5.1)
func (*AssociationObject) Serialize ¶ added in v1.1.1
func (o *AssociationObject) Serialize() ([]uint8, error)
type BandwidthObject ¶
BANDWIDTH Object (RFC5440 7.7)
func (*BandwidthObject) DecodeFromBytes ¶
func (o *BandwidthObject) DecodeFromBytes(typ uint8, objectBody []uint8) error
type CapabilityInterface ¶ added in v1.2.0
type CapabilityInterface interface { TLVInterface }
func PolaCapability ¶ added in v1.2.0
func PolaCapability() []CapabilityInterface
type CloseMessage ¶ added in v1.2.1
type CloseMessage struct {
CloseObject *CloseObject
}
Close Message
func NewCloseMessage ¶ added in v1.2.1
func NewCloseMessage(reason uint8) (*CloseMessage, error)
func (*CloseMessage) DecodeFromBytes ¶ added in v1.2.1
func (m *CloseMessage) DecodeFromBytes(messageBody []uint8) error
func (*CloseMessage) Serialize ¶ added in v1.2.1
func (m *CloseMessage) Serialize() []uint8
type CloseObject ¶ added in v1.2.1
func NewCloseObject ¶ added in v1.2.1
func NewCloseObject(reason uint8) (*CloseObject, error)
func (*CloseObject) DecodeFromBytes ¶ added in v1.2.1
func (o *CloseObject) DecodeFromBytes(typ uint8, objectBody []uint8) error
func (*CloseObject) Len ¶ added in v1.2.1
func (o *CloseObject) Len() uint16
func (*CloseObject) Serialize ¶ added in v1.2.1
func (o *CloseObject) Serialize() []uint8
type CommonHeader ¶
type CommonHeader struct { Version uint8 // Current version is 1 Flag uint8 MessageType uint8 MessageLength uint16 }
Common header of PCEP Message
func NewCommonHeader ¶
func NewCommonHeader(messageType uint8, messageLength uint16) *CommonHeader
func (*CommonHeader) DecodeFromBytes ¶
func (h *CommonHeader) DecodeFromBytes(header []uint8) error
func (*CommonHeader) Serialize ¶
func (h *CommonHeader) Serialize() []uint8
type CommonObjectHeader ¶
type CommonObjectHeader struct { ObjectClass uint8 ObjectType uint8 ResFlags uint8 // MUST be set to zero PFlag bool // 0: optional, 1: MUST IFlag bool // 0: processed, 1: ignored ObjectLength uint16 }
func NewCommonObjectHeader ¶
func NewCommonObjectHeader(objectClass uint8, objectType uint8, messageLength uint16) *CommonObjectHeader
func (*CommonObjectHeader) DecodeFromBytes ¶
func (h *CommonObjectHeader) DecodeFromBytes(objectHeader []uint8) error
func (*CommonObjectHeader) Serialize ¶
func (h *CommonObjectHeader) Serialize() []uint8
type EndpointsObject ¶
func NewEndpointsObject ¶
func (EndpointsObject) Len ¶ added in v1.2.1
func (o EndpointsObject) Len() (uint16, error)
func (*EndpointsObject) Serialize ¶
func (o *EndpointsObject) Serialize() ([]uint8, error)
type EroObject ¶
type EroObject struct { ObjectType uint8 EroSubobjects []EroSubobject }
func (*EroObject) AddEroSubobjects ¶ added in v1.2.0
func (*EroObject) DecodeFromBytes ¶
func (*EroObject) ToSegmentList ¶ added in v1.2.0
type EroSubobject ¶ added in v1.2.0
type EroSubobject interface { DecodeFromBytes([]uint8) error Len() (uint16, error) Serialize() []uint8 ToSegment() table.Segment }
func NewEroSubobject ¶ added in v1.2.0
func NewEroSubobject(seg table.Segment) (EroSubobject, error)
type IPv4LspIdentifiers ¶ added in v1.2.0
type IPv4LspIdentifiers struct { IPv4TunnelSenderAddress netip.Addr IPv4TunnelEndpointAddress netip.Addr }
func (*IPv4LspIdentifiers) DecodeFromBytes ¶ added in v1.2.0
func (tlv *IPv4LspIdentifiers) DecodeFromBytes(data []uint8) error
func (*IPv4LspIdentifiers) Len ¶ added in v1.2.0
func (tlv *IPv4LspIdentifiers) Len() uint16
func (*IPv4LspIdentifiers) MarshalLogObject ¶ added in v1.2.0
func (tlv *IPv4LspIdentifiers) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*IPv4LspIdentifiers) Serialize ¶ added in v1.2.0
func (tlv *IPv4LspIdentifiers) Serialize() []uint8
func (*IPv4LspIdentifiers) Type ¶ added in v1.2.0
func (tlv *IPv4LspIdentifiers) Type() uint16
type IPv6LspIdentifiers ¶ added in v1.2.0
type IPv6LspIdentifiers struct { IPv6TunnelSenderAddress netip.Addr IPv6TunnelEndpointAddress netip.Addr }
func (*IPv6LspIdentifiers) DecodeFromBytes ¶ added in v1.2.0
func (tlv *IPv6LspIdentifiers) DecodeFromBytes(data []uint8) error
func (*IPv6LspIdentifiers) Len ¶ added in v1.2.0
func (tlv *IPv6LspIdentifiers) Len() uint16
func (*IPv6LspIdentifiers) MarshalLogObject ¶ added in v1.2.0
func (tlv *IPv6LspIdentifiers) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*IPv6LspIdentifiers) Serialize ¶ added in v1.2.0
func (tlv *IPv6LspIdentifiers) Serialize() []uint8
func (*IPv6LspIdentifiers) Type ¶ added in v1.2.0
func (tlv *IPv6LspIdentifiers) Type() uint16
type KeepaliveMessage ¶
type KeepaliveMessage struct { }
Keepalive Message
func NewKeepaliveMessage ¶
func NewKeepaliveMessage() (*KeepaliveMessage, error)
func (*KeepaliveMessage) Serialize ¶
func (m *KeepaliveMessage) Serialize() ([]uint8, error)
type LspObject ¶
type LspObject struct { ObjectType uint8 Name string SrcAddr netip.Addr DstAddr netip.Addr PlspID uint32 OFlag uint8 AFlag bool RFlag bool SFlag bool DFlag bool TLVs []TLVInterface }
func (*LspObject) DecodeFromBytes ¶
type LspaObject ¶
type LspaObject struct { ObjectType uint8 ExcludeAny uint32 IncludeAny uint32 IncludeAll uint32 SetupPriority uint8 HoldingPriority uint8 LFlag bool }
LSPA Object (RFC5440 7.11)
func (*LspaObject) DecodeFromBytes ¶
func (o *LspaObject) DecodeFromBytes(typ uint8, objectBody []uint8) error
func (*LspaObject) Serialize ¶
func (o *LspaObject) Serialize() []uint8
type MetricObject ¶
type MetricObject struct { ObjectType uint8 CFlag bool BFlag bool MetricType uint8 MetricValue uint32 }
METRIC Object (RFC5440 7.8)
func (*MetricObject) DecodeFromBytes ¶
func (o *MetricObject) DecodeFromBytes(typ uint8, objectBody []uint8) error
func (*MetricObject) Serialize ¶
func (o *MetricObject) Serialize() []uint8
type OpenMessage ¶
type OpenMessage struct {
OpenObject *OpenObject
}
Open Message
func NewOpenMessage ¶
func NewOpenMessage(sessionID uint8, keepalive uint8, capabilities []CapabilityInterface) (*OpenMessage, error)
func (*OpenMessage) DecodeFromBytes ¶ added in v1.1.1
func (m *OpenMessage) DecodeFromBytes(messageBody []uint8) error
func (*OpenMessage) Serialize ¶
func (m *OpenMessage) Serialize() ([]uint8, error)
type OpenObject ¶
type OpenObject struct { ObjectType uint8 Version uint8 Flag uint8 Keepalive uint8 Deadtime uint8 Sid uint8 Caps []CapabilityInterface }
func NewOpenObject ¶
func NewOpenObject(sessionID uint8, keepalive uint8, capabilities []CapabilityInterface) (*OpenObject, error)
func (*OpenObject) DecodeFromBytes ¶
func (o *OpenObject) DecodeFromBytes(typ uint8, objectBody []uint8) error
func (*OpenObject) Len ¶ added in v1.2.1
func (o *OpenObject) Len() uint16
func (*OpenObject) Serialize ¶
func (o *OpenObject) Serialize() []uint8
type PCErrMessage ¶ added in v1.2.1
type PCErrMessage struct {
PcepErrorObject *PcepErrorObject
}
PCErr Message
func NewPCErrMessage ¶ added in v1.2.1
func NewPCErrMessage(errorType uint8, errorValue uint8, tlvs []TLVInterface) (*PCErrMessage, error)
func (*PCErrMessage) DecodeFromBytes ¶ added in v1.2.1
func (m *PCErrMessage) DecodeFromBytes(messageBody []uint8) error
func (*PCErrMessage) Serialize ¶ added in v1.2.1
func (m *PCErrMessage) Serialize() []uint8
type PCInitiateMessage ¶
type PCInitiateMessage struct { SrpObject *SrpObject LspObject *LspObject EndpointsObject *EndpointsObject EroObject *EroObject AssociationObject *AssociationObject VendorInformationObject *VendorInformationObject }
PCInitiate Message
func NewPCInitiateMessage ¶
func (*PCInitiateMessage) Serialize ¶
func (m *PCInitiateMessage) Serialize() ([]uint8, error)
type PCRptMessage ¶
type PCRptMessage struct {
StateReports []*StateReport
}
PCRpt Message
func NewPCRptMessage ¶ added in v1.1.1
func NewPCRptMessage() *PCRptMessage
func (*PCRptMessage) DecodeFromBytes ¶
func (m *PCRptMessage) DecodeFromBytes(messageBody []uint8) error
type PCUpdMessage ¶
PCUpdate Message
func NewPCUpdMessage ¶
func (*PCUpdMessage) Serialize ¶
func (m *PCUpdMessage) Serialize() ([]uint8, error)
type PathSetupType ¶ added in v1.2.0
type PathSetupType struct {
PathSetupType Pst
}
func (*PathSetupType) DecodeFromBytes ¶ added in v1.2.0
func (tlv *PathSetupType) DecodeFromBytes(data []uint8) error
func (*PathSetupType) Len ¶ added in v1.2.0
func (tlv *PathSetupType) Len() uint16
func (*PathSetupType) MarshalLogObject ¶ added in v1.2.0
func (tlv *PathSetupType) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*PathSetupType) Serialize ¶ added in v1.2.0
func (tlv *PathSetupType) Serialize() []uint8
func (*PathSetupType) Type ¶ added in v1.2.0
func (tlv *PathSetupType) Type() uint16
type PathSetupTypeCapability ¶ added in v1.2.0
type PathSetupTypeCapability struct { PathSetupTypes Psts SubTLVs []TLVInterface }
func (*PathSetupTypeCapability) DecodeFromBytes ¶ added in v1.2.0
func (tlv *PathSetupTypeCapability) DecodeFromBytes(data []uint8) error
func (*PathSetupTypeCapability) Len ¶ added in v1.2.0
func (tlv *PathSetupTypeCapability) Len() uint16
func (*PathSetupTypeCapability) MarshalLogObject ¶ added in v1.2.0
func (tlv *PathSetupTypeCapability) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*PathSetupTypeCapability) Serialize ¶ added in v1.2.0
func (tlv *PathSetupTypeCapability) Serialize() []uint8
func (*PathSetupTypeCapability) Type ¶ added in v1.2.0
func (tlv *PathSetupTypeCapability) Type() uint16
type PccType ¶ added in v1.1.1
type PccType int
func DeterminePccType ¶ added in v1.2.0
func DeterminePccType(caps []CapabilityInterface) (pccType PccType)
Determine PCC type from capability
type PcepErrorObject ¶ added in v1.2.1
type PcepErrorObject struct { ObjectType uint8 ErrorType uint8 ErrorValue uint8 Tlvs []TLVInterface }
func NewPcepErrorObject ¶ added in v1.2.1
func NewPcepErrorObject(errorType uint8, errorValue uint8, tlvs []TLVInterface) (*PcepErrorObject, error)
func (*PcepErrorObject) DecodeFromBytes ¶ added in v1.2.1
func (o *PcepErrorObject) DecodeFromBytes(typ uint8, objectBody []uint8) error
func (*PcepErrorObject) Len ¶ added in v1.2.1
func (o *PcepErrorObject) Len() uint16
func (*PcepErrorObject) Serialize ¶ added in v1.2.1
func (o *PcepErrorObject) Serialize() []uint8
type SREroSubobject ¶ added in v1.2.0
type SREroSubobject struct { LFlag bool SubobjectType uint8 Length uint8 NaiType uint8 FFlag bool SFlag bool CFlag bool MFlag bool Segment table.SegmentSRMPLS Nai netip.Addr }
func NewSREroSubObject ¶ added in v1.2.0
func NewSREroSubObject(seg table.SegmentSRMPLS) (*SREroSubobject, error)
func (*SREroSubobject) DecodeFromBytes ¶ added in v1.2.0
func (o *SREroSubobject) DecodeFromBytes(subObj []uint8) error
func (*SREroSubobject) Len ¶ added in v1.2.1
func (o *SREroSubobject) Len() (uint16, error)
func (*SREroSubobject) Serialize ¶ added in v1.2.0
func (o *SREroSubobject) Serialize() []uint8
func (*SREroSubobject) ToSegment ¶ added in v1.2.0
func (o *SREroSubobject) ToSegment() table.Segment
type SRPceCapability ¶ added in v1.2.0
func (*SRPceCapability) DecodeFromBytes ¶ added in v1.2.0
func (tlv *SRPceCapability) DecodeFromBytes(data []uint8) error
func (*SRPceCapability) Len ¶ added in v1.2.0
func (tlv *SRPceCapability) Len() uint16
func (*SRPceCapability) MarshalLogObject ¶ added in v1.2.0
func (tlv *SRPceCapability) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*SRPceCapability) Serialize ¶ added in v1.2.0
func (tlv *SRPceCapability) Serialize() []uint8
func (*SRPceCapability) Type ¶ added in v1.2.0
func (tlv *SRPceCapability) Type() uint16
type SRv6EroSubobject ¶ added in v1.2.0
type SRv6EroSubobject struct { LFlag bool SubobjectType uint8 Length uint8 NaiType uint8 VFlag bool TFlag bool FFlag bool SFlag bool Behavior uint16 Segment table.SegmentSRv6 Nai netip.Addr }
func NewSRv6EroSubObject ¶ added in v1.2.0
func NewSRv6EroSubObject(seg table.SegmentSRv6) (*SRv6EroSubobject, error)
func (*SRv6EroSubobject) DecodeFromBytes ¶ added in v1.2.0
func (o *SRv6EroSubobject) DecodeFromBytes(subObj []uint8) error
func (*SRv6EroSubobject) Len ¶ added in v1.2.1
func (o *SRv6EroSubobject) Len() (uint16, error)
func (*SRv6EroSubobject) Serialize ¶ added in v1.2.0
func (o *SRv6EroSubobject) Serialize() []uint8
func (*SRv6EroSubobject) ToSegment ¶ added in v1.2.0
func (o *SRv6EroSubobject) ToSegment() table.Segment
type SrpObject ¶
type SrpObject struct { ObjectType uint8 RFlag bool SrpID uint32 // 0x00000000 and 0xFFFFFFFF are reserved. TLVs []TLVInterface }
func NewSrpObject ¶
func (*SrpObject) DecodeFromBytes ¶
type StateReport ¶ added in v1.2.0
type StateReport struct { SrpObject *SrpObject LspObject *LspObject EroObject *EroObject LspaObject *LspaObject MetricObjects []*MetricObject BandwidthObjects []*BandwidthObject AssociationObject *AssociationObject VendorInformationObject *VendorInformationObject }
func NewStateReport ¶ added in v1.2.0
func NewStateReport() (*StateReport, error)
func (*StateReport) ToSRPolicy ¶ added in v1.2.0
func (r *StateReport) ToSRPolicy(pcc PccType) table.SRPolicy
type StatefulPceCapability ¶ added in v1.2.0
type StatefulPceCapability struct { LspUpdateCapability bool IncludeDBVersion bool LspInstantiationCapability bool TriggeredResync bool DeltaLspSyncCapability bool TriggeredInitialSync bool }
func (*StatefulPceCapability) DecodeFromBytes ¶ added in v1.2.0
func (tlv *StatefulPceCapability) DecodeFromBytes(data []uint8) error
func (*StatefulPceCapability) Len ¶ added in v1.2.0
func (tlv *StatefulPceCapability) Len() uint16
func (*StatefulPceCapability) MarshalLogObject ¶ added in v1.2.0
func (tlv *StatefulPceCapability) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*StatefulPceCapability) Serialize ¶ added in v1.2.0
func (tlv *StatefulPceCapability) Serialize() []uint8
func (*StatefulPceCapability) Type ¶ added in v1.2.0
func (tlv *StatefulPceCapability) Type() uint16
type SymbolicPathName ¶ added in v1.2.0
type SymbolicPathName struct {
Name string
}
func (*SymbolicPathName) DecodeFromBytes ¶ added in v1.2.0
func (tlv *SymbolicPathName) DecodeFromBytes(data []uint8) error
func (*SymbolicPathName) Len ¶ added in v1.2.0
func (tlv *SymbolicPathName) Len() uint16
func (*SymbolicPathName) MarshalLogObject ¶ added in v1.2.0
func (tlv *SymbolicPathName) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*SymbolicPathName) Serialize ¶ added in v1.2.0
func (tlv *SymbolicPathName) Serialize() []uint8
func (*SymbolicPathName) Type ¶ added in v1.2.0
func (tlv *SymbolicPathName) Type() uint16
type TLVInterface ¶ added in v1.2.1
type TLVInterface interface { DecodeFromBytes(data []uint8) error Serialize() []uint8 MarshalLogObject(enc zapcore.ObjectEncoder) error Type() uint16 Len() uint16 // Total length of Type, Length, and Value }
func DecodeTLV ¶ added in v1.2.0
func DecodeTLV(data []uint8) (TLVInterface, error)
func DecodeTLVs ¶ added in v1.2.0
func DecodeTLVs(data []uint8) ([]TLVInterface, error)
type UndefinedTLV ¶ added in v1.2.1
func (*UndefinedTLV) DecodeFromBytes ¶ added in v1.2.1
func (tlv *UndefinedTLV) DecodeFromBytes(data []uint8) error
func (*UndefinedTLV) Len ¶ added in v1.2.1
func (tlv *UndefinedTLV) Len() uint16
func (*UndefinedTLV) MarshalLogObject ¶ added in v1.2.1
func (tlv *UndefinedTLV) MarshalLogObject(enc zapcore.ObjectEncoder) error
func (*UndefinedTLV) Serialize ¶ added in v1.2.1
func (tlv *UndefinedTLV) Serialize() []uint8
func (*UndefinedTLV) SetLength ¶ added in v1.2.1
func (tlv *UndefinedTLV) SetLength()
func (*UndefinedTLV) Type ¶ added in v1.2.1
func (tlv *UndefinedTLV) Type() uint16
type VendorInformationObject ¶
type VendorInformationObject struct { ObjectType uint8 // vendor specific constraints: 1 EnterpriseNumber uint32 TLVs []TLVInterface }
func NewVendorInformationObject ¶
func NewVendorInformationObject(vendor PccType, color uint32, preference uint32) (*VendorInformationObject, error)
func (*VendorInformationObject) Color ¶
func (o *VendorInformationObject) Color() uint32
func (*VendorInformationObject) DecodeFromBytes ¶
func (o *VendorInformationObject) DecodeFromBytes(typ uint8, objectBody []uint8) error
func (VendorInformationObject) Len ¶ added in v1.2.1
func (o VendorInformationObject) Len() uint16
func (*VendorInformationObject) Preference ¶
func (o *VendorInformationObject) Preference() uint32
func (*VendorInformationObject) Serialize ¶
func (o *VendorInformationObject) Serialize() []uint8