srv6

package module
v0.0.0-...-d53b600 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 7 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalSRv6L3ServiceSubSubTLV

func UnmarshalSRv6L3ServiceSubSubTLV(b []byte) (map[uint8]*ServiceSubTLV, error)

UnmarshalSRv6L3ServiceSubSubTLV instantiates L3 Service Sub TLV

func UnmarshalSRv6L3ServiceSubTLV

func UnmarshalSRv6L3ServiceSubTLV(b []byte) (map[uint8]*ServiceSubTLV, error)

UnmarshalSRv6L3ServiceSubTLV instantiates L3 Service Sub TLV

Types

type BGPPeerNodeSID

type BGPPeerNodeSID struct {
	Flag    uint8
	Weight  uint8
	PeerASN uint32
	PeerID  []byte
}

BGPPeerNodeSID defines SRv6 BGP Peer Node SID TLV object No RFC yet

func UnmarshalSRv6BGPPeerNodeSIDTLV

func UnmarshalSRv6BGPPeerNodeSIDTLV(b []byte) (*BGPPeerNodeSID, error)

UnmarshalSRv6BGPPeerNodeSIDTLV builds SRv6 BGP Peer Node SID TLV object

type CapabilityTLV

type CapabilityTLV struct {
	Flag     uint16
	Reserved uint16
}

CapabilityTLV defines SRv6 Capability TLV object No RFC yet

func UnmarshalSRv6CapabilityTLV

func UnmarshalSRv6CapabilityTLV(b []byte) (*CapabilityTLV, error)

UnmarshalSRv6CapabilityTLV builds SRv6 Capability TLV object

type EndXSIDTLV

type EndXSIDTLV struct {
	EndpointBehavior uint16
	Flag             uint8
	Algorithm        uint8
	Weight           uint8
	Reserved         uint8
	SID              []byte
	SubTLV           map[uint16]base.TLV
}

EndXSIDTLV defines SRv6 End.X SID TLV object No RFC yet

func UnmarshalSRv6EndXSIDTLV

func UnmarshalSRv6EndXSIDTLV(b []byte) (*EndXSIDTLV, error)

UnmarshalSRv6EndXSIDTLV builds SRv6 End.X SID TLV object

type EndpointBehavior

type EndpointBehavior struct {
	EndpointBehavior uint16
	Flag             uint8
	Algorithm        uint8
}

EndpointBehavior defines SRv6 Endpoint Behavior TLV object No RFC yet

func UnmarshalSRv6EndpointBehaviorTLV

func UnmarshalSRv6EndpointBehaviorTLV(b []byte) (*EndpointBehavior, error)

UnmarshalSRv6EndpointBehaviorTLV builds SRv6 Endpoint Behavior TLV object

type InformationSubTLV

type InformationSubTLV struct {
	SID              []byte                   `json:"information_sub_tlv_sid,omitempty"`
	Flags            uint8                    `json:"information_sub_tlv_flags,omitempty"`
	EndpointBehavior uint16                   `json:"information_sub_tlv_endpoint_behavior,omitempty"`
	SubSubTLV        map[uint8]*ServiceSubTLV `json:"sub_sub_tlv,omitempty"`
}

InformationSubTLV defines a structure of SRv6 Information Sub TLV (type 1) https://tools.ietf.org/html/draft-dawra-bess-srv6-services-02#section-2.1.1

func UnmarshalInformationSubTLV

func UnmarshalInformationSubTLV(b []byte) (*InformationSubTLV, error)

UnmarshalInformationSubTLV instantiates Information SubT LV

type L2Service

type L2Service struct {
}

L2Service defines SRv6 L2 Service message structure https://tools.ietf.org/html/draft-dawra-bess-srv6-services-02#section-2

type L3Service

type L3Service struct {
	ServiceSubTLV map[uint8]*ServiceSubTLV `json:"service_sub_tlv,omitempty"`
}

L3Service defines SRv6 L3 Service message structure https://tools.ietf.org/html/draft-dawra-bess-srv6-services-02#section-2

func UnmarshalSRv6L3Service

func UnmarshalSRv6L3Service(b []byte) (*L3Service, error)

UnmarshalSRv6L3Service instantiate from the slice of byte SRv6 L3 Service Object

type LocatorTLV

type LocatorTLV struct {
	Flag      uint8
	Algorithm uint8
	Reserved  uint16
	Metric    uint32
	SubTLV    map[uint16]base.TLV
}

LocatorTLV defines SRv6 Locator TLV object No RFC yet

func UnmarshalSRv6LocatorTLV

func UnmarshalSRv6LocatorTLV(b []byte) (*LocatorTLV, error)

UnmarshalSRv6LocatorTLV builds SRv6 Locator TLV object

type SIDDescriptor

type SIDDescriptor struct {
	TLV                     []SIDInformationTLV
	MultiTopologyIdentifier *base.MultiTopologyIdentifierTLV
}

SIDDescriptor defines SRv6 SID Descriptor Object

func UnmarshalSRv6SIDDescriptor

func UnmarshalSRv6SIDDescriptor(b []byte) (*SIDDescriptor, error)

UnmarshalSRv6SIDDescriptor build SRv6 Descriptor Object

type SIDInformationTLV

type SIDInformationTLV struct {
	Type   uint16
	Length uint16
	SID    []byte
}

SIDInformationTLV defines SRv6 SID Information TLV

func UnmarshalSRv6SIDInformationTLV

func UnmarshalSRv6SIDInformationTLV(b []byte) ([]SIDInformationTLV, error)

UnmarshalSRv6SIDInformationTLV builds SRv6 SID Information TLV slice

type SIDNLRI

type SIDNLRI struct {
	ProtocolID    uint8
	Identifier    []byte
	LocalNode     *base.NodeDescriptor
	SRv6SID       *SIDDescriptor
	LocalNodeHash string
}

SIDNLRI defines SRv6 SID NLRI onject no RFC yet

func UnmarshalSRv6SIDNLRI

func UnmarshalSRv6SIDNLRI(b []byte) (*SIDNLRI, error)

UnmarshalSRv6SIDNLRI builds SRv6SIDNLRI NLRI object

func (*SIDNLRI) GetAllAttribute

func (sr *SIDNLRI) GetAllAttribute() []uint16

GetAllAttribute returns a slice with all attribute types found in SRv6 SID NLRI object

func (*SIDNLRI) GetSRv6SID

func (sr *SIDNLRI) GetSRv6SID() []string

GetSRv6SID returns a slice of SIDs

func (*SIDNLRI) GetSRv6SIDASN

func (sr *SIDNLRI) GetSRv6SIDASN() uint32

GetSRv6SIDASN returns Autonomous System Number used to uniqely identify BGP-LS domain

func (*SIDNLRI) GetSRv6SIDIGPRouterID

func (sr *SIDNLRI) GetSRv6SIDIGPRouterID() string

GetSRv6SIDIGPRouterID returns a value of a local node Descriptor TLV IGP Router ID

func (*SIDNLRI) GetSRv6SIDLSID

func (sr *SIDNLRI) GetSRv6SIDLSID() uint32

GetSRv6SIDLSID returns a value of Local Node Descriptor TLV BGP-LS Identifier

func (*SIDNLRI) GetSRv6SIDMTID

func (sr *SIDNLRI) GetSRv6SIDMTID() []uint16

GetSRv6SIDMTID returns Multi-Topology identifiers

func (*SIDNLRI) GetSRv6SIDProtocolID

func (sr *SIDNLRI) GetSRv6SIDProtocolID() string

GetSRv6SIDProtocolID returns a string representation of LinkNLRI ProtocolID field

type SIDStructure

type SIDStructure struct {
	LBLength  uint8
	LNLength  uint8
	FunLength uint8
	ArgLength uint8
}

SIDStructure defines SRv6 SID Structure TLV object No RFC yet

func UnmarshalSRv6SIDStructureTLV

func UnmarshalSRv6SIDStructureTLV(b []byte) (*SIDStructure, error)

UnmarshalSRv6SIDStructureTLV builds SRv6 SID Structure TLV object

type SIDStructureSubSubTLV

type SIDStructureSubSubTLV struct {
	LocalBlockLength    uint8 `json:"local_block_length,omitempty"`
	LocatorNodeLength   uint8 `json:"locator_node_length,omitempty"`
	FunctionLength      uint8 `json:"function_length,omitempty"`
	ArgumentLength      uint8 `json:"argument_length,omitempty"`
	TranspositionLength uint8 `json:"transposition_length,omitempty"`
	TranspositionOffset uint8 `json:"transposition_offset,omitempty"`
}

SIDStructureSubSubTLV defines a structure of SID's Structure Sub Sub TLV https://tools.ietf.org/html/draft-dawra-bess-srv6-services-02#section-2.1.2.1

func UnmarshalSIDStructureSubSubTLV

func UnmarshalSIDStructureSubSubTLV(b []byte) (*SIDStructureSubSubTLV, error)

UnmarshalSIDStructureSubSubTLV instantiates SID Structure Sub Sub TLV

type ServiceSubTLV

type ServiceSubTLV struct {
	Type   uint8       `json:"-"`
	Length uint16      `json:"-"`
	Value  interface{} `json:"key_value,omitempty"`
}

ServiceSubTLV defines SRv6 Service's TLV object, it is used as Service Sub TLV and Sub Sub TLV

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL