vppcalls

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 12 Imported by: 70

Documentation

Overview

Package vppcalls contains wrappers over VPP ACL binary APIs.

Index

Constants

This section is empty.

Variables

AclMessages is list of used VPP messages for compatibility check

Functions

func AddIPAcl

func AddIPAcl(rules []*acl.AccessLists_Acl_Rule, aclName string, log logging.Logger,
	vppChannel govppapi.Channel, stopwatch *measure.Stopwatch) (uint32, error)

AddIPAcl create new L3/4 ACL. Input index == 0xffffffff, VPP provides index in reply.

func AddMacIPAcl

func AddMacIPAcl(rules []*acl.AccessLists_Acl_Rule, aclName string, log logging.Logger,
	vppChannel govppapi.Channel, stopwatch *measure.Stopwatch) (uint32, error)

AddMacIPAcl creates new L2 MAC IP ACL. VPP provides index in reply.

func DeleteIPAcl

func DeleteIPAcl(aclIndex uint32, log logging.Logger, vppChannel govppapi.Channel, stopwatch *measure.Stopwatch) error

DeleteIPAcl removes L3/L4 ACL.

func DeleteMacIPAcl

func DeleteMacIPAcl(aclIndex uint32, log logging.Logger, vppChannel govppapi.Channel, stopwatch *measure.Stopwatch) error

DeleteMacIPAcl removes L2 ACL.

func GetAclPluginVersion

func GetAclPluginVersion(vppChannel govppapi.Channel, stopwatch *measure.Stopwatch) (string, error)

GetAclPluginVersion returns version of the VPP ACL plugin

func ModifyIPAcl

func ModifyIPAcl(aclIndex uint32, rules []*acl.AccessLists_Acl_Rule, aclName string, log logging.Logger,
	vppChannel govppapi.Channel, stopwatch *measure.Stopwatch) error

ModifyIPAcl uses index (provided by VPP) to identify ACL which is modified.

func ModifyMACIPAcl

func ModifyMACIPAcl(aclIndex uint32, rules []*acl.AccessLists_Acl_Rule, aclName string, log logging.Logger,
	vppChannel govppapi.Channel, stopwatch *measure.Stopwatch) error

ModifyMACIPAcl uses index (provided by VPP) to identify ACL which is modified.

Types

type ACLInterfaceLogicalReq

type ACLInterfaceLogicalReq struct {
	// contains filtered or unexported fields
}

ACLInterfaceLogicalReq groups multiple fields to not enumerate all of them in one function call

type ACLInterfacesVppCalls

type ACLInterfacesVppCalls struct {
	// contains filtered or unexported fields
}

ACLInterfacesVppCalls aggregates vpp calls related to the IP ACL interfaces

func NewACLInterfacesVppCalls

func NewACLInterfacesVppCalls(log logging.Logger, vppChan govppapi.Channel, swIfIndexes ifaceidx.SwIfIndex, stopwatch *measure.Stopwatch) *ACLInterfacesVppCalls

NewACLInterfacesVppCalls constructs IP ACL interfaces vpp calls object

func (*ACLInterfacesVppCalls) RemoveIPEgressACLFromInterfaces

func (acl *ACLInterfacesVppCalls) RemoveIPEgressACLFromInterfaces(ACLIndex uint32, ifIndices []uint32) error

RemoveIPEgressACLFromInterfaces removes ACL from interfaces

func (*ACLInterfacesVppCalls) RemoveIPIngressACLFromInterfaces

func (acl *ACLInterfacesVppCalls) RemoveIPIngressACLFromInterfaces(ACLIndex uint32, ifIndices []uint32) error

RemoveIPIngressACLFromInterfaces removes ACL from interfaces

func (*ACLInterfacesVppCalls) RemoveMacIPIngressACLFromInterfaces

func (acl *ACLInterfacesVppCalls) RemoveMacIPIngressACLFromInterfaces(removedACLIndex uint32, ifIndices []uint32) error

RemoveMacIPIngressACLFromInterfaces removes L2 ACL from interfaces.

func (*ACLInterfacesVppCalls) SetACLToInterfacesAsEgress

func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsEgress(ACLIndex uint32, ifIndices []uint32) error

SetACLToInterfacesAsEgress sets ACL to all provided interfaces as egress

func (*ACLInterfacesVppCalls) SetACLToInterfacesAsIngress

func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsIngress(ACLIndex uint32, ifIndices []uint32) error

SetACLToInterfacesAsIngress sets ACL to all provided interfaces as ingress

func (*ACLInterfacesVppCalls) SetMacIPAclToInterface

func (acl *ACLInterfacesVppCalls) SetMacIPAclToInterface(aclIndex uint32, ifIndices []uint32) error

SetMacIPAclToInterface adds L2 ACL to interface.

Jump to

Keyboard shortcuts

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