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 *api.Channel, timeLog measure.StopWatchEntry) (*acl_api.ACLInterfaceListDetails, error)
- func DumpInterfaces(vppChannel *api.Channel, timeLog measure.StopWatchEntry) ([]*acl_api.ACLInterfaceListDetails, error)
- func ModifyIPAcl(aclIndex uint32, rules []*acl.AccessLists_Acl_Rule, aclName string, ...) error
- func RemoveIPEgressACLFromInterfaces(removedACLIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, ...) error
- func RemoveIPIngressACLFromInterfaces(removedACLIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, ...) error
- func RemoveMacIPIngressACLFromInterfaces(removedACLIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, ...) error
- func SetACLToInterfacesAsEgress(aclIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, ...) error
- func SetACLToInterfacesAsIngress(aclIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, ...) error
- func SetMacIPAclToInterface(aclIndex uint32, interfaces []string, swIfIndexes ifaceidx.SwIfIndex, ...) error
- type ACLInterfaceLogicalReq
- type ACLInterfacesVppCalls
- func (acl *ACLInterfacesVppCalls) RemoveIPEgressACLFromInterfaces(ACLIndex uint32, interfaces []string, callback func(error), log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) RemoveIPIngressACLFromInterfaces(ACLIndex uint32, interfaces []string, callback func(error), log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsEgress(ACLIndex uint32, interfaces []string, callback func(error), log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) SetACLToInterfacesAsIngress(ACLIndex uint32, interfaces []string, callback func(error), log logging.Logger) error
- func (acl *ACLInterfacesVppCalls) WatchACLInterfacesReplies(log logging.Logger)
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, 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 ¶
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.
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