vppcalls

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package vppcalls contains wrappers over VPP ACL binary APIs.

Index

Constants

View Source
const (
	Icmpv4Proto = 1
	TCPProto    = 6
	UDPProto    = 17
	Icmpv6Proto = 58
)

Protocol types that can occur in ACLs

Variables

This section is empty.

Functions

func AddIPAcl

func AddIPAcl(rules []*acl.AccessLists_Acl_Rule, aclName string, log logging.Logger, vppChannel *api.Channel, timeLog measure.StopWatchEntry) (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 *api.Channel, timeLog measure.StopWatchEntry) (uint32, error)

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

func CheckMsgCompatibilityForACL

func CheckMsgCompatibilityForACL(log logging.Logger, vppChannel *govppapi.Channel) error

CheckMsgCompatibilityForACL checks if CRSs are compatible with VPP in runtime.

func DeleteIPAcl

func DeleteIPAcl(aclIndex uint32, log logging.Logger, vppChannel *api.Channel, timeLog measure.StopWatchEntry) error

DeleteIPAcl removes L3/L4 ACL.

func DeleteMacIPAcl

func DeleteMacIPAcl(aclIndex uint32, log logging.Logger, vppChannel *api.Channel, timeLog measure.StopWatchEntry) error

DeleteMacIPAcl removes L2 ACL.

func DumpInterface

func DumpInterface(swIndex uint32, vppChannel *api.Channel, timeLog measure.StopWatchEntry) (*acl_api.ACLInterfaceListDetails, error)

DumpInterface finds interface in VPP and returns its ACL configuration.

func DumpInterfaces

func DumpInterfaces(vppChannel *api.Channel, timeLog measure.StopWatchEntry) ([]*acl_api.ACLInterfaceListDetails, error)

DumpInterfaces finds all interfaces in VPP and returns their ACL configurations

func ModifyIPAcl

func ModifyIPAcl(aclIndex uint32, rules []*acl.AccessLists_Acl_Rule, aclName string, log logging.Logger,
	vppChannel *api.Channel, timeLog measure.StopWatchEntry) error

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

func RemoveIPEgressACLFromInterfaces

func RemoveIPEgressACLFromInterfaces(removedACLIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, log logging.Logger,
	vppChannel *api.Channel, stopwatch *measure.Stopwatch) error

RemoveIPEgressACLFromInterfaces removes ACL from interfaces.

func RemoveIPIngressACLFromInterfaces

func RemoveIPIngressACLFromInterfaces(removedACLIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, log logging.Logger,
	vppChannel *api.Channel, stopwatch *measure.Stopwatch) error

RemoveIPIngressACLFromInterfaces removes ACL from interfaces.

func RemoveMacIPIngressACLFromInterfaces

func RemoveMacIPIngressACLFromInterfaces(removedACLIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, log logging.Logger,
	vppChannel *api.Channel, timeLog measure.StopWatchEntry) error

RemoveMacIPIngressACLFromInterfaces removes L2 ACL from interfaces.

func SetACLToInterfacesAsEgress

func SetACLToInterfacesAsEgress(aclIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, log logging.Logger,
	vppChannel *api.Channel, stopwatch *measure.Stopwatch) error

SetACLToInterfacesAsEgress sets ACL to all provided interfaces as egress.

func SetACLToInterfacesAsIngress

func SetACLToInterfacesAsIngress(aclIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, log logging.Logger,
	vppChannel *api.Channel, stopwatch *measure.Stopwatch) error

SetACLToInterfacesAsIngress sets ACL to all provided interfaces as ingress.

func SetMacIPAclToInterface

func SetMacIPAclToInterface(aclIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, log logging.Logger,
	vppChannel *api.Channel, timeLog measure.StopWatchEntry) error

SetMacIPAclToInterface adds L2 ACL to interface.

Types

type ACLInterfaceLogicalReq added in v1.0.8

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

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

type ACLInterfacesVppCalls added in v1.0.8

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

ACLInterfacesVppCalls aggregates vpp calls related to the IP ACL interfaces

func NewACLInterfacesVppCalls added in v1.0.8

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

NewACLInterfacesVppCalls constructs IP ACL interfaces vpp calls object

func (*ACLInterfacesVppCalls) RemoveIPEgressACLFromInterfaces added in v1.0.8

func (acl *ACLInterfacesVppCalls) RemoveIPEgressACLFromInterfaces(ACLIndex uint32, interfaces []string, callback func(error), log logging.Logger) error

RemoveIPEgressACLFromInterfaces removes ACL from interfaces

func (*ACLInterfacesVppCalls) RemoveIPIngressACLFromInterfaces added in v1.0.8

func (acl *ACLInterfacesVppCalls) RemoveIPIngressACLFromInterfaces(ACLIndex uint32, interfaces []string, callback func(error), log logging.Logger) error

RemoveIPIngressACLFromInterfaces removes ACL from interfaces

func (*ACLInterfacesVppCalls) SetACLToInterfacesAsEgress added in v1.0.8

func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsEgress(ACLIndex uint32, interfaces []string, callback func(error), log logging.Logger) error

SetACLToInterfacesAsEgress sets ACL to all provided interfaces as egress

func (*ACLInterfacesVppCalls) SetACLToInterfacesAsIngress added in v1.0.8

func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsIngress(ACLIndex uint32, interfaces []string, callback func(error), log logging.Logger) error

SetACLToInterfacesAsIngress sets ACL to all provided interfaces as ingress

func (*ACLInterfacesVppCalls) WatchACLInterfacesReplies added in v1.0.8

func (acl *ACLInterfacesVppCalls) WatchACLInterfacesReplies(log logging.Logger)

WatchACLInterfacesReplies is meant to be used in go routine

Jump to

Keyboard shortcuts

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