Documentation ¶
Overview ¶
Package vpp1901 contains wrappers over VPP (version 19.01) binary APIs to simplify their usage
Index ¶
- Constants
- type SRv6VppHandler
- func (h *SRv6VppHandler) AddLocalSid(localSID *srv6.LocalSID) error
- func (h *SRv6VppHandler) AddPolicy(policy *srv6.Policy) error
- func (h *SRv6VppHandler) AddPolicySegmentList(segmentList *srv6.Policy_SegmentList, policy *srv6.Policy) error
- func (h *SRv6VppHandler) AddSteering(steering *srv6.Steering) error
- func (h *SRv6VppHandler) DeleteLocalSid(localSID *srv6.LocalSID) error
- func (h *SRv6VppHandler) DeletePolicy(bindingSid net.IP) error
- func (h *SRv6VppHandler) DeletePolicySegmentList(segmentList *srv6.Policy_SegmentList, segmentVPPIndex uint32, ...) error
- func (h *SRv6VppHandler) RemoveSteering(steering *srv6.Steering) error
- func (h *SRv6VppHandler) RetrievePolicyIndexInfo(policy *srv6.Policy) (policyIndex uint32, segmentListIndexes map[*srv6.Policy_SegmentList]uint32, ...)
- func (h *SRv6VppHandler) SetEncapsSourceAddress(address string) error
Constants ¶
const ( BehaviorEnd uint8 = iota + 1 // Behavior of simple endpoint BehaviorX // Behavior of endpoint with Layer-3 cross-connect BehaviorT // Behavior of endpoint with specific IPv6 table lookup BehaviorDfirst // Unused. Separator in between regular and D BehaviorDX2 // Behavior of endpoint with decapulation and Layer-2 cross-connect (or DX2 with egress VLAN rewrite when VLAN notzero - not supported this variant yet) BehaviorDX6 // Behavior of endpoint with decapsulation and IPv6 cross-connect BehaviorDX4 // Behavior of endpoint with decapsulation and IPv4 cross-connect BehaviorDT6 // Behavior of endpoint with decapsulation and specific IPv6 table lookup BehaviorDT4 // Behavior of endpoint with decapsulation and specific IPv4 table lookup BehaviorLast // seems unused, note in VPP: "Must always be the last one" )
Constants for behavior function hardcoded into VPP (there can be also custom behavior functions implemented as VPP plugins) Constants are taken from VPP's vnet/srv6/sr.h (names are modified to Golang from original C form in VPP code)
const ( SteerTypeL2 uint8 = 2 SteerTypeIPv4 uint8 = 4 SteerTypeIPv6 uint8 = 6 )
Constants for steering type Constants are taken from VPP's vnet/srv6/sr.h (names are modified to Golang from original C form in VPP code)
const ( AddSRList uint8 = iota + 1 // Add SR List to an existing SR policy DeleteSRList // Delete SR List from an existing SR policy ModifyWeightOfSRList // Modify the weight of an existing SR List )
Constants for operation of SR policy modify binary API method
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SRv6VppHandler ¶
type SRv6VppHandler struct { vpe_vppcalls.VpeVppAPI // contains filtered or unexported fields }
SRv6VppHandler is accessor for SRv6-related vppcalls methods
func NewSRv6VppHandler ¶
func NewSRv6VppHandler(vppChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *SRv6VppHandler
NewSRv6VppHandler creates new instance of SRv6 vppcalls handler
func (*SRv6VppHandler) AddLocalSid ¶
func (h *SRv6VppHandler) AddLocalSid(localSID *srv6.LocalSID) error
AddLocalSid adds local sid <localSID> into VPP
func (*SRv6VppHandler) AddPolicy ¶
func (h *SRv6VppHandler) AddPolicy(policy *srv6.Policy) error
AddPolicy adds SRv6 policy <policy> into VPP (including all policy's segment lists).
func (*SRv6VppHandler) AddPolicySegmentList ¶
func (h *SRv6VppHandler) AddPolicySegmentList(segmentList *srv6.Policy_SegmentList, policy *srv6.Policy) error
AddPolicySegmentList adds segment list <segmentList> to SRv6 policy <policy> in VPP
func (*SRv6VppHandler) AddSteering ¶
func (h *SRv6VppHandler) AddSteering(steering *srv6.Steering) error
AddSteering sets in VPP steering into SRv6 policy.
func (*SRv6VppHandler) DeleteLocalSid ¶
func (h *SRv6VppHandler) DeleteLocalSid(localSID *srv6.LocalSID) error
DeleteLocalSid deletes local sid <localSID> in VPP
func (*SRv6VppHandler) DeletePolicy ¶
func (h *SRv6VppHandler) DeletePolicy(bindingSid net.IP) error
DeletePolicy deletes SRv6 policy given by binding SID <bindingSid>
func (*SRv6VppHandler) DeletePolicySegmentList ¶
func (h *SRv6VppHandler) DeletePolicySegmentList(segmentList *srv6.Policy_SegmentList, segmentVPPIndex uint32, policy *srv6.Policy) error
DeletePolicySegmentList removes segment list <segmentList> (with VPP-internal index <segmentVPPIndex>) from SRv6 policy <policy> in VPP
func (*SRv6VppHandler) RemoveSteering ¶
func (h *SRv6VppHandler) RemoveSteering(steering *srv6.Steering) error
RemoveSteering removes in VPP steering into SRv6 policy.
func (*SRv6VppHandler) RetrievePolicyIndexInfo ¶
func (h *SRv6VppHandler) RetrievePolicyIndexInfo(policy *srv6.Policy) (policyIndex uint32, segmentListIndexes map[*srv6.Policy_SegmentList]uint32, err error)
RetrievePolicyIndexInfo retrieves index of policy <policy> and its segment lists
func (*SRv6VppHandler) SetEncapsSourceAddress ¶
func (h *SRv6VppHandler) SetEncapsSourceAddress(address string) error
SetEncapsSourceAddress sets for SRv6 in VPP the source address used for encapsulated packet