Documentation ¶
Index ¶
- Constants
- func DpWorkSingle(dp *DpH, m interface{}) DpRetT
- func DpWorker(dp *DpH, f chan int, ch chan interface{})
- func FLBInit(dpHook DpHookInterface, sigCh chan os.Signal, shutdown func()) bool
- func FLBRun()
- func FileCreate(fname string) int
- func FileExists(fname string) bool
- func GetFlagToString(flag int) string
- func GratArpReq(AdvIP net.IP, ifName string) (int, error)
- func GratArpReqWithCtx(ctx context.Context, rCh chan<- int, AdvIP net.IP, ifName string) (int, error)
- func HTTPSProber(urls string, cert tls.Certificate, certPool *x509.CertPool, resp string) bool
- func Ifa2String(ifa *Ifa, it IterIntf)
- func IfaMkString(ifa *Ifa, v4 bool) string
- func IsIPHostAddr(ipString string) bool
- func LogString2Level(logStr string) tk.LogLevelT
- func MirrInfoCmp(mInfo1, mInfo2 *cmn.MirrInfo) bool
- func MirrInfoValidate(mInfo *cmn.MirrInfo) bool
- func MirrObjValidate(mObj *cmn.MirrObj) bool
- func Neigh2String(ne *Neigh, it IterIntf)
- func PolInfoXlateValidate(pInfo *cmn.PolInfo) bool
- func PolObjValidate(pObj *cmn.PolObj) bool
- func ReadPIDFile(pf string) int
- func Rt2String(rt *Rt) string
- func RunCommand(command string, isFatal bool) (int, error)
- func Us2String(us *UserSess) string
- func VlanValid(vlanID int) bool
- type DpH
- func (dp *DpH) DpMapGetCt4() []cmn.CtInfo
- func (dp *DpH) DpWorkOnFw(fWq *FwDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnL2Addr(pWq *L2AddrDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnMirr(mWq *MirrDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnNatLb(nWq *NatDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnNextHop(nhWq *NextHopDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnPol(pWq *PolDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnPort(pWq *PortDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnRoute(rtWq *RouteDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnRtMac(rmWq *RouterMacDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnStat(nWq *StatDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnTableOp(nWq *TableDpWorkQ) (DpRetT, error)
- func (dp *DpH) DpWorkOnUlCl(nWq *UlClDpWorkQ) DpRetT
- type DpHookInterface
- type FdbAttr
- type FdbEnt
- type FdbKey
- type FdbStat
- type FdbTunAttr
- type Ifa
- type IfaEnt
- type IfaKey
- type IterIntf
- type L2H
- func (l2 *L2H) FdbTicker(f *FdbEnt)
- func (l2 *L2H) Fdbs2String(it IterIntf) error
- func (l2 *L2H) FdbsTicker()
- func (l2 *L2H) L2DestructAll()
- func (l2 *L2H) L2FdbAdd(key FdbKey, attr FdbAttr) (int, error)
- func (l2 *L2H) L2FdbDel(key FdbKey) (int, error)
- func (l2 *L2H) L2FdbFind(key FdbKey) *FdbEnt
- func (l2 *L2H) PortNotifier(name string, osID int, evType PortEvent)
- type L3H
- func (l3 *L3H) IfObjMkString(obj string, v4 bool) string
- func (l3 *L3H) IfaAdd(Obj string, Cidr string) (int, error)
- func (l3 *L3H) IfaDelete(Obj string, Cidr string) (int, error)
- func (l3 *L3H) IfaDeleteAll(Obj string) (int, error)
- func (l3 *L3H) IfaFind(Obj string, addr net.IP) (int, net.IP)
- func (l3 *L3H) IfaFindAny(addr net.IP) (int, net.IP)
- func (l3 *L3H) IfaGet() []cmn.IPAddrGet
- func (l3 *L3H) IfaSelect(Obj string, addr net.IP, findAny bool) (int, net.IP, string)
- func (l3 *L3H) IfaSelectAny(addr net.IP, findAny bool) (int, net.IP, string)
- func (l3 *L3H) Ifas2String(it IterIntf) error
- type MirrAttachObjT
- type MirrEntry
- type MirrH
- func (M *MirrH) MirrAdd(name string, mInfo cmn.MirrInfo, mObjArgs cmn.MirrObj) (int, error)
- func (M *MirrH) MirrDelete(name string) (int, error)
- func (M *MirrH) MirrDestructAll()
- func (M *MirrH) MirrGet() ([]cmn.MirrGetMod, error)
- func (M *MirrH) MirrPortDelete(name string)
- func (M *MirrH) MirrTicker()
- type MirrKey
- type MirrObjInfo
- type MirrStats
- type Neigh
- type NeighAttr
- type NeighH
- func (n *NeighH) Activate(ne *Neigh)
- func (n *NeighH) NeighAdd(Addr net.IP, Zone string, Attr NeighAttr) (int, error)
- func (n *NeighH) NeighAddTunEP(ne *Neigh, rIP net.IP, sIP net.IP, tunID uint32, tunType DpTunT, sync bool) (int, *NeighTunEp)
- func (n *NeighH) NeighDelAllTunEP(ne *Neigh) int
- func (n *NeighH) NeighDelete(Addr net.IP, Zone string) (int, error)
- func (n *NeighH) NeighDeleteByPort(port string)
- func (n *NeighH) NeighDestructAll()
- func (n *NeighH) NeighFind(Addr net.IP, Zone string) (*Neigh, int)
- func (n *NeighH) NeighGet() ([]cmn.NeighMod, error)
- func (n *NeighH) NeighPairRt(ne *Neigh, rt *Rt) int
- func (n *NeighH) NeighRecursiveResolve(ne *Neigh) bool
- func (n *NeighH) NeighTicker(ne *Neigh)
- func (n *NeighH) NeighUnPairRt(ne *Neigh, rt *Rt) int
- func (n *NeighH) Neighs2String(it IterIntf) error
- func (n *NeighH) NeighsTicker()
- func (n *NeighH) PortNotifier(name string, osID int, evType PortEvent)
- type NeighKey
- type NeighTunEp
- type NetAPIStruct
- func (na *NetAPIStruct) NetAddrAdd(am *cmn.IPAddrMod) (int, error)
- func (na *NetAPIStruct) NetAddrDel(am *cmn.IPAddrMod) (int, error)
- func (na *NetAPIStruct) NetAddrGet() ([]cmn.IPAddrGet, error)
- func (na *NetAPIStruct) NetCtInfoGet() ([]cmn.CtInfo, error)
- func (na *NetAPIStruct) NetEpHostAdd(em *cmn.EndPointMod) (int, error)
- func (na *NetAPIStruct) NetEpHostDel(em *cmn.EndPointMod) (int, error)
- func (na *NetAPIStruct) NetEpHostGet() ([]cmn.EndPointMod, error)
- func (na *NetAPIStruct) NetFdbAdd(fm *cmn.FdbMod) (int, error)
- func (na *NetAPIStruct) NetFdbDel(fm *cmn.FdbMod) (int, error)
- func (na *NetAPIStruct) NetFwRuleAdd(fm *cmn.FwRuleMod) (int, error)
- func (na *NetAPIStruct) NetFwRuleDel(fm *cmn.FwRuleMod) (int, error)
- func (na *NetAPIStruct) NetFwRuleGet() ([]cmn.FwRuleMod, error)
- func (na *NetAPIStruct) NetLbRuleAdd(lm *cmn.LbRuleMod) (int, error)
- func (na *NetAPIStruct) NetLbRuleDel(lm *cmn.LbRuleMod) (int, error)
- func (na *NetAPIStruct) NetLbRuleGet() ([]cmn.LbRuleMod, error)
- func (*NetAPIStruct) NetMirrorAdd(mm *cmn.MirrMod) (int, error)
- func (*NetAPIStruct) NetMirrorDel(mm *cmn.MirrMod) (int, error)
- func (*NetAPIStruct) NetMirrorGet() ([]cmn.MirrGetMod, error)
- func (na *NetAPIStruct) NetNeighAdd(nm *cmn.NeighMod) (int, error)
- func (na *NetAPIStruct) NetNeighDel(nm *cmn.NeighMod) (int, error)
- func (na *NetAPIStruct) NetNeighGet() ([]cmn.NeighMod, error)
- func (na *NetAPIStruct) NetPolicerAdd(pm *cmn.PolMod) (int, error)
- func (na *NetAPIStruct) NetPolicerDel(pm *cmn.PolMod) (int, error)
- func (na *NetAPIStruct) NetPolicerGet() ([]cmn.PolMod, error)
- func (na *NetAPIStruct) NetPortAdd(pm *cmn.PortMod) (int, error)
- func (na *NetAPIStruct) NetPortDel(pm *cmn.PortMod) (int, error)
- func (*NetAPIStruct) NetPortGet() ([]cmn.PortDump, error)
- func (na *NetAPIStruct) NetRouteAdd(rm *cmn.RouteMod) (int, error)
- func (na *NetAPIStruct) NetRouteDel(rm *cmn.RouteMod) (int, error)
- func (na *NetAPIStruct) NetRouteGet() ([]cmn.RouteGet, error)
- func (na *NetAPIStruct) NetSessionAdd(sm *cmn.SessionMod) (int, error)
- func (na *NetAPIStruct) NetSessionDel(sm *cmn.SessionMod) (int, error)
- func (na *NetAPIStruct) NetSessionGet() ([]cmn.SessionMod, error)
- func (na *NetAPIStruct) NetSessionUlClAdd(sr *cmn.SessionUlClMod) (int, error)
- func (na *NetAPIStruct) NetSessionUlClDel(sr *cmn.SessionUlClMod) (int, error)
- func (na *NetAPIStruct) NetSessionUlClGet() ([]cmn.SessionUlClMod, error)
- func (na *NetAPIStruct) NetVlanAdd(vm *cmn.VlanMod) (int, error)
- func (na *NetAPIStruct) NetVlanDel(vm *cmn.VlanMod) (int, error)
- func (na *NetAPIStruct) NetVlanGet() ([]cmn.VlanGet, error)
- func (na *NetAPIStruct) NetVlanPortAdd(vm *cmn.VlanPortMod) (int, error)
- func (na *NetAPIStruct) NetVlanPortDel(vm *cmn.VlanPortMod) (int, error)
- type NhType
- type PolAttachObjT
- type PolEntry
- type PolH
- type PolKey
- type PolObjInfo
- type PolStats
- type Port
- type PortEvent
- type PortEventIntf
- type PortHwInfo
- type PortLayer2Info
- type PortLayer3Info
- type PortStatsInfo
- type PortSwInfo
- type PortsH
- func (P *PortsH) PortAdd(name string, osid int, ptype int, zone string, hwi PortHwInfo, ...) (int, error)
- func (P *PortsH) PortDel(name string, ptype int) (int, error)
- func (P *PortsH) PortDestructAll()
- func (P *PortsH) PortFindByName(name string) (p *Port)
- func (P *PortsH) PortFindByOSID(osID int) (p *Port)
- func (P *PortsH) PortGetSlaves(master string) (int, []*Port)
- func (P *PortsH) PortHasTunSlaves(master string, ptype int) (bool, []*Port)
- func (P *PortsH) PortL2AddrMatch(name string, mp *Port) bool
- func (P *PortsH) PortNotifierRegister(notifier PortEventIntf)
- func (P *PortsH) PortTicker()
- func (P *PortsH) PortUpdateProp(name string, prop cmn.PortProp, zone string, updt bool, propVal int) (int, error)
- func (P *PortsH) Ports2Json(w io.Writer) error
- func (P *PortsH) Ports2String(it IterIntf) error
- func (P *PortsH) PortsToGet() ([]cmn.PortDump, error)
- type Rt
- type RtAttr
- type RtDepObj
- type RtH
- func (r *RtH) RouteGet() ([]cmn.RouteGet, error)
- func (r *RtH) RoutesSync()
- func (r *RtH) RoutesTicker()
- func (r *RtH) RtAdd(Dst net.IPNet, Zone string, Ra RtAttr, Na []RtNhAttr) (int, error)
- func (r *RtH) RtDelete(Dst net.IPNet, Zone string) (int, error)
- func (r *RtH) RtDeleteByPort(port string) (int, error)
- func (r *RtH) RtDestructAll()
- func (r *RtH) RtFind(Dst net.IPNet, Zone string) *Rt
- func (r *RtH) Rts2String(it IterIntf) error
- func (r *RtH) TrieData2String(d tk.TrieData) string
- func (r *RtH) TrieNodeWalker(b string)
- type RtKey
- type RtNhAttr
- type RtStat
- type RuleCfg
- type RuleH
- func (R *RuleH) AddEPHost(apiCall bool, hostName string, name string, args epHostOpts) (int, error)
- func (R *RuleH) AddFwRule(fwRule cmn.FwRuleArg, fwOptArgs cmn.FwOptArg) (int, error)
- func (R *RuleH) AddNatLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg, ...) (int, error)
- func (R *RuleH) AdvRuleVIPIfL2(IP net.IP) error
- func (R *RuleH) DeleteEPHost(apiCall bool, name string, hostName string, probeType string, probePort uint16) (int, error)
- func (R *RuleH) DeleteFwRule(fwRule cmn.FwRuleArg) (int, error)
- func (R *RuleH) DeleteNatLbRule(serv cmn.LbServiceArg) (int, error)
- func (R *RuleH) GetEpHosts() ([]cmn.EndPointMod, error)
- func (R *RuleH) GetFwRule() ([]cmn.FwRuleMod, error)
- func (R *RuleH) GetNatLbRule() ([]cmn.LbRuleMod, error)
- func (R *RuleH) GetNatLbRuleByID(ruleID uint32) *ruleEnt
- func (R *RuleH) GetNatLbRuleByServArgs(serv cmn.LbServiceArg) *ruleEnt
- func (R *RuleH) GetNatLbRuleSecIPs(serv cmn.LbServiceArg) []string
- func (R *RuleH) IsEPHostActive(epKey string) bool
- func (R *RuleH) RuleDestructAll()
- func (R *RuleH) Rules2Json() ([]byte, error)
- func (R *RuleH) RulesSync()
- func (R *RuleH) RulesTicker()
- type SessH
- func (s *SessH) SessAdd(user string, IP net.IP, anTun cmn.SessTun, cnTun cmn.SessTun) (int, error)
- func (s *SessH) SessDelete(user string) (int, error)
- func (s *SessH) SessGet() ([]cmn.SessionMod, error)
- func (s *SessH) SessUlclGet() ([]cmn.SessionUlClMod, error)
- func (s *SessH) SessionTicker()
- func (s *SessH) SessionsSync()
- func (s *SessH) USess2String(it IterIntf) error
- func (s *SessH) UlClAddCls(user string, cls cmn.UlClArg) (int, error)
- func (s *SessH) UlClDeleteCls(user string, cls cmn.UlClArg) (int, error)
- type UlClInf
- type UlClStats
- type UserKey
- type UserSess
- type UserTun
- type Vlan
- type VlansH
- func (V *VlansH) VlanAdd(vlanID int, name string, zone string, osid int, hwi PortHwInfo) (int, error)
- func (V *VlansH) VlanDelete(vlanID int) (int, error)
- func (V *VlansH) VlanDestructAll()
- func (V *VlansH) VlanGet() ([]cmn.VlanGet, error)
- func (V *VlansH) VlanPortAdd(vlanID int, portName string, tagged bool) (int, error)
- func (V *VlansH) VlanPortDelete(vlanID int, portName string, tagged bool) (int, error)
- func (V *VlansH) Vlans2String(it IterIntf) error
- func (V *VlansH) VlansSync()
- func (V *VlansH) VlansTicker()
- type Zone
- type ZoneH
- func (z *ZoneH) GetPortZone(port string) *Zone
- func (z *ZoneH) ZoneAdd(name string) (int, error)
- func (z *ZoneH) ZoneBrAdd(name string, zns string) (int, error)
- func (z *ZoneH) ZoneBrDelete(name string) (int, error)
- func (z *ZoneH) ZoneDelete(name string) (int, error)
- func (z *ZoneH) ZonePortAdd(name string, zns string) (int, error)
- func (z *ZoneH) ZonePortDelete(name string) (int, error)
- func (z *ZoneH) ZonePortIsValid(name string, zns string) (int, error)
- func (z *ZoneH) ZoneTicker()
- func (z *ZoneH) Zonefind(name string) (*Zone, int)
Constants ¶
const ( DpErrBase = iota - L3ErrBase - 1000 DpWqUnkErr )
error codes
const ( DpWorkQLen = 1024 DpTiVal = 20 )
maximum dp work queue lengths
const ( // RootZone string constant representing root security zone RootZone = "root" LbnetTiVal = 10 )
const ( L2ErrBase = iota - 3000 L2SameFdbErr L2OifErr L2NoFdbErr L2VxattrErr )
error codes
const ( L3ErrBase = iota - RtErrBase - 1000 L3AddrErr L3ObjErr )
constants
const ( MirrErrBase = iota - 101000 MirrModErr MirrInfoErr MirrAttachErr MirrNoExistErr MirrExistsErr MirrAllocErr )
error codes
const ( NeighErrBase = iota - 4000 NeighExistsErr NeighOifErr NeighNoEntErr NeighRangeErr NeighHostRtErr NeighMacErr NeighTunErr )
error codes
const ( NeighAts = 10 MaxSysNeigh = 3 * 1024 MaxTunnelNeigh = 1024 )
constants
const ( PortBaseErr = iota - 1000 PortExistsErr PortNotExistErr PortNoMasterErr PortCounterErr PortMapErr PortZoneErr PortNoRealDevErr PortPropExistsErr PortPropNotExistsErr )
error codes
const ( MaxBondInterfaces = 8 MaxRealInterfaces = 128 MaxInterfaces = 512 MaxWgInterfaces = 8 MaxVtiInterfaces = 8 RealPortIDB = 3800 BondIDB = 4000 WgIDB = 4010 VtIDB = 4020 )
constants
const ( PolErrBase = iota - 100000 PolModErr PolInfoErr PolAttachErr PolNoExistErr PolExistsErr PolAllocErr )
error codes
const ( MinPolRate = 8 MaxPols = 8 * 1024 DflPolBlkSz = 6 * 5000 * 1000 )
constants
const ( RtErrBase = iota - 5000 RtExistsErr RtNhErr RtNoEntErr RtRangeErr RtModErr RtTrieAddErr RtTrieDelErr )
error codes
const ( RtTypeInd = 0x1 RtTypeDyn = 0x2 RtTypeSelf = 0x4 RtTypeHost = 0x8 )
rt type constants
const ( RuleErrBase = iota - ZoneBaseErr - 1000 RuleUnknownServiceErr RuleUnknownEpErr RuleExistsErr RuleAllocErr RuleNotExistsErr RuleEpCountErr RuleTupleErr RuleArgsErr RuleEpNotExistErr )
error codes
const ( RmPort ruleTMatch = 1 << iota RmL2Src RmL2Dst RmVlanID RmL3Src RmL3Dst RmL4Src RmL4Dst RmL4Prot RmInL2Src RmInL2Dst RmInL3Src RmInL3Dst RmInL4Src RmInL4Dst RmInL4Port RmMax )
rm tuples
const ( MaxNatEndPoints = 16 DflLbaInactiveTries = 2 // Default number of inactive tries before LB arm is turned off MaxDflLbaInactiveTries = 100 // Max number of inactive tries before LB arm is turned off DflLbaCheckTimeout = 10 // Default timeout for checking LB arms DflHostProbeTimeout = 60 // Default probe timeout for end-point host InitHostProbeTimeout = 15 // Initial probe timeout for end-point host MaxHostProbeTime = 24 * 3600 // Max possible host health check duration LbDefaultInactiveTimeout = 4 * 60 // Default inactive timeout for established sessions LbMaxInactiveTimeout = 24 * 3600 // Maximum inactive timeout for established sessions MaxEndPointCheckers = 4 // Maximum helpers to check endpoint health EndPointCheckerDuration = 2 // Duration at which ep-helpers will run MaxEndPointSweeps = 20 // Maximum end-point sweeps per round )
constants
const ( RtEm ruleTType = iota + 1 RtMf )
rt types
const ( RtActDrop ruleTActType = iota + 1 RtActFwd RtActTrap RtActRedirect RtActDnat RtActSnat RtActFullNat )
possible actions for a rt-entry
const ( HostProbePing = "ping" HostProbeConnectTCP = "tcp" HostProbeConnectUDP = "udp" HostProbeConnectSCTP = "sctp" HostProbeHTTP = "http" HostProbeHTTPS = "https" HostProbeNone = "none" )
possible types of end-point probe
const ( RtFw ruleTableType = iota + 1 RtLB RtMax )
rt types
const ( RtMaximumFw4s = (8 * 1024) RtMaximumLbs = (2 * 1024) )
rule specific flb constants
const ( SessErrBase = iota - 90000 SessModErr SessNoExistErr SessExistsErr SessUlClExistErr SessUlClNumErr SessUlClNoExistErr )
error codes for session api
const ( VlanBaseErr = iota - 2000 VlanExistsErr VlaNotExistErr VlanRangeErr VlanAddBrpErr VlanMpExistErr VlanPortPhyErr VlanPortExistErr VlanPortTaggedErr VlanNoPortErr VlanPortCreateErr VlanZoneErr )
error codes for vlan mod api
const ( ZoneBaseErr = iota - RtErrBase - 1000 ZoneExistsErr ZoneNotExistErr ZoneNumberErr )
error codes for zone
const (
FdbGts = 10
)
constants
const (
MaxMirrors = 32
)
constants
const (
MaxSysRoutes = (32 + 8) * 1024 //32k Ipv4 + 8k Ipv6
)
constants
const (
MaximumUlCls = 20000
)
constant to declare maximum number of Uplink Classifiers
const (
// MaximumVlans constant to declare maximum number of vlans
MaximumVlans = 4094
)
const (
// MaximumZones constant to define maximum number of zones
MaximumZones = 256
)
Variables ¶
This section is empty.
Functions ¶
func DpWorkSingle ¶
func DpWorkSingle(dp *DpH, m interface{}) DpRetT
DpWorkSingle - routine to work on a single dp work queue request
func GetFlagToString ¶
GetFlagToString - Stringify route flags
func GratArpReq ¶
GratArpReq - sends a gratuitious arp reply given the DIP, SIP and interface name
func GratArpReqWithCtx ¶
func GratArpReqWithCtx(ctx context.Context, rCh chan<- int, AdvIP net.IP, ifName string) (int, error)
GratArpReq - sends a gratuitious arp reply given the DIP, SIP and interface name
func HTTPSProber ¶
HTTPSProber - Do a https probe for given url returns true/false depending on whether probing was successful
func IfaMkString ¶
IfaMkString - Given an ifa return its string representation
func IsIPHostAddr ¶
IsIPHostAddr - Check if provided address is a local address
func LogString2Level ¶
LogString2Level - Convert log level in string to LogLevelT
func MirrInfoCmp ¶
MirrInfoCmp - compare mirror information in two MirrInfo variables returns false if there is no match, else returns true
func MirrInfoValidate ¶
MirrInfoValidate - validate mirror information
func MirrObjValidate ¶
MirrObjValidate - validate object to be attached
func PolInfoXlateValidate ¶
PolInfoXlateValidate - validates info passed in pInfo and translates it to internally used units
func PolObjValidate ¶
PolObjValidate - validate object to be attached
func RunCommand ¶
RunCommand - Run a bash command
Types ¶
type DpH ¶
type DpH struct { ToDpCh chan interface{} ToFinCh chan int DpHooks DpHookInterface SyncMtx sync.RWMutex }
DpH - datapath context container
func DpBrokerInit ¶
func DpBrokerInit(dpHook DpHookInterface) *DpH
DpBrokerInit - initialize the DP broker subsystem
func (*DpH) DpMapGetCt4 ¶
DpMapGetCt4 - get DP conntrack information as a map
func (*DpH) DpWorkOnFw ¶
func (dp *DpH) DpWorkOnFw(fWq *FwDpWorkQ) DpRetT
DpWorkOnFw - routine to work on a firewall work queue request
func (*DpH) DpWorkOnL2Addr ¶
func (dp *DpH) DpWorkOnL2Addr(pWq *L2AddrDpWorkQ) DpRetT
DpWorkOnL2Addr - routine to work on a l2 addr work queue request
func (*DpH) DpWorkOnMirr ¶
func (dp *DpH) DpWorkOnMirr(mWq *MirrDpWorkQ) DpRetT
DpWorkOnMirr - routine to work on a mirror work queue request
func (*DpH) DpWorkOnNatLb ¶
func (dp *DpH) DpWorkOnNatLb(nWq *NatDpWorkQ) DpRetT
DpWorkOnNatLb - routine to work on a NAT lb work queue request
func (*DpH) DpWorkOnNextHop ¶
func (dp *DpH) DpWorkOnNextHop(nhWq *NextHopDpWorkQ) DpRetT
DpWorkOnNextHop - routine to work on a nexthop work queue request
func (*DpH) DpWorkOnPol ¶
func (dp *DpH) DpWorkOnPol(pWq *PolDpWorkQ) DpRetT
DpWorkOnPol - routine to work on a policer work queue request
func (*DpH) DpWorkOnPort ¶
func (dp *DpH) DpWorkOnPort(pWq *PortDpWorkQ) DpRetT
DpWorkOnPort - routine to work on a port work queue request
func (*DpH) DpWorkOnRoute ¶
func (dp *DpH) DpWorkOnRoute(rtWq *RouteDpWorkQ) DpRetT
DpWorkOnRoute - routine to work on a route work queue request
func (*DpH) DpWorkOnRtMac ¶
func (dp *DpH) DpWorkOnRtMac(rmWq *RouterMacDpWorkQ) DpRetT
DpWorkOnRtMac - routine to work on a rt-mac work queue request
func (*DpH) DpWorkOnStat ¶
func (dp *DpH) DpWorkOnStat(nWq *StatDpWorkQ) DpRetT
DpWorkOnStat - routine to work on a stat work queue request
func (*DpH) DpWorkOnTableOp ¶
DpWorkOnTableOp - routine to work on a table work queue request
func (*DpH) DpWorkOnUlCl ¶
func (dp *DpH) DpWorkOnUlCl(nWq *UlClDpWorkQ) DpRetT
DpWorkOnUlCl - routine to work on a ulcl work queue request
type DpHookInterface ¶
type DpHookInterface interface { DpMirrAdd(*MirrDpWorkQ) int DpMirrDel(*MirrDpWorkQ) int DpPolAdd(*PolDpWorkQ) int DpPolDel(*PolDpWorkQ) int DpPortPropAdd(*PortDpWorkQ) int DpPortPropDel(*PortDpWorkQ) int DpL2AddrAdd(*L2AddrDpWorkQ) int DpL2AddrDel(*L2AddrDpWorkQ) int DpRouterMacAdd(*RouterMacDpWorkQ) int DpRouterMacDel(*RouterMacDpWorkQ) int DpNextHopAdd(*NextHopDpWorkQ) int DpNextHopDel(*NextHopDpWorkQ) int DpRouteAdd(*RouteDpWorkQ) int DpRouteDel(*RouteDpWorkQ) int DpNatLbRuleAdd(*NatDpWorkQ) int DpNatLbRuleDel(*NatDpWorkQ) int DpFwRuleAdd(w *FwDpWorkQ) int DpFwRuleDel(w *FwDpWorkQ) int DpStat(*StatDpWorkQ) int DpUlClAdd(w *UlClDpWorkQ) int DpUlClDel(w *UlClDpWorkQ) int DpTableGet(w *TableDpWorkQ) (DpRetT, error) DpCtAdd(w *DpCtInfo) int DpCtDel(w *DpCtInfo) int DpCtGetAsync() DpGetLock() DpRelLock() }
DpHookInterface - represents a go interface which should be implemented to integrate with flbnet realm
type FdbEnt ¶
type FdbEnt struct { FdbKey FdbKey FdbAttr FdbAttr FdbTun FdbTunAttr Port *Port Sync DpStatusT // contains filtered or unexported fields }
FdbEnt - a forwarding database entry
type FdbTunAttr ¶
type FdbTunAttr struct {
// contains filtered or unexported fields
}
FdbTunAttr - attribs for a tun fwd entry
type IterIntf ¶
type IterIntf interface {
NodeWalker(b string)
}
IterIntf - interface implementation to iterate various flbnet subsystems entitities
type L2H ¶
L2H - context container
func (*L2H) Fdbs2String ¶
Fdbs2String - Format all fwd entries to string
func (*L2H) L2DestructAll ¶
func (l2 *L2H) L2DestructAll()
L2DestructAll - Destructor for all layer2 fwd entries
type L3H ¶
L3H - context container
func (*L3H) IfObjMkString ¶
IfObjMkString - given an ifa object, get all its member ifa's string rep
func (*L3H) IfaAdd ¶
IfaAdd - Adds an interface IP address (primary or secondary) and associate it with Obj Obj can be anything but usually it is the name of a valid interface
func (*L3H) IfaDelete ¶
IfaDelete - Deletes an interface IP address (primary or secondary) and de-associate from Obj Obj can be anything but usually it is the name of a valid interface
func (*L3H) IfaDeleteAll ¶
IfaDeleteAll - Deletes all interface IP address (primary or secondary) and de-associate from Obj Obj can be anything but usually it is the name of a valid interface
func (*L3H) IfaFind ¶
IfaFind - Given any ip address, check if it matches ip address from Obj's ifa list This is useful to determine if ip address is already assigned to some interface
func (*L3H) IfaFindAny ¶
IfaFindAny - Given any ip address, check if it matches ip address in any ifa list This is useful to determine if ip address is already assigned to some interface
func (*L3H) IfaSelect ¶
IfaSelect - Given any ip address, select optimal ip address from Obj's ifa list This is useful to determine source ip address when sending traffic to the given ip address
func (*L3H) IfaSelectAny ¶
IfaSelectAny - Given any dest ip address, select optimal interface source ip address This is useful to determine source ip address when sending traffic to the given ip address
func (*L3H) Ifas2String ¶
Ifas2String - Format all ifas to string
type MirrAttachObjT ¶
type MirrAttachObjT interface { }
MirrAttachObjT - empty interface to hold mirror attachments
type MirrEntry ¶
type MirrEntry struct { Key MirrKey Info cmn.MirrInfo Zone *Zone HwNum uint64 Stats PolStats Sync DpStatusT MObjs []MirrObjInfo }
MirrEntry - a mirror entry
type MirrH ¶
MirrH - context container
func (*MirrH) MirrDelete ¶
MirrDelete - Delete a mirror from flbnet
func (*MirrH) MirrDestructAll ¶
func (M *MirrH) MirrDestructAll()
MirrDestructAll - destroy all mirrors
func (*MirrH) MirrGet ¶
func (M *MirrH) MirrGet() ([]cmn.MirrGetMod, error)
MirrGet - Get mirrors in flbnet
func (*MirrH) MirrPortDelete ¶
MirrPortDelete - if port related to any mirror is deleted, we need to make sure that mirror is resynced
type MirrObjInfo ¶
type MirrObjInfo struct { Args cmn.MirrObj AttachObj MirrAttachObjT Parent *MirrEntry Sync DpStatusT }
MirrObjInfo - an object which is attached to a mirror
func (*MirrObjInfo) MirrObj2DP ¶
func (mObjInfo *MirrObjInfo) MirrObj2DP(work DpWorkT) int
MirrObj2DP - Sync state of mirror's attachment point with data-path
type Neigh ¶
type Neigh struct { Key NeighKey Addr net.IP Attr NeighAttr Inactive bool Resolved bool Mark uint64 RMark uint64 RecNh *Neigh TunEps []*NeighTunEp Type NhType Sync DpStatusT OifPort *Port Ats time.Time NhRtm map[RtKey]*Rt // contains filtered or unexported fields }
Neigh - a neighbor entry
func (*Neigh) NeighRemoveTunEP ¶
func (ne *Neigh) NeighRemoveTunEP(i int) []*NeighTunEp
NeighRemoveTunEP - remove tun-ep from a neighbor
type NeighAttr ¶
type NeighAttr struct { OSLinkIndex int OSState int HardwareAddr net.HardwareAddr }
NeighAttr - attributes of a neighbor
type NeighH ¶
type NeighH struct { NeighMap map[NeighKey]*Neigh NeighID *tk.Counter NeighTID *tk.Counter Zone *Zone }
NeighH - the context container
func (*NeighH) NeighAddTunEP ¶
func (n *NeighH) NeighAddTunEP(ne *Neigh, rIP net.IP, sIP net.IP, tunID uint32, tunType DpTunT, sync bool) (int, *NeighTunEp)
NeighAddTunEP - Add tun-ep to a neighbor
func (*NeighH) NeighDelAllTunEP ¶
NeighDelAllTunEP - delete all tun-eps from a neighbor
func (*NeighH) NeighDelete ¶
NeighDelete - delete a neigh entry
func (*NeighH) NeighDeleteByPort ¶
NeighDeleteByPort - Routine to delete all the neigh on this port
func (*NeighH) NeighDestructAll ¶
func (n *NeighH) NeighDestructAll()
NeighDestructAll - destroy all neighbors
func (*NeighH) NeighPairRt ¶
NeighPairRt - Associate a route with the given neighbor
func (*NeighH) NeighRecursiveResolve ¶
NeighRecursiveResolve - try to resolve recursive neighbors Recursive neighbors are the ones which have the following association : nh -> tunfdb -> rt -> tun-nh (Wow)
func (*NeighH) NeighTicker ¶
NeighTicker - a per neighbor ticker sub-routine
func (*NeighH) NeighUnPairRt ¶
NeighUnPairRt - De-Associate a route from the given neighbor
func (*NeighH) Neighs2String ¶
Neighs2String - stringify all neighbors
func (*NeighH) NeighsTicker ¶
func (n *NeighH) NeighsTicker()
NeighsTicker - neighbor subsystem ticker sub-routine
type NeighTunEp ¶
type NeighTunEp struct { Mark uint64 Parent *Neigh Inactive bool Sync DpStatusT // contains filtered or unexported fields }
NeighTunEp - tun-ep related to neighbor
func (*NeighTunEp) DP ¶
func (tep *NeighTunEp) DP(work DpWorkT) int
DP - sync state of neighbor tunnel endpoint entity to data-path
type NetAPIStruct ¶
type NetAPIStruct struct { }
NetAPIStruct - empty struct for anchoring client routines
func (*NetAPIStruct) NetAddrAdd ¶
func (na *NetAPIStruct) NetAddrAdd(am *cmn.IPAddrMod) (int, error)
NetAddrAdd - Add an ipv4 address in lbnet
func (*NetAPIStruct) NetAddrDel ¶
func (na *NetAPIStruct) NetAddrDel(am *cmn.IPAddrMod) (int, error)
NetAddrDel - Delete an ipv4 address in lbnet
func (*NetAPIStruct) NetAddrGet ¶
func (na *NetAPIStruct) NetAddrGet() ([]cmn.IPAddrGet, error)
NetAddrGet - Get an IPv4 Address info from lbnet
func (*NetAPIStruct) NetCtInfoGet ¶
func (na *NetAPIStruct) NetCtInfoGet() ([]cmn.CtInfo, error)
NetCtInfoGet - Get connection track info from lbnet
func (*NetAPIStruct) NetEpHostAdd ¶
func (na *NetAPIStruct) NetEpHostAdd(em *cmn.EndPointMod) (int, error)
NetEpHostAdd - Add a LB end-point in lbnet
func (*NetAPIStruct) NetEpHostDel ¶
func (na *NetAPIStruct) NetEpHostDel(em *cmn.EndPointMod) (int, error)
NetEpHostDel - Delete a LB end-point in lbnet
func (*NetAPIStruct) NetEpHostGet ¶
func (na *NetAPIStruct) NetEpHostGet() ([]cmn.EndPointMod, error)
NetEpHostGet - Get LB end-points from lbnet
func (*NetAPIStruct) NetFdbAdd ¶
func (na *NetAPIStruct) NetFdbAdd(fm *cmn.FdbMod) (int, error)
NetFdbAdd - Add a forwarding database entry in lbnet
func (*NetAPIStruct) NetFdbDel ¶
func (na *NetAPIStruct) NetFdbDel(fm *cmn.FdbMod) (int, error)
NetFdbDel - Delete a forwarding database entry in lbnet
func (*NetAPIStruct) NetFwRuleAdd ¶
func (na *NetAPIStruct) NetFwRuleAdd(fm *cmn.FwRuleMod) (int, error)
NetFwRuleAdd - Add a firewall rule in lbnet
func (*NetAPIStruct) NetFwRuleDel ¶
func (na *NetAPIStruct) NetFwRuleDel(fm *cmn.FwRuleMod) (int, error)
NetFwRuleDel - Delete a firewall rule in lbnet
func (*NetAPIStruct) NetFwRuleGet ¶
func (na *NetAPIStruct) NetFwRuleGet() ([]cmn.FwRuleMod, error)
NetFwRuleGet - Get a firewall rule from lbnet
func (*NetAPIStruct) NetLbRuleAdd ¶
func (na *NetAPIStruct) NetLbRuleAdd(lm *cmn.LbRuleMod) (int, error)
NetLbRuleAdd - Add a load-balancer rule in lbnet
func (*NetAPIStruct) NetLbRuleDel ¶
func (na *NetAPIStruct) NetLbRuleDel(lm *cmn.LbRuleMod) (int, error)
NetLbRuleDel - Delete a load-balancer rule in lbnet
func (*NetAPIStruct) NetLbRuleGet ¶
func (na *NetAPIStruct) NetLbRuleGet() ([]cmn.LbRuleMod, error)
NetLbRuleGet - Get a load-balancer rule from lbnet
func (*NetAPIStruct) NetMirrorAdd ¶
func (*NetAPIStruct) NetMirrorAdd(mm *cmn.MirrMod) (int, error)
NetMirrorAdd - Add a mirror in lbnet
func (*NetAPIStruct) NetMirrorDel ¶
func (*NetAPIStruct) NetMirrorDel(mm *cmn.MirrMod) (int, error)
NetMirrorDel - Delete a mirror in lbnet
func (*NetAPIStruct) NetMirrorGet ¶
func (*NetAPIStruct) NetMirrorGet() ([]cmn.MirrGetMod, error)
NetMirrorGet - Get a mirror in lbnet
func (*NetAPIStruct) NetNeighAdd ¶
func (na *NetAPIStruct) NetNeighAdd(nm *cmn.NeighMod) (int, error)
NetNeighAdd - Add a neighbor in lbnet
func (*NetAPIStruct) NetNeighDel ¶
func (na *NetAPIStruct) NetNeighDel(nm *cmn.NeighMod) (int, error)
NetNeighDel - Delete a neighbor in lbnet
func (*NetAPIStruct) NetNeighGet ¶
func (na *NetAPIStruct) NetNeighGet() ([]cmn.NeighMod, error)
NetNeighGet - Get a neighbor in lbnet
func (*NetAPIStruct) NetPolicerAdd ¶
func (na *NetAPIStruct) NetPolicerAdd(pm *cmn.PolMod) (int, error)
NetPolicerAdd - Add a policer in lbnet
func (*NetAPIStruct) NetPolicerDel ¶
func (na *NetAPIStruct) NetPolicerDel(pm *cmn.PolMod) (int, error)
NetPolicerDel - Delete a policer in lbnet
func (*NetAPIStruct) NetPolicerGet ¶
func (na *NetAPIStruct) NetPolicerGet() ([]cmn.PolMod, error)
NetPolicerGet - Get a policer in lbnet
func (*NetAPIStruct) NetPortAdd ¶
func (na *NetAPIStruct) NetPortAdd(pm *cmn.PortMod) (int, error)
NetPortAdd - Add a port in lbnet
func (*NetAPIStruct) NetPortDel ¶
func (na *NetAPIStruct) NetPortDel(pm *cmn.PortMod) (int, error)
NetPortDel - Delete port from lbnet
func (*NetAPIStruct) NetPortGet ¶
func (*NetAPIStruct) NetPortGet() ([]cmn.PortDump, error)
NetPortGet - Get Port Information of lbnet
func (*NetAPIStruct) NetRouteAdd ¶
func (na *NetAPIStruct) NetRouteAdd(rm *cmn.RouteMod) (int, error)
NetRouteAdd - Add a route in lbnet
func (*NetAPIStruct) NetRouteDel ¶
func (na *NetAPIStruct) NetRouteDel(rm *cmn.RouteMod) (int, error)
NetRouteDel - Delete a route in lbnet
func (*NetAPIStruct) NetRouteGet ¶
func (na *NetAPIStruct) NetRouteGet() ([]cmn.RouteGet, error)
NetRouteGet - Get Route info from lbnet
func (*NetAPIStruct) NetSessionAdd ¶
func (na *NetAPIStruct) NetSessionAdd(sm *cmn.SessionMod) (int, error)
NetSessionAdd - Add a 3gpp user-session info in lbnet
func (*NetAPIStruct) NetSessionDel ¶
func (na *NetAPIStruct) NetSessionDel(sm *cmn.SessionMod) (int, error)
NetSessionDel - Delete a 3gpp user-session info in lbnet
func (*NetAPIStruct) NetSessionGet ¶
func (na *NetAPIStruct) NetSessionGet() ([]cmn.SessionMod, error)
NetSessionGet - Get 3gpp user-session info in lbnet
func (*NetAPIStruct) NetSessionUlClAdd ¶
func (na *NetAPIStruct) NetSessionUlClAdd(sr *cmn.SessionUlClMod) (int, error)
NetSessionUlClAdd - Add a 3gpp ulcl-filter info in lbnet
func (*NetAPIStruct) NetSessionUlClDel ¶
func (na *NetAPIStruct) NetSessionUlClDel(sr *cmn.SessionUlClMod) (int, error)
NetSessionUlClDel - Delete a 3gpp ulcl-filter info in lbnet
func (*NetAPIStruct) NetSessionUlClGet ¶
func (na *NetAPIStruct) NetSessionUlClGet() ([]cmn.SessionUlClMod, error)
NetSessionUlClGet - Get 3gpp ulcl filter info from lbnet
func (*NetAPIStruct) NetVlanAdd ¶
func (na *NetAPIStruct) NetVlanAdd(vm *cmn.VlanMod) (int, error)
NetVlanAdd - Add vlan info to lbnet
func (*NetAPIStruct) NetVlanDel ¶
func (na *NetAPIStruct) NetVlanDel(vm *cmn.VlanMod) (int, error)
NetVlanDel - Delete vlan info from lbnet
func (*NetAPIStruct) NetVlanGet ¶
func (na *NetAPIStruct) NetVlanGet() ([]cmn.VlanGet, error)
NetVlanGet - Get Vlan Information of lbnet
func (*NetAPIStruct) NetVlanPortAdd ¶
func (na *NetAPIStruct) NetVlanPortAdd(vm *cmn.VlanPortMod) (int, error)
NetVlanPortAdd - Add a port to vlan in lbnet
func (*NetAPIStruct) NetVlanPortDel ¶
func (na *NetAPIStruct) NetVlanPortDel(vm *cmn.VlanPortMod) (int, error)
NetVlanPortDel - Delete a port from vlan in lbnet
type PolAttachObjT ¶
type PolAttachObjT interface { }
PolAttachObjT - empty interface to hold policer attachments
type PolEntry ¶
type PolEntry struct { Key PolKey Info cmn.PolInfo Zone *Zone HwNum uint64 Stats PolStats Sync DpStatusT PObjs []PolObjInfo }
PolEntry - a policer entry
type PolH ¶
PolH - context container
func (*PolH) PolPortDelete ¶
PolPortDelete - if port related to any policer is deleted, we need to make sure that policer is resynced
type PolObjInfo ¶
type PolObjInfo struct { Args cmn.PolObj AttachObj PolAttachObjT Parent *PolEntry Sync DpStatusT }
PolObjInfo - an object which is attached to a policer
func (*PolObjInfo) PolObj2DP ¶
func (pObjInfo *PolObjInfo) PolObj2DP(work DpWorkT) int
PolObj2DP - Sync state of policer's attachment point with data-path
type Port ¶
type Port struct { Name string PortNo int Zone string SInfo PortSwInfo HInfo PortHwInfo Stats PortStatsInfo L3 PortLayer3Info L2 PortLayer2Info Sync DpStatusT }
Port - holds all information related to an interface
func (*Port) IsL3TunPort ¶
IsL3TunPort - check if the port is of L3Tun type
func (*Port) IsLeafPort ¶
IsLeafPort - check if the port is a leaf port (eBPF hooks need to attached to such ports)
func (*Port) IsSlavePort ¶
IsSlavePort - check if the port is slave of another port
type PortEventIntf ¶
PortEventIntf - interface for getting notifications
type PortHwInfo ¶
type PortHwInfo struct { MacAddr [6]byte Link bool State bool Mtu int Master string Real string TunID uint32 TunSrc net.IP TunDst net.IP }
PortHwInfo - hardware specific information of an interface
type PortLayer2Info ¶
PortLayer2Info - layer2 information related to an interface
type PortLayer3Info ¶
PortLayer3Info - layer3 information related to an interface
type PortStatsInfo ¶
type PortStatsInfo struct { RxBytes uint64 TxBytes uint64 RxPackets uint64 TxPackets uint64 RxError uint64 TxError uint64 }
PortStatsInfo - per interface statistics information Note that this is not snmp compliant stats
type PortSwInfo ¶
type PortSwInfo struct { OsID int PortType int PortProp cmn.PortProp PortPolNum int PortMirNum int PortActive bool PortReal *Port PortOvl *Port SessMark uint64 BpfLoaded bool }
PortSwInfo - software specific information for interface maintenance
type PortsH ¶
type PortsH struct {
// contains filtered or unexported fields
}
PortsH - the port context container
func (*PortsH) PortAdd ¶
func (P *PortsH) PortAdd(name string, osid int, ptype int, zone string, hwi PortHwInfo, l2i PortLayer2Info) (int, error)
PortAdd - add a port to flbnet realm
func (*PortsH) PortDestructAll ¶
func (P *PortsH) PortDestructAll()
PortDestructAll - destroy all ports in flbnet realm
func (*PortsH) PortFindByName ¶
PortFindByName - find a port in flbnet realm given port name
func (*PortsH) PortFindByOSID ¶
PortFindByOSID - find a port in flbnet realm given os identifier
func (*PortsH) PortGetSlaves ¶
PortGetSlaves - get any slaves related to the given master interface
func (*PortsH) PortHasTunSlaves ¶
PortHasTunSlaves - get any tunnel slaves related to the given master interface
func (*PortsH) PortL2AddrMatch ¶
PortL2AddrMatch - check if port of given name has the same hw-mac address as the port contained in the given pointer
func (*PortsH) PortNotifierRegister ¶
func (P *PortsH) PortNotifierRegister(notifier PortEventIntf)
PortNotifierRegister - register an interface implementation of type PortEventIntf
func (*PortsH) PortUpdateProp ¶
func (P *PortsH) PortUpdateProp(name string, prop cmn.PortProp, zone string, updt bool, propVal int) (int, error)
PortUpdateProp - update port properties given an existing port
func (*PortsH) Ports2Json ¶
Ports2Json - dump ports in flbnet realm to json format
func (*PortsH) Ports2String ¶
Ports2String - dump ports in flbnet realm to string format
type Rt ¶
type Rt struct { Key RtKey Addr net.IP Attr RtAttr TFlags int Dead bool Sync DpStatusT ZoneNum int Mark uint64 Stat RtStat NhAttr []RtNhAttr NextHops []*Neigh RtDepObjs []RtDepObj }
Rt - the rt entry
func (*Rt) RtGetNhMark ¶
RtGetNhMark - get the rt-entry's neighbor identifier
type RtDepObj ¶
type RtDepObj interface { }
RtDepObj - an empty interface to hold any object dependent on rt entry
type RtH ¶
type RtH struct { RtMap map[RtKey]*Rt Trie4 *tk.TrieRoot Trie6 *tk.TrieRoot Zone *Zone Mark *tk.Counter }
RtH - context container
func (*RtH) RtDeleteByPort ¶
RtDeleteByPort - Delete a route which has specified port association
func (*RtH) Rts2String ¶
Rts2String - Format rt entries to a string
func (*RtH) TrieData2String ¶
TrieData2String - tlpm package interface implementation
func (*RtH) TrieNodeWalker ¶
TrieNodeWalker - tlpm package interface implementation
type RuleH ¶
type RuleH struct {
// contains filtered or unexported fields
}
RuleH - context container
func (*RuleH) AddEPHost ¶
AddEPHost - Add an end-point host name, if present will be used as endpoint key It will return 0 and nil error, else appropriate return code and error string will be set
func (*RuleH) AddFwRule ¶
AddFwRule - Add a firewall rule. The rule details are passed in fwRule argument it will return 0 and nil error, else appropriate return code and error string will be set
func (*RuleH) AddNatLbRule ¶
func (R *RuleH) AddNatLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg, servEndPoints []cmn.LbEndPointArg) (int, error)
AddNatLbRule - Add a service LB nat rule. The service details are passed in serv argument, and end-point information is passed in the slice servEndPoints. On success, it will return 0 and nil error, else appropriate return code and error string will be set
func (*RuleH) DeleteEPHost ¶
func (R *RuleH) DeleteEPHost(apiCall bool, name string, hostName string, probeType string, probePort uint16) (int, error)
DeleteEPHost - Delete an end-point host It will return 0 and nil error, else appropriate return code and error string will be set
func (*RuleH) DeleteFwRule ¶
DeleteFwRule - Delete a firewall rule, On success, it will return 0 and nil error, else appropriate return code and error string will be set
func (*RuleH) DeleteNatLbRule ¶
func (R *RuleH) DeleteNatLbRule(serv cmn.LbServiceArg) (int, error)
DeleteNatLbRule - Delete a service LB nat rule. The service details are passed in serv argument. On success, it will return 0 and nil error, else appropriate return code and error string will be set
func (*RuleH) GetEpHosts ¶
func (R *RuleH) GetEpHosts() ([]cmn.EndPointMod, error)
GetEpHosts - get all end-points and pack them into a cmn.EndPointMod slice
func (*RuleH) GetNatLbRule ¶
GetNatLbRule - get all rules and pack them into a cmn.LbRuleMod slice
func (*RuleH) GetNatLbRuleByID ¶
GetNatLbRuleByID - Get a NAT rule by its identifier
func (*RuleH) GetNatLbRuleByServArgs ¶
func (R *RuleH) GetNatLbRuleByServArgs(serv cmn.LbServiceArg) *ruleEnt
GetNatLbRuleByServArgs - Get a NAT rule by its service args
func (*RuleH) GetNatLbRuleSecIPs ¶
func (R *RuleH) GetNatLbRuleSecIPs(serv cmn.LbServiceArg) []string
GetNatLbRuleSecIPs - Get secondary IPs for SCTP NAT rule by its service args
func (*RuleH) IsEPHostActive ¶
IsEPHostActive - Check if end-point is active
func (*RuleH) RuleDestructAll ¶
func (R *RuleH) RuleDestructAll()
RuleDestructAll - Destructor routine for all rules
func (*RuleH) Rules2Json ¶
Rules2Json - output all rules into json and write to the byte array
type SessH ¶
SessH - session context handler
func (*SessH) SessDelete ¶
SessDelete - routine to delete a user session
func (*SessH) SessGet ¶
func (s *SessH) SessGet() ([]cmn.SessionMod, error)
SessGet - routine to get session list
func (*SessH) SessUlclGet ¶
func (s *SessH) SessUlclGet() ([]cmn.SessionUlClMod, error)
SessUlclGet - routine to get uplink classifier list
func (*SessH) SessionTicker ¶
func (s *SessH) SessionTicker()
SessionTicker - ticker routine to sync session information with DP
func (*SessH) SessionsSync ¶
func (s *SessH) SessionsSync()
SessionsSync - routine to sync session information with DP
func (*SessH) USess2String ¶
USess2String - converts all user session information to string format
func (*SessH) UlClAddCls ¶
UlClAddCls - routine to add an uplink classifier to user session
type UlClInf ¶
type UlClInf struct { Addr net.IP Qfi uint8 NumUl uint64 NumDl uint64 Status DpStatusT Stats UlClStats // contains filtered or unexported fields }
UlClInf - uplink classifier info
type UserSess ¶
type UserSess struct { Key UserKey Addr net.IP Zone int AnTun cmn.SessTun CnTun cmn.SessTun UlCl map[string]*UlClInf }
UserSess - user session info
type Vlan ¶
type Vlan struct { VlanID int Created bool Name string Zone string NumTagPorts int TaggedPorts [MaxInterfaces]*Port NumUnTagPorts int UnTaggedPorts [MaxInterfaces]*Port Stat vlanStat }
Vlan - vlan interface info
type VlansH ¶
type VlansH struct { VlanMap [MaximumVlans]Vlan Zone *Zone }
VlansH - vlan context handler
func (*VlansH) VlanAdd ¶
func (V *VlansH) VlanAdd(vlanID int, name string, zone string, osid int, hwi PortHwInfo) (int, error)
VlanAdd - routine to add vlan interface
func (*VlansH) VlanDelete ¶
VlanDelete - routine to delete vlan interface
func (*VlansH) VlanDestructAll ¶
func (V *VlansH) VlanDestructAll()
VlanDestructAll - routine to delete all vlan interfaces
func (*VlansH) VlanPortAdd ¶
VlanPortAdd - routine to add a port membership to vlan
func (*VlansH) VlanPortDelete ¶
VlanPortDelete - routine to delete a port membership from vlan
func (*VlansH) Vlans2String ¶
Vlans2String - routine to convert vlan information to string
func (*VlansH) VlansSync ¶
func (V *VlansH) VlansSync()
VlansSync - routine to sync vlan information with DP
func (*VlansH) VlansTicker ¶
func (V *VlansH) VlansTicker()
VlansTicker - ticker routine to sync all vlan information with datapath
type Zone ¶
type Zone struct { Name string ZoneNum int Ports *PortsH Vlans *VlansH L2 *L2H Nh *NeighH Rt *RtH L3 *L3H Rules *RuleH Sess *SessH Pols *PolH Mirrs *MirrH Mtx sync.RWMutex }
Zone - zone info
type ZoneH ¶
type ZoneH struct { ZoneMap map[string]*Zone ZoneBrs map[string]*Zone ZonePorts map[string]*Zone ZoneMark *tk.Counter }
ZoneH - Zone context handler
func (*ZoneH) GetPortZone ¶
GetPortZone - routine to identify the zone of a port
func (*ZoneH) ZoneBrDelete ¶
ZoneBrDelete - routine to delete a bridge from the zone
func (*ZoneH) ZoneDelete ¶
ZoneDelete - routine to delete a zone
func (*ZoneH) ZonePortAdd ¶
ZonePortAdd - routine to add a port to a zone
func (*ZoneH) ZonePortDelete ¶
ZonePortDelete - routine to delete a port from a zone
func (*ZoneH) ZonePortIsValid ¶
ZonePortIsValid - routine to check if the port belongs to a zone
func (*ZoneH) ZoneTicker ¶
func (z *ZoneH) ZoneTicker()
ZoneTicker - This ticker routine takes care of all house-keeping operations for all instances of security zones. This is called from lbnetTicker