Documentation ¶
Index ¶
- Constants
- Variables
- func DpEbpfDPLogLevel(cfg *C.struct_ebpfcfg, debug tk.LogLevelT)
- func DpEbpfSetLogLevel(logLevel tk.LogLevelT)
- func DpL2AddrMod(w *L2AddrDpWorkQ) int
- func DpLBRuleMod(w *LBDpWorkQ) int
- func DpNextHopMod(w *NextHopDpWorkQ) int
- func DpRouteMod(w *RouteDpWorkQ) int
- func DpRouterMacMod(w *RouterMacDpWorkQ) int
- func DpWorker(dp *DpH, f chan int, ch chan interface{})
- func FormatTimedelta(t time.Time) string
- func GetFlagToString(flag int) string
- func Ifa2String(ifa *Ifa, it IterIntf)
- func IfaMkString(ifa *Ifa, v4 bool) string
- func IsLoxiAPIActive(url string) bool
- func LogString2Level(logStr string) tk.LogLevelT
- func LoxiXsyncMain(mode string)
- func Main()
- func MirrInfoCmp(mInfo1, mInfo2 *cmn.MirrInfo) bool
- func MirrInfoValidate(mInfo *cmn.MirrInfo) bool
- func MirrObjValidate(mObj *cmn.MirrObj) bool
- func NcloudApiInit() error
- func Neigh2String(ne *Neigh, it IterIntf)
- func PolInfoXlateValidate(pInfo *cmn.PolInfo) bool
- func PolObjValidate(pObj *cmn.PolObj) bool
- func RegisterXSyncServer(s grpc.ServiceRegistrar, srv XSyncServer)
- func Rt2String(rt *Rt) string
- func RunCommand(command string, isFatal bool) (int, error)
- func TestLoxinet(t *testing.T)
- func Us2String(us *UserSess) string
- func VlanValid(vlanID int) bool
- type AWSAPIStruct
- func (aws *AWSAPIStruct) CloudAPIInit(cloudCIDRBlock string) error
- func (aws *AWSAPIStruct) CloudDestroyVIPNetWork() error
- func (aws *AWSAPIStruct) CloudPrepareVIPNetWork() error
- func (aws *AWSAPIStruct) CloudUnPrepareVIPNetWork() error
- func (aws *AWSAPIStruct) CloudUpdatePrivateIP(vIP net.IP, eIP net.IP, add bool) error
- type BlockCtInfoMod
- func (*BlockCtInfoMod) Descriptor() ([]byte, []int)deprecated
- func (x *BlockCtInfoMod) GetAdd() bool
- func (x *BlockCtInfoMod) GetCt() []*CtInfo
- func (*BlockCtInfoMod) ProtoMessage()
- func (x *BlockCtInfoMod) ProtoReflect() protoreflect.Message
- func (x *BlockCtInfoMod) Reset()
- func (x *BlockCtInfoMod) String() string
- type CIKAArgs
- type CIStateH
- func (ci *CIStateH) BFDSessionNotify(instance string, remote string, ciState string)
- func (h *CIStateH) CIBFDSessionAdd(bm cmn.BFDMod) (int, error)
- func (h *CIStateH) CIBFDSessionDel(bm cmn.BFDMod) (int, error)
- func (h *CIStateH) CIBFDSessionGet() ([]cmn.BFDMod, error)
- func (ci *CIStateH) CISpawn()
- func (h *CIStateH) CIStateGet() ([]cmn.HASMod, error)
- func (h *CIStateH) CIStateGetInst(inst string) (string, error)
- func (h *CIStateH) CIStateUpdate(cm cmn.HASMod) (int, error)
- func (h *CIStateH) CITicker()
- func (h *CIStateH) CIVipGet(inst string) (net.IP, error)
- func (h *CIStateH) ClusterNodeAdd(node cmn.ClusterNodeMod) (int, error)
- func (h *CIStateH) ClusterNodeDelete(node cmn.ClusterNodeMod) (int, error)
- func (h *CIStateH) IsCIKAMode() bool
- type CloudHookInterface
- type ClusterInstance
- type ClusterNode
- type ConnGet
- type CtInfo
- func (ci *CtInfo) ConvertToDpCtInfo() DpCtInfo
- func (*CtInfo) Descriptor() ([]byte, []int)deprecated
- func (x *CtInfo) GetBlocknum() int32
- func (x *CtInfo) GetBytes() int64
- func (x *CtInfo) GetCact() string
- func (x *CtInfo) GetCi() string
- func (x *CtInfo) GetCstate() string
- func (x *CtInfo) GetDeleted() int32
- func (x *CtInfo) GetDip() []byte
- func (x *CtInfo) GetDport() int32
- func (x *CtInfo) GetL4Servport() int32
- func (x *CtInfo) GetPackets() int64
- func (x *CtInfo) GetPkey() []byte
- func (x *CtInfo) GetProto() string
- func (x *CtInfo) GetPval() []byte
- func (x *CtInfo) GetServiceip() []byte
- func (x *CtInfo) GetServproto() string
- func (x *CtInfo) GetSip() []byte
- func (x *CtInfo) GetSport() int32
- func (x *CtInfo) GetXsync() bool
- func (*CtInfo) ProtoMessage()
- func (x *CtInfo) ProtoReflect() protoreflect.Message
- func (x *CtInfo) Reset()
- func (x *CtInfo) String() string
- type CtInfoMod
- type DpCtInfo
- type DpEbpfH
- func (e *DpEbpfH) DpCtAdd(w *DpCtInfo) int
- func (e *DpEbpfH) DpCtDel(w *DpCtInfo) int
- func (e *DpEbpfH) DpCtGetAsync()
- func (e *DpEbpfH) DpEbpfUnInit()
- func (e *DpEbpfH) DpFwRuleAdd(w *FwDpWorkQ) int
- func (e *DpEbpfH) DpFwRuleDel(w *FwDpWorkQ) int
- func (e *DpEbpfH) DpFwRuleMod(w *FwDpWorkQ) int
- func (e *DpEbpfH) DpGetLock()
- func (e *DpEbpfH) DpL2AddrAdd(w *L2AddrDpWorkQ) int
- func (e *DpEbpfH) DpL2AddrDel(w *L2AddrDpWorkQ) int
- func (e *DpEbpfH) DpLBRuleAdd(w *LBDpWorkQ) int
- func (e *DpEbpfH) DpLBRuleDel(w *LBDpWorkQ) int
- func (e *DpEbpfH) DpMirrAdd(w *MirrDpWorkQ) int
- func (e *DpEbpfH) DpMirrDel(w *MirrDpWorkQ) int
- func (e *DpEbpfH) DpMirrMod(w *MirrDpWorkQ) int
- func (e *DpEbpfH) DpNextHopAdd(w *NextHopDpWorkQ) int
- func (e *DpEbpfH) DpNextHopDel(w *NextHopDpWorkQ) int
- func (e *DpEbpfH) DpPolAdd(w *PolDpWorkQ) int
- func (e *DpEbpfH) DpPolDel(w *PolDpWorkQ) int
- func (e *DpEbpfH) DpPolMod(w *PolDpWorkQ) int
- func (e *DpEbpfH) DpPortPropAdd(w *PortDpWorkQ) int
- func (e *DpEbpfH) DpPortPropDel(w *PortDpWorkQ) int
- func (e *DpEbpfH) DpPortPropMod(w *PortDpWorkQ) int
- func (e *DpEbpfH) DpRelLock()
- func (e *DpEbpfH) DpRouteAdd(w *RouteDpWorkQ) int
- func (e *DpEbpfH) DpRouteDel(w *RouteDpWorkQ) int
- func (e *DpEbpfH) DpRouterMacAdd(w *RouterMacDpWorkQ) int
- func (e *DpEbpfH) DpRouterMacDel(w *RouterMacDpWorkQ) int
- func (e *DpEbpfH) DpSockVIPAdd(w *SockVIPDpWorkQ) int
- func (e *DpEbpfH) DpSockVIPDel(w *SockVIPDpWorkQ) int
- func (e *DpEbpfH) DpSockVIPMod(w *SockVIPDpWorkQ) int
- func (e *DpEbpfH) DpStat(w *StatDpWorkQ) int
- func (e *DpEbpfH) DpTableGC()
- func (e *DpEbpfH) DpTableGet(w *TableDpWorkQ) (DpRetT, error)
- func (e *DpEbpfH) DpUlClAdd(w *UlClDpWorkQ) int
- func (e *DpEbpfH) DpUlClDel(w *UlClDpWorkQ) int
- func (e *DpEbpfH) DpUlClMod(w *UlClDpWorkQ) int
- 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 *LBDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnNextHop(nhWq *NextHopDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnPeerOp(pWq *PeerDpWorkQ) 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) DpWorkOnSockVIP(vsWq *SockVIPDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnStat(nWq *StatDpWorkQ) DpRetT
- func (dp *DpH) DpWorkOnTableOp(nWq *TableDpWorkQ) (DpRetT, error)
- func (dp *DpH) DpWorkOnUlCl(nWq *UlClDpWorkQ) DpRetT
- func (dp *DpH) DpXsyncInSync() bool
- func (dp *DpH) DpXsyncRPC(op DpSyncOpT, arg interface{}) int
- func (dp *DpH) DpXsyncRPCReset() int
- func (dp *DpH) WaitXsyncReady(who string)
- type DpHookInterface
- type DpPeer
- type DpRetT
- type DpStatusT
- type DpSyncOpT
- type DpTunT
- type DpWorkT
- type FdbAttr
- type FdbEnt
- type FdbKey
- type FdbStat
- type FdbTunAttr
- type FwDpWorkQ
- type FwOpT
- type GoBgpH
- func (gbh *GoBgpH) AddBGPRule(instance string, IP []string)
- func (gbh *GoBgpH) AddCurrBgpRoutesToIPRoute() error
- func (gbh *GoBgpH) AddPolicyDefinedSets(df cmn.GoBGPPolicyDefinedSetMod) (int, error)
- func (gbh *GoBgpH) AddPolicyDefinitions(name string, stmt []cmn.Statement) (int, error)
- func (gbh *GoBgpH) AdvertiseRoute(rtPrefix string, pLen int, nh string, pref uint32, med uint32, ipv4 bool) int
- func (gbh *GoBgpH) BGPApplyPolicyToNeighbor(cmdType, neigh string, polType string, policies []string, routeAction string) (int, error)
- func (gbh *GoBgpH) BGPGlobalConfigAdd(config cmn.GoBGPGlobalConfig) (int, error)
- func (gbh *GoBgpH) BGPNeighGet(address string, enableAdv bool) ([]cmn.GoBGPNeighGetMod, error)
- func (gbh *GoBgpH) BGPNeighMod(add bool, neigh net.IP, ras uint32, rPort uint32, mhop bool) (int, error)
- func (gbh *GoBgpH) DelAdvertiseRoute(rtPrefix string, pLen int, nh string, pref uint32, med uint32) int
- func (gbh *GoBgpH) DelBGPRule(instance string, IP []string)
- func (gbh *GoBgpH) DelPolicyDefinedSets(Name string, DefinedTypeString string) (int, error)
- func (gbh *GoBgpH) DelPolicyDefinitions(name string) (int, error)
- func (gbh *GoBgpH) GetActionRoute(route api.RouteAction) string
- func (gbh *GoBgpH) GetCommunityActionType(name string) api.CommunityAction_Type
- func (gbh *GoBgpH) GetMatchSetType(name string) api.MatchSet_Type
- func (gbh *GoBgpH) GetPolicy(name string) (*api.Policy, error)
- func (gbh *GoBgpH) GetPolicyDefinedSet(name string, DefinedTypeString string) ([]cmn.GoBGPPolicyDefinedSetMod, error)
- func (gbh *GoBgpH) GetPolicyDefinitions() ([]cmn.GoBGPPolicyDefinitionsMod, error)
- func (gbh *GoBgpH) GetRouteAction(name string) api.RouteAction
- func (gbh *GoBgpH) GetTypeCommunityAction(CommunityActionType api.CommunityAction_Type) string
- func (gbh *GoBgpH) GetTypeMatchSet(matchSet api.MatchSet_Type) string
- func (gbh *GoBgpH) GetgoBGPRoutesEvents(client api.GobgpApiClient) int
- func (gbh *GoBgpH) MakePrefixDefinedSet(prefixList []cmn.Prefix) ([]*api.Prefix, error)
- func (gbh *GoBgpH) UpdateCIState(instance string, state int, vip net.IP)
- type Ifa
- type IfaEnt
- type IfaKey
- type IterIntf
- type L2AddrDpWorkQ
- 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) IfaAddrLocal(addr net.IP) (int, net.IP)
- 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) IfaFindAddr(Obj string, 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
- func (l3 *L3H) IfasTicker(fsync bool)
- type LBDpWorkQ
- type MirrAttachObjT
- type MirrDpWorkQ
- 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 NatEP
- type NatSel
- type NatT
- type NcloudClient
- type NcloudConfig
- 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) NetBFDAdd(bm *cmn.BFDMod) (int, error)
- func (na *NetAPIStruct) NetBFDDel(bm *cmn.BFDMod) (int, error)
- func (na *NetAPIStruct) NetBFDGet() ([]cmn.BFDMod, error)
- func (na *NetAPIStruct) NetCIStateGet() ([]cmn.HASMod, error)
- func (na *NetAPIStruct) NetCIStateMod(hm *cmn.HASMod) (int, 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) NetGoBGPGCAdd(param *cmn.GoBGPGlobalConfig) (int, error)
- func (na *NetAPIStruct) NetGoBGPNeighAdd(param *cmn.GoBGPNeighMod) (int, error)
- func (na *NetAPIStruct) NetGoBGPNeighDel(param *cmn.GoBGPNeighMod) (int, error)
- func (na *NetAPIStruct) NetGoBGPNeighGet() ([]cmn.GoBGPNeighGetMod, error)
- func (na *NetAPIStruct) NetGoBGPPolicyApplyAdd(param *cmn.GoBGPPolicyApply) (int, error)
- func (na *NetAPIStruct) NetGoBGPPolicyApplyDel(param *cmn.GoBGPPolicyApply) (int, error)
- func (na *NetAPIStruct) NetGoBGPPolicyDefinedSetAdd(param *cmn.GoBGPPolicyDefinedSetMod) (int, error)
- func (na *NetAPIStruct) NetGoBGPPolicyDefinedSetDel(param *cmn.GoBGPPolicyDefinedSetMod) (int, error)
- func (na *NetAPIStruct) NetGoBGPPolicyDefinedSetGet(name string, DefinedTypeString string) ([]cmn.GoBGPPolicyDefinedSetMod, error)
- func (na *NetAPIStruct) NetGoBGPPolicyDefinitionAdd(param *cmn.GoBGPPolicyDefinitionsMod) (int, error)
- func (na *NetAPIStruct) NetGoBGPPolicyDefinitionDel(param *cmn.GoBGPPolicyDefinitionsMod) (int, error)
- func (na *NetAPIStruct) NetGoBGPPolicyDefinitionsGet() ([]cmn.GoBGPPolicyDefinitionsMod, error)
- func (na *NetAPIStruct) NetHandlePanic()
- 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) NetParamGet(param *cmn.ParamMod) (int, error)
- func (na *NetAPIStruct) NetParamSet(param cmn.ParamMod) (int, 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 NextHopDpWorkQ
- type NhType
- type PeerDpWorkQ
- type PolAttachObjT
- type PolDpWorkQ
- type PolEntry
- type PolH
- type PolKey
- type PolObjInfo
- type PolStats
- type Port
- type PortDpWorkQ
- 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 RPCHookInterface
- type RouteDpWorkQ
- type RouterMacDpWorkQ
- 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) RtDeleteHost(Dst net.IPNet, Zone 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) AddLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg, ...) (int, error)
- func (R *RuleH) AddRuleVIP(VIP net.IP, pVIP net.IP)
- func (R *RuleH) AdvRuleVIPIfL2(IP net.IP, eIP 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) DeleteLbRule(serv cmn.LbServiceArg) (int, error)
- func (R *RuleH) DeleteRuleVIP(VIP net.IP)
- func (R *RuleH) GetEpHosts() ([]cmn.EndPointMod, error)
- func (R *RuleH) GetFwRule() ([]cmn.FwRuleMod, error)
- func (R *RuleH) GetLBRule() ([]cmn.LbRuleMod, error)
- func (R *RuleH) GetLBRuleByID(ruleID uint32) *ruleEnt
- func (R *RuleH) GetLBRuleByServArgs(serv cmn.LbServiceArg) *ruleEnt
- func (R *RuleH) GetLBRuleSecIPs(serv cmn.LbServiceArg) []string
- func (R *RuleH) IsEPHostActive(epKey string) bool
- func (R *RuleH) IsIPRuleVIP(IP net.IP) bool
- func (R *RuleH) RuleDestructAll()
- func (R *RuleH) RuleVIPSyncToClusterState()
- func (R *RuleH) Rules2Json() ([]byte, error)
- func (R *RuleH) RulesSync()
- func (R *RuleH) RulesTicker()
- type SecT
- 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 SockVIPDpWorkQ
- type StatDpWorkQ
- type TableDpWorkQ
- type UlClDpWorkQ
- type UlClInf
- type UlClStats
- type UnimplementedXSyncServer
- func (UnimplementedXSyncServer) DpWorkOnBlockCtModGRPC(context.Context, *BlockCtInfoMod) (*XSyncReply, error)
- func (UnimplementedXSyncServer) DpWorkOnCtGetGRPC(context.Context, *ConnGet) (*XSyncReply, error)
- func (UnimplementedXSyncServer) DpWorkOnCtModGRPC(context.Context, *CtInfoMod) (*XSyncReply, error)
- type UnsafeXSyncServer
- 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 XSync
- func (xs *XSync) DpWorkOnBlockCtAdd(blockCtis []DpCtInfo, ret *int) error
- func (xs *XSync) DpWorkOnBlockCtDelete(blockCtis []DpCtInfo, ret *int) error
- func (xs *XSync) DpWorkOnBlockCtModGRPC(ctx context.Context, m *BlockCtInfoMod) (*XSyncReply, error)
- func (xs *XSync) DpWorkOnCtAdd(cti DpCtInfo, ret *int) error
- func (xs *XSync) DpWorkOnCtDelete(cti DpCtInfo, ret *int) error
- func (xs *XSync) DpWorkOnCtGet(async int, ret *int) error
- func (xs *XSync) DpWorkOnCtGetGRPC(ctx context.Context, m *ConnGet) (*XSyncReply, error)
- func (xs *XSync) DpWorkOnCtModGRPC(ctx context.Context, m *CtInfoMod) (*XSyncReply, error)
- type XSyncClient
- type XSyncReply
- type XSyncServer
- 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 ( CIErrBase = iota - 90000 CIModErr CIStateErr )
error codes for cluster module
const ( MapNameCt4 = "CT4" MapNameCt6 = "CT6" MapNameNat4 = "NAT4" MapNameBD = "BD" MapNameRxBD = "RXBD" MapNameTxBD = "TXBD" MapNameRt4 = "RT4" MapNameULCL = "ULCL" MapNameIpol = "IPOL" MapNameFw4 = "FW4" )
man names constants
const ( DpErrBase = iota - 103000 DpWqUnkErr )
error codes
const ( DpWorkQLen = 1024 XSyncPort = 22222 DpTiVal = 20 )
maximum dp work queue lengths
const ( RPCTypeNetRPC = iota RPCTypeGRPC )
const ( EbpfErrBase = iota - 50000 EbpfErrPortPropAdd EbpfErrPortPropDel EbpfErrEbpfLoad EbpfErrEbpfUnload EbpfErrL2AddrAdd EbpfErrL2AddrDel EbpfErrTmacAdd EbpfErrTmacDel EbpfErrNhAdd EbpfErrNhDel EbpfErrRt4Add EbpfErrRt4Del EbpfErrNat4Add EbpfErrNat4Del EbpfErrSess4Add EbpfErrSess4Del EbpfErrPolAdd EbpfErrPolDel EbpfErrMirrAdd EbpfErrMirrDel EbpfErrFwAdd EbpfErrFwDel EbpfErrCtAdd EbpfErrCtDel EbpfErrSockVIPMod EbpfErrSockVIPAdd EbpfErrSockVIPDel EbpfErrWqUnk )
error codes
const ( BGPConnected goBgpState = iota BGPDisconnected )
goBGP connected status
const ( L2ErrBase = iota - 3000 L2SameFdbErr L2OifErr L2NoFdbErr L2VxattrErr )
error codes
const ( L3ErrBase = iota - 8000 L3AddrErr L3ObjErr )
constants
const ( LoxinetTiVal = 10 GoBGPInitTiVal = 5 KAInitTiVal = 5 )
constants
const ( MkfsScript = "/usr/local/sbin/mkllb_bpffs" BpfFsCheckFile = "/opt/loxilb/dp/bpf/intf_map" MkMountCG2 = "/usr/local/sbin/mkllb_cgroup 1" )
utility variables
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 = 20 NeighRslvdAts = 40 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 = 1 << iota RtTypeDyn RtTypeSelf RtTypeHost RtTypeIntf )
rt type constants
const ( RuleErrBase = iota - 7000 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 ( MaxLBEndPoints = 32 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 LbDefaultInactiveNSTimeout = 20 // Default inactive timeout for non-session oriented protocols 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 VIPSweepDuration = 30 // Duration of periodic VIP maintenance DefaultPersistTimeOut = 10800 // Default persistent LB session timeout )
constants
const ( RtEm ruleTType = iota + 1 RtMf )
rt types
const ( RtActDrop ruleTActType = iota + 1 RtActFwd RtActTrap RtActRedirect RtActDnat RtActSnat RtActFullNat RtActFullProxy )
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 loxilb constants
const ( SessErrBase = iota - 102000 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 - 6000 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 = 4094
)
constant to declare maximum number of vlans
const (
MaximumZones = 256
)
constant to define maximum number of zones
const (
RootZone = "root"
)
string constant representing root security zone
Variables ¶
var File_loxinet_xsync_proto protoreflect.FileDescriptor
var XSync_ServiceDesc = grpc.ServiceDesc{ ServiceName: "XSync", HandlerType: (*XSyncServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DpWorkOnCtGetGRPC", Handler: _XSync_DpWorkOnCtGetGRPC_Handler, }, { MethodName: "DpWorkOnCtModGRPC", Handler: _XSync_DpWorkOnCtModGRPC_Handler, }, { MethodName: "DpWorkOnBlockCtModGRPC", Handler: _XSync_DpWorkOnBlockCtModGRPC_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "loxinet/xsync.proto", }
XSync_ServiceDesc is the grpc.ServiceDesc for XSync service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func DpEbpfDPLogLevel ¶
func DpEbpfDPLogLevel(cfg *C.struct_ebpfcfg, debug tk.LogLevelT)
DpEbpfDPLogLevel - Routine to set log level for DP
func DpEbpfSetLogLevel ¶
DpEbpfSetLogLevel - Set log level for ebpf subsystem
func DpL2AddrMod ¶
func DpL2AddrMod(w *L2AddrDpWorkQ) int
DpL2AddrMod - routine to work on a ebpf l2 addr request
func DpLBRuleMod ¶ added in v0.9.7
DpLBRuleMod - routine to work on a ebpf lb change request
func DpNextHopMod ¶
func DpNextHopMod(w *NextHopDpWorkQ) int
DpNextHopMod - routine to work on a ebpf next-hop change request
func DpRouteMod ¶
func DpRouteMod(w *RouteDpWorkQ) int
DpRouteMod - routine to work on a ebpf route change request
func DpRouterMacMod ¶
func DpRouterMacMod(w *RouterMacDpWorkQ) int
DpRouterMacMod - routine to work on a ebpf rt-mac change request
func FormatTimedelta ¶
func GetFlagToString ¶
GetFlagToString - Stringify route flags
func IfaMkString ¶
IfaMkString - Given an ifa return its string representation
func IsLoxiAPIActive ¶
IsLoxiAPIActive - Check if API url is active
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 NcloudApiInit ¶ added in v0.9.7
func NcloudApiInit() error
func PolInfoXlateValidate ¶
PolInfoXlateValidate - validates info passed in pInfo and translates it to internally used units
func PolObjValidate ¶
PolObjValidate - validate object to be attached
func RegisterXSyncServer ¶
func RegisterXSyncServer(s grpc.ServiceRegistrar, srv XSyncServer)
func RunCommand ¶
RunCommand - Run a bash command
Types ¶
type AWSAPIStruct ¶ added in v0.9.7
type AWSAPIStruct struct { }
AWSAPIStruct - empty struct for anchoring AWS routines
func AWSCloudHookNew ¶ added in v0.9.7
func AWSCloudHookNew() *AWSAPIStruct
AWSCloudHookNew - Create AWS specific API hooks
func (*AWSAPIStruct) CloudAPIInit ¶ added in v0.9.7
func (aws *AWSAPIStruct) CloudAPIInit(cloudCIDRBlock string) error
CloudAPIInit - Initialize the AWS cloud API
func (*AWSAPIStruct) CloudDestroyVIPNetWork ¶ added in v0.9.7
func (aws *AWSAPIStruct) CloudDestroyVIPNetWork() error
CloudDestroyVIPNetWork - Destroy the VIP network on "last" loxilb shutdown
func (*AWSAPIStruct) CloudPrepareVIPNetWork ¶ added in v0.9.7
func (aws *AWSAPIStruct) CloudPrepareVIPNetWork() error
CloudPrepareVIPNetWork - Prepare the VIP network on mastership transition
func (*AWSAPIStruct) CloudUnPrepareVIPNetWork ¶ added in v0.9.7
func (aws *AWSAPIStruct) CloudUnPrepareVIPNetWork() error
func (*AWSAPIStruct) CloudUpdatePrivateIP ¶ added in v0.9.7
CloudUpdatePrivateIP - Update private IP related to an elastic IP
type BlockCtInfoMod ¶
type BlockCtInfoMod struct { Add bool `protobuf:"varint,1,opt,name=add,proto3" json:"add,omitempty"` Ct []*CtInfo `protobuf:"bytes,2,rep,name=ct,proto3" json:"ct,omitempty"` // contains filtered or unexported fields }
func (*BlockCtInfoMod) Descriptor
deprecated
func (*BlockCtInfoMod) Descriptor() ([]byte, []int)
Deprecated: Use BlockCtInfoMod.ProtoReflect.Descriptor instead.
func (*BlockCtInfoMod) GetAdd ¶
func (x *BlockCtInfoMod) GetAdd() bool
func (*BlockCtInfoMod) GetCt ¶
func (x *BlockCtInfoMod) GetCt() []*CtInfo
func (*BlockCtInfoMod) ProtoMessage ¶
func (*BlockCtInfoMod) ProtoMessage()
func (*BlockCtInfoMod) ProtoReflect ¶
func (x *BlockCtInfoMod) ProtoReflect() protoreflect.Message
func (*BlockCtInfoMod) Reset ¶
func (x *BlockCtInfoMod) Reset()
func (*BlockCtInfoMod) String ¶
func (x *BlockCtInfoMod) String() string
type CIKAArgs ¶
CIKAArgs - Struct for cluster BFD args
func KAString2Mode ¶
KAString2Mode - Convert ka mode in string opts to spawn/KAMode
type CIStateH ¶
type CIStateH struct { SpawnKa bool RemoteIP net.IP SourceIP net.IP Interval int64 ClusterMap map[string]*ClusterInstance StateMap map[string]int NodeMap map[string]*ClusterNode Bs *bfd.Struct }
CIStateH - Cluster context handler
func (*CIStateH) BFDSessionNotify ¶
func (*CIStateH) CIBFDSessionAdd ¶
CIBFDSessionAdd - routine to add BFD session
func (*CIStateH) CIBFDSessionDel ¶
CIBFDSessionDel - routine to delete BFD session
func (*CIStateH) CIBFDSessionGet ¶
CIBFDSessionGet - routine to get BFD session info
func (*CIStateH) CIStateGet ¶
CIStateGet - routine to get HA state
func (*CIStateH) CIStateGetInst ¶
CIStateGetInst - routine to get HA state
func (*CIStateH) CIStateUpdate ¶
CIStateUpdate - routine to update cluster state
func (*CIStateH) CITicker ¶
func (h *CIStateH) CITicker()
CITicker - Periodic ticker for Cluster module
func (*CIStateH) ClusterNodeAdd ¶
func (h *CIStateH) ClusterNodeAdd(node cmn.ClusterNodeMod) (int, error)
ClusterNodeAdd - routine to update cluster nodes
func (*CIStateH) ClusterNodeDelete ¶
func (h *CIStateH) ClusterNodeDelete(node cmn.ClusterNodeMod) (int, error)
ClusterNodeDelete - routine to delete cluster node
func (*CIStateH) IsCIKAMode ¶
IsCIKAMode - routine to get KA mode
type CloudHookInterface ¶ added in v0.9.7
type CloudHookInterface interface { CloudAPIInit(cloudCIDRBlock string) error CloudPrepareVIPNetWork() error CloudUnPrepareVIPNetWork() error CloudDestroyVIPNetWork() error CloudUpdatePrivateIP(vIP net.IP, eIP net.IP, add bool) error }
CloudHookInterface - Go interface which needs to be implemented to
func CloudHookNew ¶ added in v0.9.7
func CloudHookNew(cloudLabel string) CloudHookInterface
type ClusterInstance ¶
ClusterInstance - Struct for Cluster Instance information
type ClusterNode ¶
ClusterNode - Struct for Cluster Node Information
func (*ClusterNode) DP ¶
func (cn *ClusterNode) DP(work DpWorkT) int
DP - sync state of cluster-node entity to data-path
type ConnGet ¶
type ConnGet struct { Async int32 `protobuf:"varint,1,opt,name=async,proto3" json:"async,omitempty"` // contains filtered or unexported fields }
func (*ConnGet) Descriptor
deprecated
func (*ConnGet) ProtoMessage ¶
func (*ConnGet) ProtoMessage()
func (*ConnGet) ProtoReflect ¶
func (x *ConnGet) ProtoReflect() protoreflect.Message
type CtInfo ¶
type CtInfo struct { Dip []byte `protobuf:"bytes,1,opt,name=dip,proto3" json:"dip,omitempty"` Sip []byte `protobuf:"bytes,2,opt,name=sip,proto3" json:"sip,omitempty"` Dport int32 `protobuf:"varint,3,opt,name=dport,proto3" json:"dport,omitempty"` Sport int32 `protobuf:"varint,4,opt,name=sport,proto3" json:"sport,omitempty"` Proto string `protobuf:"bytes,5,opt,name=proto,proto3" json:"proto,omitempty"` Cstate string `protobuf:"bytes,6,opt,name=cstate,proto3" json:"cstate,omitempty"` Cact string `protobuf:"bytes,7,opt,name=cact,proto3" json:"cact,omitempty"` Ci string `protobuf:"bytes,8,opt,name=ci,proto3" json:"ci,omitempty"` Packets int64 `protobuf:"varint,9,opt,name=packets,proto3" json:"packets,omitempty"` Bytes int64 `protobuf:"varint,10,opt,name=bytes,proto3" json:"bytes,omitempty"` Deleted int32 `protobuf:"varint,11,opt,name=deleted,proto3" json:"deleted,omitempty"` Pkey []byte `protobuf:"bytes,12,opt,name=pkey,proto3" json:"pkey,omitempty"` Pval []byte `protobuf:"bytes,13,opt,name=pval,proto3" json:"pval,omitempty"` Xsync bool `protobuf:"varint,14,opt,name=xsync,proto3" json:"xsync,omitempty"` Serviceip []byte `protobuf:"bytes,15,opt,name=serviceip,proto3" json:"serviceip,omitempty"` Servproto string `protobuf:"bytes,16,opt,name=servproto,proto3" json:"servproto,omitempty"` L4Servport int32 `protobuf:"varint,17,opt,name=l4servport,proto3" json:"l4servport,omitempty"` Blocknum int32 `protobuf:"varint,18,opt,name=blocknum,proto3" json:"blocknum,omitempty"` // contains filtered or unexported fields }
func (*CtInfo) ConvertToDpCtInfo ¶
func (*CtInfo) Descriptor
deprecated
func (*CtInfo) GetBlocknum ¶
func (*CtInfo) GetDeleted ¶
func (*CtInfo) GetL4Servport ¶
func (*CtInfo) GetPackets ¶
func (*CtInfo) GetServiceip ¶
func (*CtInfo) GetServproto ¶
func (*CtInfo) ProtoMessage ¶
func (*CtInfo) ProtoMessage()
func (*CtInfo) ProtoReflect ¶
func (x *CtInfo) ProtoReflect() protoreflect.Message
type CtInfoMod ¶
type CtInfoMod struct { Add bool `protobuf:"varint,1,opt,name=add,proto3" json:"add,omitempty"` Ct *CtInfo `protobuf:"bytes,2,opt,name=ct,proto3" json:"ct,omitempty"` // contains filtered or unexported fields }
func (*CtInfoMod) Descriptor
deprecated
func (*CtInfoMod) ProtoMessage ¶
func (*CtInfoMod) ProtoMessage()
func (*CtInfoMod) ProtoReflect ¶
func (x *CtInfoMod) ProtoReflect() protoreflect.Message
type DpCtInfo ¶
type DpCtInfo struct { DIP net.IP `json:"dip"` SIP net.IP `json:"sip"` Dport uint16 `json:"dport"` Sport uint16 `json:"sport"` Proto string `json:"proto"` CState string `json:"cstate"` CAct string `json:"cact"` CI string `json:"ci"` Packets uint64 `json:"packets"` Bytes uint64 `json:"bytes"` Deleted int `json:"deleted"` PKey []byte `json:"pkey"` PVal []byte `json:"pval"` LTs time.Time `json:"lts"` NTs time.Time `json:"nts"` XSync bool `json:"xsync"` // LB Association Data ServiceIP net.IP `json:"serviceip"` ServProto string `json:"servproto"` L4ServPort uint16 `json:"l4servproto"` BlockNum uint16 `json:"blocknum"` RuleID uint32 `json:"ruleid"` }
DpCtInfo - representation of a datapath conntrack information
func (*DpCtInfo) ConvertToCtInfo ¶
type DpEbpfH ¶
type DpEbpfH struct { CtSync bool RssEn bool ToMapCh chan interface{} ToFinCh [mapNotifierWorkers]chan int // contains filtered or unexported fields }
DpEbpfH - context container
func DpEbpfInit ¶
func DpEbpfInit(clusterEn, rssEn, egrHooks, localSockPolicy, sockMapEn bool, nodeNum int, disBPF bool, logLevel tk.LogLevelT) *DpEbpfH
DpEbpfInit - initialize the ebpf dp subsystem
func (*DpEbpfH) DpCtGetAsync ¶
func (e *DpEbpfH) DpCtGetAsync()
DpCtGetAsync - routine to work on a ebpf ct get async request
func (*DpEbpfH) DpEbpfUnInit ¶
func (e *DpEbpfH) DpEbpfUnInit()
DpEbpfUnInit - uninitialize the ebpf dp subsystem
func (*DpEbpfH) DpFwRuleAdd ¶
DpFwRuleAdd - routine to work on a ebpf fw add request
func (*DpEbpfH) DpFwRuleDel ¶
DpFwRuleDel - routine to work on a ebpf fw delete request
func (*DpEbpfH) DpFwRuleMod ¶
DpFwRuleMod - routine to work on a ebpf fw mod request
func (*DpEbpfH) DpGetLock ¶
func (e *DpEbpfH) DpGetLock()
DpTakeLock - routine to take underlying DP lock
func (*DpEbpfH) DpL2AddrAdd ¶
func (e *DpEbpfH) DpL2AddrAdd(w *L2AddrDpWorkQ) int
DpL2AddrAdd - routine to work on a ebpf l2 addr add
func (*DpEbpfH) DpL2AddrDel ¶
func (e *DpEbpfH) DpL2AddrDel(w *L2AddrDpWorkQ) int
DpL2AddrDel - routine to work on a ebpf l2 addr delete
func (*DpEbpfH) DpLBRuleAdd ¶ added in v0.9.7
DpLBRuleAdd - routine to work on a ebpf lb add request
func (*DpEbpfH) DpLBRuleDel ¶ added in v0.9.7
DpLBRuleDel - routine to work on a ebpf lb delete request
func (*DpEbpfH) DpMirrAdd ¶
func (e *DpEbpfH) DpMirrAdd(w *MirrDpWorkQ) int
DpMirrAdd - routine to work on a ebpf mirror add request
func (*DpEbpfH) DpMirrDel ¶
func (e *DpEbpfH) DpMirrDel(w *MirrDpWorkQ) int
DpMirrDel - routine to work on a ebpf mirror delete request
func (*DpEbpfH) DpMirrMod ¶
func (e *DpEbpfH) DpMirrMod(w *MirrDpWorkQ) int
DpMirrMod - routine to work on a ebpf mirror modify request
func (*DpEbpfH) DpNextHopAdd ¶
func (e *DpEbpfH) DpNextHopAdd(w *NextHopDpWorkQ) int
DpNextHopAdd - routine to work on a ebpf next-hop add request
func (*DpEbpfH) DpNextHopDel ¶
func (e *DpEbpfH) DpNextHopDel(w *NextHopDpWorkQ) int
DpNextHopDel - routine to work on a ebpf next-hop delete request
func (*DpEbpfH) DpPolAdd ¶
func (e *DpEbpfH) DpPolAdd(w *PolDpWorkQ) int
DpPolAdd - routine to work on a ebpf policer add request
func (*DpEbpfH) DpPolDel ¶
func (e *DpEbpfH) DpPolDel(w *PolDpWorkQ) int
DpPolDel - routine to work on a ebpf policer delete request
func (*DpEbpfH) DpPolMod ¶
func (e *DpEbpfH) DpPolMod(w *PolDpWorkQ) int
DpPolMod - routine to work on a ebpf policer change request
func (*DpEbpfH) DpPortPropAdd ¶
func (e *DpEbpfH) DpPortPropAdd(w *PortDpWorkQ) int
DpPortPropAdd - routine to work on a ebpf port property add
func (*DpEbpfH) DpPortPropDel ¶
func (e *DpEbpfH) DpPortPropDel(w *PortDpWorkQ) int
DpPortPropDel - routine to work on a ebpf port property delete
func (*DpEbpfH) DpPortPropMod ¶
func (e *DpEbpfH) DpPortPropMod(w *PortDpWorkQ) int
DpPortPropMod - routine to work on a ebpf port property request
func (*DpEbpfH) DpRelLock ¶
func (e *DpEbpfH) DpRelLock()
DpRelLock - routine to release underlying DP lock
func (*DpEbpfH) DpRouteAdd ¶
func (e *DpEbpfH) DpRouteAdd(w *RouteDpWorkQ) int
DpRouteAdd - routine to work on a ebpf route add request
func (*DpEbpfH) DpRouteDel ¶
func (e *DpEbpfH) DpRouteDel(w *RouteDpWorkQ) int
DpRouteDel - routine to work on a ebpf route delete request
func (*DpEbpfH) DpRouterMacAdd ¶
func (e *DpEbpfH) DpRouterMacAdd(w *RouterMacDpWorkQ) int
DpRouterMacAdd - routine to work on a ebpf rt-mac add request
func (*DpEbpfH) DpRouterMacDel ¶
func (e *DpEbpfH) DpRouterMacDel(w *RouterMacDpWorkQ) int
DpRouterMacDel - routine to work on a ebpf rt-mac delete request
func (*DpEbpfH) DpSockVIPAdd ¶
func (e *DpEbpfH) DpSockVIPAdd(w *SockVIPDpWorkQ) int
DpSockVIPAdd - routine to work on a ebpf local VIP-port rewrite addition
func (*DpEbpfH) DpSockVIPDel ¶
func (e *DpEbpfH) DpSockVIPDel(w *SockVIPDpWorkQ) int
DpSockVIPDel - routine to work on a ebpf local VIP-port rewrite delete
func (*DpEbpfH) DpSockVIPMod ¶
func (e *DpEbpfH) DpSockVIPMod(w *SockVIPDpWorkQ) int
DpSockVIPMod - routine to work on a ebpf local VIP-port rewrite modification
func (*DpEbpfH) DpStat ¶
func (e *DpEbpfH) DpStat(w *StatDpWorkQ) int
DpStat - routine to work on a ebpf map statistics request
func (*DpEbpfH) DpTableGC ¶
func (e *DpEbpfH) DpTableGC()
DpTableGC - Work on table garbage collection
func (*DpEbpfH) DpTableGet ¶
func (e *DpEbpfH) DpTableGet(w *TableDpWorkQ) (DpRetT, error)
DpTableGet - routine to work on a ebpf map get request
func (*DpEbpfH) DpUlClAdd ¶
func (e *DpEbpfH) DpUlClAdd(w *UlClDpWorkQ) int
DpUlClAdd - routine to work on a ebpf ul-cl filter add request
func (*DpEbpfH) DpUlClDel ¶
func (e *DpEbpfH) DpUlClDel(w *UlClDpWorkQ) int
DpUlClDel - routine to work on a ebpf ul-cl filter delete request
func (*DpEbpfH) DpUlClMod ¶
func (e *DpEbpfH) DpUlClMod(w *UlClDpWorkQ) int
DpUlClMod - routine to work on a ebpf ul-cl filter change request
type DpH ¶
type DpH struct { ToDpCh chan interface{} FromDpCh chan interface{} ToFinCh chan int DpHooks DpHookInterface SyncMtx sync.RWMutex Peers []DpPeer RPC *XSync Remotes []XSync }
DpH - datapath context container
func DpBrokerInit ¶
func DpBrokerInit(dph DpHookInterface, rpcMode int) *DpH
DpBrokerInit - initialize the DP broker subsystem
func (*DpH) DpMapGetCt4 ¶
DpMapGetCt4 - get DP conntrack information as a map
func (*DpH) DpWorkOnFw ¶
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 ¶
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) DpWorkOnPeerOp ¶
func (dp *DpH) DpWorkOnPeerOp(pWq *PeerDpWorkQ) DpRetT
DpWorkOnPeerOp - routine to work on a peer request for clustering
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) DpWorkOnSockVIP ¶
func (dp *DpH) DpWorkOnSockVIP(vsWq *SockVIPDpWorkQ) DpRetT
DpWorkOnSockVIP - routine to work on local VIP-port rewrite
func (*DpH) DpWorkOnStat ¶
func (dp *DpH) DpWorkOnStat(nWq *StatDpWorkQ) DpRetT
DpWorkOnStat - routine to work on a stat work queue request
func (*DpH) DpWorkOnTableOp ¶
func (dp *DpH) DpWorkOnTableOp(nWq *TableDpWorkQ) (DpRetT, error)
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
func (*DpH) DpXsyncInSync ¶
DpXsyncInSync - Routine to check if remote peer is in sync
func (*DpH) DpXsyncRPC ¶
DpXsyncRPC - Routine for syncing connection information with peers
func (*DpH) DpXsyncRPCReset ¶
DpXsyncRPCReset - Routine to reset Sunc RPC Client connections
func (*DpH) WaitXsyncReady ¶
WaitXsyncReady - Routine to wait till it ready for syncing the peer entity
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 DpLBRuleAdd(*LBDpWorkQ) int DpLBRuleDel(*LBDpWorkQ) 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 DpSockVIPAdd(w *SockVIPDpWorkQ) int DpSockVIPDel(w *SockVIPDpWorkQ) int DpTableGC() DpCtGetAsync() DpGetLock() DpRelLock() DpEbpfUnInit() }
DpHookInterface - represents a go interface which should be implemented to integrate with loxinet realm
type DpRetT ¶
type DpRetT interface { }
DpRetT - an empty interface to represent immediate operation result
func DpWorkSingle ¶
DpWorkSingle - routine to work on a single dp work queue request
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 FwDpWorkQ ¶
type FwDpWorkQ struct { Work DpWorkT Status *DpStatusT ZoneNum int SrcIP net.IPNet DstIP net.IPNet L4SrcMin uint16 L4SrcMax uint16 L4DstMin uint16 L4DstMax uint16 Port uint16 Pref uint16 Proto uint8 Mark int FwType FwOpT FwVal1 uint16 FwVal2 uint32 FwRecord bool }
FwDpWorkQ - work queue entry for fw related operation
type GoBgpH ¶
type GoBgpH struct {
// contains filtered or unexported fields
}
GoBgpH - context container
func (*GoBgpH) AddBGPRule ¶
AddBGPRule - add a bgp rule in goBGP
func (*GoBgpH) AddCurrBgpRoutesToIPRoute ¶
AddCurrBgpRoutesToIPRoute - add bgp routes to OS
func (*GoBgpH) AddPolicyDefinedSets ¶ added in v0.9.4
func (gbh *GoBgpH) AddPolicyDefinedSets(df cmn.GoBGPPolicyDefinedSetMod) (int, error)
AddPolicyDefinedSets - Add Policy Defined Set like a Prefix, neighbor. etc
func (*GoBgpH) AddPolicyDefinitions ¶ added in v0.9.4
AddPolicyDefinitions - Add Policy with definitions
func (*GoBgpH) AdvertiseRoute ¶
func (gbh *GoBgpH) AdvertiseRoute(rtPrefix string, pLen int, nh string, pref uint32, med uint32, ipv4 bool) int
AdvertiseRoute - advertise a new route using goBGP
func (*GoBgpH) BGPApplyPolicyToNeighbor ¶ added in v0.9.4
func (gbh *GoBgpH) BGPApplyPolicyToNeighbor(cmdType, neigh string, polType string, policies []string, routeAction string) (int, error)
BGPApplyPolicyToNeighbor - Routine to add BGP Policy to goBGP server
func (*GoBgpH) BGPGlobalConfigAdd ¶
func (gbh *GoBgpH) BGPGlobalConfigAdd(config cmn.GoBGPGlobalConfig) (int, error)
BGPGlobalConfigAdd - Routine to add global config in goBGP server
func (*GoBgpH) BGPNeighGet ¶
BGPNeighGet - Routine to get BGP neigh from goBGP server
func (*GoBgpH) BGPNeighMod ¶
func (gbh *GoBgpH) BGPNeighMod(add bool, neigh net.IP, ras uint32, rPort uint32, mhop bool) (int, error)
BGPNeighMod - Routine to add BGP neigh to goBGP server
func (*GoBgpH) DelAdvertiseRoute ¶
func (gbh *GoBgpH) DelAdvertiseRoute(rtPrefix string, pLen int, nh string, pref uint32, med uint32) int
DelAdvertiseRoute - delete previously advertised route in goBGP
func (*GoBgpH) DelBGPRule ¶
DelBGPRule - delete a bgp rule in goBGP
func (*GoBgpH) DelPolicyDefinedSets ¶ added in v0.9.4
DelDefinedSets - Delete DefinedSet
func (*GoBgpH) DelPolicyDefinitions ¶ added in v0.9.4
DelPolicyDefinitions - Del Policy Definitions
func (*GoBgpH) GetActionRoute ¶ added in v0.9.4
func (gbh *GoBgpH) GetActionRoute(route api.RouteAction) string
GetActionRoute - RouteAction to String
func (*GoBgpH) GetCommunityActionType ¶ added in v0.9.4
func (gbh *GoBgpH) GetCommunityActionType(name string) api.CommunityAction_Type
GetCommunityActionType - String to CommunityAction_Type
func (*GoBgpH) GetMatchSetType ¶ added in v0.9.4
func (gbh *GoBgpH) GetMatchSetType(name string) api.MatchSet_Type
GetMatchSetType - String to MatchSet_Type
func (*GoBgpH) GetPolicyDefinedSet ¶ added in v0.9.4
func (gbh *GoBgpH) GetPolicyDefinedSet(name string, DefinedTypeString string) ([]cmn.GoBGPPolicyDefinedSetMod, error)
GetPolicyDefinedSet - Get Policy Defined Set
func (*GoBgpH) GetPolicyDefinitions ¶ added in v0.9.4
func (gbh *GoBgpH) GetPolicyDefinitions() ([]cmn.GoBGPPolicyDefinitionsMod, error)
GetPolicyDefinitions - Get Policy Definitions
func (*GoBgpH) GetRouteAction ¶ added in v0.9.4
func (gbh *GoBgpH) GetRouteAction(name string) api.RouteAction
GetRouteAction - String to RouteAction
func (*GoBgpH) GetTypeCommunityAction ¶ added in v0.9.4
func (gbh *GoBgpH) GetTypeCommunityAction(CommunityActionType api.CommunityAction_Type) string
GetCommunityActionType - String to CommunityAction_Type
func (*GoBgpH) GetTypeMatchSet ¶ added in v0.9.4
func (gbh *GoBgpH) GetTypeMatchSet(matchSet api.MatchSet_Type) string
GetTypeMatchSet - MatchSet_Type to String
func (*GoBgpH) GetgoBGPRoutesEvents ¶
func (gbh *GoBgpH) GetgoBGPRoutesEvents(client api.GobgpApiClient) int
GetgoBGPRoutesEvents - get routes in goBGP
func (*GoBgpH) MakePrefixDefinedSet ¶ added in v0.9.4
MakePrefixDefinedSet - Make Prefix DefinedSet
type IterIntf ¶
type IterIntf interface {
NodeWalker(b string)
}
IterIntf - interface implementation to iterate various loxinet subsystems entitities
type L2AddrDpWorkQ ¶
type L2AddrDpWorkQ struct { Work DpWorkT Status *DpStatusT L2Addr [6]uint8 Tun DpTunT NhNum int PortNum int BD int Tagged int }
L2AddrDpWorkQ - work queue entry for l2 address operation
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) IfaAddrLocal ¶
IfaAddrLocal - 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) 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) IfaFindAddr ¶
IfaFindAddr - 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) 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
func (*L3H) IfasTicker ¶ added in v0.9.5
IfaTicker - Periodic ticker for checking Ifas
type LBDpWorkQ ¶ added in v0.9.7
type LBDpWorkQ struct { Work DpWorkT Status *DpStatusT ZoneNum int ServiceIP net.IP L4Port uint16 BlockNum uint16 DsrMode bool CsumDis bool SecMode SecT HostURL string Proto uint8 Mark int NatType NatT EpSel NatSel InActTo uint64 PersistTo uint64 // contains filtered or unexported fields }
LBDpWorkQ - work queue entry for lb related operation
type MirrAttachObjT ¶
type MirrAttachObjT interface { }
MirrAttachObjT - empty interface to hold mirror attachments
type MirrDpWorkQ ¶
type MirrDpWorkQ struct { Work DpWorkT Name string Mark int MiPortNum int MiBD int Status *DpStatusT }
MirrDpWorkQ - work queue entry for mirror operation
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 loxinet
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 loxinet
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 NcloudClient ¶ added in v0.9.7
type NcloudClient struct {
// contains filtered or unexported fields
}
func (*NcloudClient) NcloudCreatePrivateIp ¶ added in v0.9.7
func (n *NcloudClient) NcloudCreatePrivateIp(ni string, vIP net.IP) error
func (*NcloudClient) NcloudDeletePrivateIp ¶ added in v0.9.7
func (n *NcloudClient) NcloudDeletePrivateIp(ni string, vIP net.IP) error
func (*NcloudClient) NcloudGetMetadataInterfaceID ¶ added in v0.9.7
func (n *NcloudClient) NcloudGetMetadataInterfaceID() (string, error)
func (*NcloudClient) NcloudUpdatePrivateIp ¶ added in v0.9.7
func (n *NcloudClient) NcloudUpdatePrivateIp(vIP net.IP, add bool) error
type NcloudConfig ¶ added in v0.9.7
type Neigh ¶
type Neigh struct { Key NeighKey Addr net.IP Attr NeighAttr Dummy bool 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 {
BgpPeerMode bool
}
NetAPIStruct - empty struct for anchoring client routines
func NetAPIInit ¶
func NetAPIInit(bgpPeerMode bool) *NetAPIStruct
NetAPIInit - Initialize a new instance of NetAPI
func (*NetAPIStruct) NetAddrAdd ¶
func (na *NetAPIStruct) NetAddrAdd(am *cmn.IPAddrMod) (int, error)
NetAddrAdd - Add an ipv4 address in loxinet
func (*NetAPIStruct) NetAddrDel ¶
func (na *NetAPIStruct) NetAddrDel(am *cmn.IPAddrMod) (int, error)
NetAddrDel - Delete an ipv4 address in loxinet
func (*NetAPIStruct) NetAddrGet ¶
func (na *NetAPIStruct) NetAddrGet() ([]cmn.IPAddrGet, error)
NetAddrGet - Get an IPv4 Address info from loxinet
func (*NetAPIStruct) NetBFDAdd ¶
func (na *NetAPIStruct) NetBFDAdd(bm *cmn.BFDMod) (int, error)
NetBFDAdd - Add BFD Session
func (*NetAPIStruct) NetBFDDel ¶
func (na *NetAPIStruct) NetBFDDel(bm *cmn.BFDMod) (int, error)
NetBFDDel - Delete BFD Session
func (*NetAPIStruct) NetBFDGet ¶
func (na *NetAPIStruct) NetBFDGet() ([]cmn.BFDMod, error)
NetCIStateMod - Modify cluster state
func (*NetAPIStruct) NetCIStateGet ¶
func (na *NetAPIStruct) NetCIStateGet() ([]cmn.HASMod, error)
NetCIStateGet - Get current node cluster state
func (*NetAPIStruct) NetCIStateMod ¶
func (na *NetAPIStruct) NetCIStateMod(hm *cmn.HASMod) (int, error)
NetCIStateMod - Modify cluster state
func (*NetAPIStruct) NetCtInfoGet ¶
func (na *NetAPIStruct) NetCtInfoGet() ([]cmn.CtInfo, error)
NetCtInfoGet - Get connection track info from loxinet
func (*NetAPIStruct) NetEpHostAdd ¶
func (na *NetAPIStruct) NetEpHostAdd(em *cmn.EndPointMod) (int, error)
NetEpHostAdd - Add a LB end-point in loxinet
func (*NetAPIStruct) NetEpHostDel ¶
func (na *NetAPIStruct) NetEpHostDel(em *cmn.EndPointMod) (int, error)
NetEpHostDel - Delete a LB end-point in loxinet
func (*NetAPIStruct) NetEpHostGet ¶
func (na *NetAPIStruct) NetEpHostGet() ([]cmn.EndPointMod, error)
NetEpHostGet - Get LB end-points from loxinet
func (*NetAPIStruct) NetFdbAdd ¶
func (na *NetAPIStruct) NetFdbAdd(fm *cmn.FdbMod) (int, error)
NetFdbAdd - Add a forwarding database entry in loxinet
func (*NetAPIStruct) NetFdbDel ¶
func (na *NetAPIStruct) NetFdbDel(fm *cmn.FdbMod) (int, error)
NetFdbDel - Delete a forwarding database entry in loxinet
func (*NetAPIStruct) NetFwRuleAdd ¶
func (na *NetAPIStruct) NetFwRuleAdd(fm *cmn.FwRuleMod) (int, error)
NetFwRuleAdd - Add a firewall rule in loxinet
func (*NetAPIStruct) NetFwRuleDel ¶
func (na *NetAPIStruct) NetFwRuleDel(fm *cmn.FwRuleMod) (int, error)
NetFwRuleDel - Delete a firewall rule in loxinet
func (*NetAPIStruct) NetFwRuleGet ¶
func (na *NetAPIStruct) NetFwRuleGet() ([]cmn.FwRuleMod, error)
NetFwRuleGet - Get a firewall rule from loxinet
func (*NetAPIStruct) NetGoBGPGCAdd ¶
func (na *NetAPIStruct) NetGoBGPGCAdd(param *cmn.GoBGPGlobalConfig) (int, error)
NetGoBGPGCAdd - Add bgp global config
func (*NetAPIStruct) NetGoBGPNeighAdd ¶
func (na *NetAPIStruct) NetGoBGPNeighAdd(param *cmn.GoBGPNeighMod) (int, error)
NetGoBGPNeighAdd - Add bgp neigh to gobgp
func (*NetAPIStruct) NetGoBGPNeighDel ¶
func (na *NetAPIStruct) NetGoBGPNeighDel(param *cmn.GoBGPNeighMod) (int, error)
NetGoBGPNeighDel - Del bgp neigh from gobgp
func (*NetAPIStruct) NetGoBGPNeighGet ¶
func (na *NetAPIStruct) NetGoBGPNeighGet() ([]cmn.GoBGPNeighGetMod, error)
NetGoBGPNeighGet - Get bgp neigh to gobgp
func (*NetAPIStruct) NetGoBGPPolicyApplyAdd ¶ added in v0.9.4
func (na *NetAPIStruct) NetGoBGPPolicyApplyAdd(param *cmn.GoBGPPolicyApply) (int, error)
NetGoBGPPolicyApplyAdd - Add bgp neigh to gobgp
func (*NetAPIStruct) NetGoBGPPolicyApplyDel ¶ added in v0.9.5
func (na *NetAPIStruct) NetGoBGPPolicyApplyDel(param *cmn.GoBGPPolicyApply) (int, error)
NetGoBGPPolicyApplyDel - Del bgp neigh to gobgp
func (*NetAPIStruct) NetGoBGPPolicyDefinedSetAdd ¶ added in v0.9.4
func (na *NetAPIStruct) NetGoBGPPolicyDefinedSetAdd(param *cmn.GoBGPPolicyDefinedSetMod) (int, error)
NetGoBGPPolicyPrefixAdd - Add Prefixset in bgp
func (*NetAPIStruct) NetGoBGPPolicyDefinedSetDel ¶ added in v0.9.4
func (na *NetAPIStruct) NetGoBGPPolicyDefinedSetDel(param *cmn.GoBGPPolicyDefinedSetMod) (int, error)
NetGoBGPPolicyPrefixAdd - Add Prefixset in bgp
func (*NetAPIStruct) NetGoBGPPolicyDefinedSetGet ¶ added in v0.9.4
func (na *NetAPIStruct) NetGoBGPPolicyDefinedSetGet(name string, DefinedTypeString string) ([]cmn.GoBGPPolicyDefinedSetMod, error)
func (*NetAPIStruct) NetGoBGPPolicyDefinitionAdd ¶ added in v0.9.4
func (na *NetAPIStruct) NetGoBGPPolicyDefinitionAdd(param *cmn.GoBGPPolicyDefinitionsMod) (int, error)
NetGoBGPPolicyNeighAdd - Add bgp neigh to gobgp
func (*NetAPIStruct) NetGoBGPPolicyDefinitionDel ¶ added in v0.9.4
func (na *NetAPIStruct) NetGoBGPPolicyDefinitionDel(param *cmn.GoBGPPolicyDefinitionsMod) (int, error)
NetGoBGPPolicyNeighAdd - Add bgp neigh to gobgp
func (*NetAPIStruct) NetGoBGPPolicyDefinitionsGet ¶ added in v0.9.4
func (na *NetAPIStruct) NetGoBGPPolicyDefinitionsGet() ([]cmn.GoBGPPolicyDefinitionsMod, error)
NetGoBGPPolicyDefinitionsGet - Add bgp neigh to gobgp
func (*NetAPIStruct) NetHandlePanic ¶
func (na *NetAPIStruct) NetHandlePanic()
NetHandlePanic - Handle panics
func (*NetAPIStruct) NetLbRuleAdd ¶
func (na *NetAPIStruct) NetLbRuleAdd(lm *cmn.LbRuleMod) (int, error)
NetLbRuleAdd - Add a load-balancer rule in loxinet
func (*NetAPIStruct) NetLbRuleDel ¶
func (na *NetAPIStruct) NetLbRuleDel(lm *cmn.LbRuleMod) (int, error)
NetLbRuleDel - Delete a load-balancer rule in loxinet
func (*NetAPIStruct) NetLbRuleGet ¶
func (na *NetAPIStruct) NetLbRuleGet() ([]cmn.LbRuleMod, error)
NetLbRuleGet - Get a load-balancer rule from loxinet
func (*NetAPIStruct) NetMirrorAdd ¶
func (*NetAPIStruct) NetMirrorAdd(mm *cmn.MirrMod) (int, error)
NetMirrorAdd - Add a mirror in loxinet
func (*NetAPIStruct) NetMirrorDel ¶
func (*NetAPIStruct) NetMirrorDel(mm *cmn.MirrMod) (int, error)
NetMirrorDel - Delete a mirror in loxinet
func (*NetAPIStruct) NetMirrorGet ¶
func (*NetAPIStruct) NetMirrorGet() ([]cmn.MirrGetMod, error)
NetMirrorGet - Get a mirror in loxinet
func (*NetAPIStruct) NetNeighAdd ¶
func (na *NetAPIStruct) NetNeighAdd(nm *cmn.NeighMod) (int, error)
NetNeighAdd - Add a neighbor in loxinet
func (*NetAPIStruct) NetNeighDel ¶
func (na *NetAPIStruct) NetNeighDel(nm *cmn.NeighMod) (int, error)
NetNeighDel - Delete a neighbor in loxinet
func (*NetAPIStruct) NetNeighGet ¶
func (na *NetAPIStruct) NetNeighGet() ([]cmn.NeighMod, error)
NetNeighGet - Get a neighbor in loxinet
func (*NetAPIStruct) NetParamGet ¶
func (na *NetAPIStruct) NetParamGet(param *cmn.ParamMod) (int, error)
NetParamGet - Get operational params of loxinet
func (*NetAPIStruct) NetParamSet ¶
func (na *NetAPIStruct) NetParamSet(param cmn.ParamMod) (int, error)
NetParamSet - Set operational params of loxinet
func (*NetAPIStruct) NetPolicerAdd ¶
func (na *NetAPIStruct) NetPolicerAdd(pm *cmn.PolMod) (int, error)
NetPolicerAdd - Add a policer in loxinet
func (*NetAPIStruct) NetPolicerDel ¶
func (na *NetAPIStruct) NetPolicerDel(pm *cmn.PolMod) (int, error)
NetPolicerDel - Delete a policer in loxinet
func (*NetAPIStruct) NetPolicerGet ¶
func (na *NetAPIStruct) NetPolicerGet() ([]cmn.PolMod, error)
NetPolicerGet - Get a policer in loxinet
func (*NetAPIStruct) NetPortAdd ¶
func (na *NetAPIStruct) NetPortAdd(pm *cmn.PortMod) (int, error)
NetPortAdd - Add a port in loxinet
func (*NetAPIStruct) NetPortDel ¶
func (na *NetAPIStruct) NetPortDel(pm *cmn.PortMod) (int, error)
NetPortDel - Delete port from loxinet
func (*NetAPIStruct) NetPortGet ¶
func (*NetAPIStruct) NetPortGet() ([]cmn.PortDump, error)
NetPortGet - Get Port Information of loxinet
func (*NetAPIStruct) NetRouteAdd ¶
func (na *NetAPIStruct) NetRouteAdd(rm *cmn.RouteMod) (int, error)
NetRouteAdd - Add a route in loxinet
func (*NetAPIStruct) NetRouteDel ¶
func (na *NetAPIStruct) NetRouteDel(rm *cmn.RouteMod) (int, error)
NetRouteDel - Delete a route in loxinet
func (*NetAPIStruct) NetRouteGet ¶
func (na *NetAPIStruct) NetRouteGet() ([]cmn.RouteGet, error)
NetRouteGet - Get Route info from loxinet
func (*NetAPIStruct) NetSessionAdd ¶
func (na *NetAPIStruct) NetSessionAdd(sm *cmn.SessionMod) (int, error)
NetSessionAdd - Add a 3gpp user-session info in loxinet
func (*NetAPIStruct) NetSessionDel ¶
func (na *NetAPIStruct) NetSessionDel(sm *cmn.SessionMod) (int, error)
NetSessionDel - Delete a 3gpp user-session info in loxinet
func (*NetAPIStruct) NetSessionGet ¶
func (na *NetAPIStruct) NetSessionGet() ([]cmn.SessionMod, error)
NetSessionGet - Get 3gpp user-session info in loxinet
func (*NetAPIStruct) NetSessionUlClAdd ¶
func (na *NetAPIStruct) NetSessionUlClAdd(sr *cmn.SessionUlClMod) (int, error)
NetSessionUlClAdd - Add a 3gpp ulcl-filter info in loxinet
func (*NetAPIStruct) NetSessionUlClDel ¶
func (na *NetAPIStruct) NetSessionUlClDel(sr *cmn.SessionUlClMod) (int, error)
NetSessionUlClDel - Delete a 3gpp ulcl-filter info in loxinet
func (*NetAPIStruct) NetSessionUlClGet ¶
func (na *NetAPIStruct) NetSessionUlClGet() ([]cmn.SessionUlClMod, error)
NetSessionUlClGet - Get 3gpp ulcl filter info from loxinet
func (*NetAPIStruct) NetVlanAdd ¶
func (na *NetAPIStruct) NetVlanAdd(vm *cmn.VlanMod) (int, error)
NetVlanAdd - Add vlan info to loxinet
func (*NetAPIStruct) NetVlanDel ¶
func (na *NetAPIStruct) NetVlanDel(vm *cmn.VlanMod) (int, error)
NetVlanDel - Delete vlan info from loxinet
func (*NetAPIStruct) NetVlanGet ¶
func (na *NetAPIStruct) NetVlanGet() ([]cmn.VlanGet, error)
NetVlanGet - Get Vlan Information of loxinet
func (*NetAPIStruct) NetVlanPortAdd ¶
func (na *NetAPIStruct) NetVlanPortAdd(vm *cmn.VlanPortMod) (int, error)
NetVlanPortAdd - Add a port to vlan in loxinet
func (*NetAPIStruct) NetVlanPortDel ¶
func (na *NetAPIStruct) NetVlanPortDel(vm *cmn.VlanPortMod) (int, error)
NetVlanPortDel - Delete a port from vlan in loxinet
type NextHopDpWorkQ ¶
type NextHopDpWorkQ struct { Work DpWorkT Status *DpStatusT TunNh bool TunID uint32 TunType DpTunT RIP net.IP SIP net.IP NNextHopNum int NextHopNum int Resolved bool DstAddr [6]uint8 SrcAddr [6]uint8 BD int }
NextHopDpWorkQ - work queue entry for nexthop operation
type PeerDpWorkQ ¶
PeerDpWorkQ - work queue entry for peer association
type PolAttachObjT ¶
type PolAttachObjT interface { }
PolAttachObjT - empty interface to hold policer attachments
type PolDpWorkQ ¶
type PolDpWorkQ struct { Work DpWorkT Name string Mark int Cir uint64 Pir uint64 Cbs uint64 Ebs uint64 Color bool Srt bool Status *DpStatusT }
PolDpWorkQ - work queue entry for policer related operation
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) IsIPinIPTunPort ¶
IsIPinIPTunPort - check if the port is of IPinIPTun type
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 PortDpWorkQ ¶
type PortDpWorkQ struct { Work DpWorkT Status *DpStatusT OsPortNum int PortNum int IngVlan int SetBD int SetZoneNum int Prop cmn.PortProp SetMirr int SetPol int LoadEbpf string }
PortDpWorkQ - work queue entry for port operation
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 loxinet realm
func (*PortsH) PortDestructAll ¶
func (P *PortsH) PortDestructAll()
PortDestructAll - destroy all ports in loxinet realm
func (*PortsH) PortFindByName ¶
PortFindByName - find a port in loxinet realm given port name
func (*PortsH) PortFindByOSID ¶
PortFindByOSID - find a port in loxinet 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 loxinet realm to json format
func (*PortsH) Ports2String ¶
Ports2String - dump ports in loxinet realm to string format
type RPCHookInterface ¶
type RouteDpWorkQ ¶
type RouteDpWorkQ struct { Work DpWorkT Status *DpStatusT ZoneNum int Dst net.IPNet RtType int RtMark int NMax int NMark [8]int }
RouteDpWorkQ - work queue entry for rt operation
type RouterMacDpWorkQ ¶
type RouterMacDpWorkQ struct { Work DpWorkT Status *DpStatusT L2Addr [6]uint8 PortNum int BD int TunID uint32 TunType DpTunT NhNum int }
RouterMacDpWorkQ - work queue entry for rt-mac operation
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
func (*Rt) RtNhMarkString ¶ added in v0.9.5
RtNhMarkString - get the rt-entry's neighbor in string format
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) RtDeleteHost ¶
RtDeleteHost - Delete a host route
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) AddLbRule ¶ added in v0.9.7
func (R *RuleH) AddLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg, servEndPoints []cmn.LbEndPointArg) (int, error)
AddLbRule - Add a service LB 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) DeleteLbRule ¶ added in v0.9.7
func (R *RuleH) DeleteLbRule(serv cmn.LbServiceArg) (int, error)
DeleteLbRule - Delete a service LB 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) DeleteRuleVIP ¶ added in v0.9.7
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) GetLBRule ¶ added in v0.9.7
GetLBRule - get all rules and pack them into a cmn.LbRuleMod slice
func (*RuleH) GetLBRuleByID ¶ added in v0.9.7
GetLBRuleByID - Get a LB rule by its identifier
func (*RuleH) GetLBRuleByServArgs ¶ added in v0.9.7
func (R *RuleH) GetLBRuleByServArgs(serv cmn.LbServiceArg) *ruleEnt
GetLBRuleByServArgs - Get a LB rule by its service args
func (*RuleH) GetLBRuleSecIPs ¶ added in v0.9.7
func (R *RuleH) GetLBRuleSecIPs(serv cmn.LbServiceArg) []string
GetLBRuleSecIPs - Get secondary IPs for SCTP LB 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) RuleVIPSyncToClusterState ¶
func (R *RuleH) RuleVIPSyncToClusterState()
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 SockVIPDpWorkQ ¶
SockVIPDpWorkQ - work queue entry for local VIP-port rewrite
type StatDpWorkQ ¶
type StatDpWorkQ struct { Work DpWorkT Name string Mark uint32 Packets *uint64 Bytes *uint64 DropPackets *uint64 }
StatDpWorkQ - work queue entry for stat operation
type TableDpWorkQ ¶
TableDpWorkQ - work queue entry for map related operation
type UlClDpWorkQ ¶
type UlClDpWorkQ struct { Work DpWorkT Status *DpStatusT MDip net.IP MSip net.IP Zone int Qfi uint8 Mark int TDip net.IP TSip net.IP TTeID uint32 Type DpTunT // contains filtered or unexported fields }
UlClDpWorkQ - work queue entry for ul-cl filter related operation
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 UnimplementedXSyncServer ¶
type UnimplementedXSyncServer struct { }
UnimplementedXSyncServer must be embedded to have forward compatible implementations.
func (UnimplementedXSyncServer) DpWorkOnBlockCtModGRPC ¶
func (UnimplementedXSyncServer) DpWorkOnBlockCtModGRPC(context.Context, *BlockCtInfoMod) (*XSyncReply, error)
func (UnimplementedXSyncServer) DpWorkOnCtGetGRPC ¶
func (UnimplementedXSyncServer) DpWorkOnCtGetGRPC(context.Context, *ConnGet) (*XSyncReply, error)
func (UnimplementedXSyncServer) DpWorkOnCtModGRPC ¶
func (UnimplementedXSyncServer) DpWorkOnCtModGRPC(context.Context, *CtInfoMod) (*XSyncReply, error)
type UnsafeXSyncServer ¶
type UnsafeXSyncServer interface {
// contains filtered or unexported methods
}
UnsafeXSyncServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to XSyncServer will result in compilation errors.
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 XSync ¶
type XSync struct { RemoteID int RPCState bool // For peer to peer RPC RPCType int RPCHooks RPCHookInterface }
XSync - Remote sync peer information
func (*XSync) DpWorkOnBlockCtAdd ¶
DpWorkOnBlockCtAdd - Add block CT entries from remote goRPC client
func (*XSync) DpWorkOnBlockCtDelete ¶
DpWorkOnBlockCtDelete - Add block CT entries from remote
func (*XSync) DpWorkOnBlockCtModGRPC ¶
func (xs *XSync) DpWorkOnBlockCtModGRPC(ctx context.Context, m *BlockCtInfoMod) (*XSyncReply, error)
func (*XSync) DpWorkOnCtAdd ¶
DpWorkOnCtAdd - Add a CT entry from remote goRPC client
func (*XSync) DpWorkOnCtDelete ¶
DpWorkOnCtDelete - Delete a CT entry from remote goRPC client
func (*XSync) DpWorkOnCtGet ¶
DpWorkOnCtGet - Get all CT entries asynchronously goRPC client
func (*XSync) DpWorkOnCtGetGRPC ¶
func (*XSync) DpWorkOnCtModGRPC ¶
type XSyncClient ¶
type XSyncClient interface { DpWorkOnCtGetGRPC(ctx context.Context, in *ConnGet, opts ...grpc.CallOption) (*XSyncReply, error) DpWorkOnCtModGRPC(ctx context.Context, in *CtInfoMod, opts ...grpc.CallOption) (*XSyncReply, error) DpWorkOnBlockCtModGRPC(ctx context.Context, in *BlockCtInfoMod, opts ...grpc.CallOption) (*XSyncReply, error) }
XSyncClient is the client API for XSync service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewXSyncClient ¶
func NewXSyncClient(cc grpc.ClientConnInterface) XSyncClient
type XSyncReply ¶
type XSyncReply struct { Response int32 `protobuf:"varint,1,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*XSyncReply) Descriptor
deprecated
func (*XSyncReply) Descriptor() ([]byte, []int)
Deprecated: Use XSyncReply.ProtoReflect.Descriptor instead.
func (*XSyncReply) GetResponse ¶
func (x *XSyncReply) GetResponse() int32
func (*XSyncReply) ProtoMessage ¶
func (*XSyncReply) ProtoMessage()
func (*XSyncReply) ProtoReflect ¶
func (x *XSyncReply) ProtoReflect() protoreflect.Message
func (*XSyncReply) Reset ¶
func (x *XSyncReply) Reset()
func (*XSyncReply) String ¶
func (x *XSyncReply) String() string
type XSyncServer ¶
type XSyncServer interface { DpWorkOnCtGetGRPC(context.Context, *ConnGet) (*XSyncReply, error) DpWorkOnCtModGRPC(context.Context, *CtInfoMod) (*XSyncReply, error) DpWorkOnBlockCtModGRPC(context.Context, *BlockCtInfoMod) (*XSyncReply, error) // contains filtered or unexported methods }
XSyncServer is the server API for XSync service. All implementations must embed UnimplementedXSyncServer for forward compatibility
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 loxiNetTicker
Source Files ¶
- apiclient.go
- cluster.go
- dpbroker.go
- dpebpf_linux.go
- gobgpclient.go
- layer2.go
- layer3.go
- loxinet.go
- loxinettest.go
- mirror.go
- neighbor.go
- port.go
- qospol.go
- route.go
- rules.go
- session.go
- utils.go
- utils_aws.go
- utils_cloud.go
- utils_naver.go
- vlan.go
- xsync.pb.go
- xsync_client.go
- xsync_grpc.pb.go
- xsync_server.go
- zones.go