Documentation ¶
Overview ¶
Package vppcalls contains wrappers over VPP ACL binary APIs.
Index ¶
- Constants
- func AddIPAcl(rules []*acl.AccessLists_Acl_Rule, aclName string, log logging.Logger, ...) (uint32, error)
- func AddMacIPAcl(rules []*acl.AccessLists_Acl_Rule, aclName string, log logging.Logger, ...) (uint32, error)
- func CheckMsgCompatibilityForACL(log logging.Logger, vppChannel *govppapi.Channel) error
- func DeleteIPAcl(aclIndex uint32, log logging.Logger, vppChannel *api.Channel, ...) error
- func DeleteMacIPAcl(aclIndex uint32, log logging.Logger, vppChannel *api.Channel, ...) error
- func DumpInterface(swIndex uint32, vppChannel VPPChannel, stopwatch *measure.Stopwatch) (*acl_api.ACLInterfaceListDetails, error)
- func DumpInterfaces(vppChannel VPPChannel, stopwatch *measure.Stopwatch) ([]*acl_api.ACLInterfaceListDetails, error)
- func ModifyIPAcl(aclIndex uint32, rules []*acl.AccessLists_Acl_Rule, aclName string, ...) error
- type ACLInterfaceLogicalReq
- type ACLInterfacesVppCalls
- func (acl *ACLInterfacesVppCalls) RemoveIPEgressACLFromInterfaces(ACLIndex uint32, ifIndices []uint32, log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) RemoveIPIngressACLFromInterfaces(ACLIndex uint32, ifIndices []uint32, log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) RemoveMacIPIngressACLFromInterfaces(removedACLIndex uint32, ifIndices []uint32, log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsEgress(ACLIndex uint32, ifIndices []uint32, log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsIngress(ACLIndex uint32, ifIndices []uint32, log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) SetMacIPAclToInterface(aclIndex uint32, ifIndices []uint32, log logging.Logger) error
- type VPPChannel
Constants ¶
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, 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 *api.Channel, stopwatch *measure.Stopwatch) (uint32, error)
AddMacIPAcl creates new L2 MAC IP ACL. VPP provides index in reply.
func CheckMsgCompatibilityForACL ¶
CheckMsgCompatibilityForACL checks if CRSs are compatible with VPP in runtime.
func DeleteIPAcl ¶
func DeleteIPAcl(aclIndex uint32, log logging.Logger, vppChannel *api.Channel, stopwatch *measure.Stopwatch) error
DeleteIPAcl removes L3/L4 ACL.
func DeleteMacIPAcl ¶
func DeleteMacIPAcl(aclIndex uint32, log logging.Logger, vppChannel *api.Channel, stopwatch *measure.Stopwatch) error
DeleteMacIPAcl removes L2 ACL.
func DumpInterface ¶
func DumpInterface(swIndex uint32, vppChannel VPPChannel, stopwatch *measure.Stopwatch) (*acl_api.ACLInterfaceListDetails, error)
DumpInterface finds interface in VPP and returns its ACL configuration.
func DumpInterfaces ¶
func DumpInterfaces(vppChannel VPPChannel, stopwatch *measure.Stopwatch) ([]*acl_api.ACLInterfaceListDetails, error)
DumpInterfaces finds all interfaces in VPP and returns their ACL configurations
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(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, ifIndices []uint32, log logging.Logger) error
RemoveIPEgressACLFromInterfaces removes ACL from interfaces
func (*ACLInterfacesVppCalls) RemoveIPIngressACLFromInterfaces ¶ added in v1.0.8
func (acl *ACLInterfacesVppCalls) RemoveIPIngressACLFromInterfaces(ACLIndex uint32, ifIndices []uint32, log logging.Logger) error
RemoveIPIngressACLFromInterfaces removes ACL from interfaces
func (*ACLInterfacesVppCalls) RemoveMacIPIngressACLFromInterfaces ¶ added in v1.4.0
func (acl *ACLInterfacesVppCalls) RemoveMacIPIngressACLFromInterfaces(removedACLIndex uint32, ifIndices []uint32, log logging.Logger) error
RemoveMacIPIngressACLFromInterfaces removes L2 ACL from interfaces.
func (*ACLInterfacesVppCalls) SetACLToInterfacesAsEgress ¶ added in v1.0.8
func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsEgress(ACLIndex uint32, ifIndices []uint32, 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, ifIndices []uint32, log logging.Logger) error
SetACLToInterfacesAsIngress sets ACL to all provided interfaces as ingress
func (*ACLInterfacesVppCalls) SetMacIPAclToInterface ¶ added in v1.4.0
func (acl *ACLInterfacesVppCalls) SetMacIPAclToInterface(aclIndex uint32, ifIndices []uint32, log logging.Logger) error
SetMacIPAclToInterface adds L2 ACL to interface.
type VPPChannel ¶ added in v1.4.0
type VPPChannel interface { SendRequest(msg govppapi.Message) *govppapi.RequestCtx SendMultiRequest(msg govppapi.Message) *govppapi.MultiRequestCtx }
VPPChannel is interface for send request to VPP channel