nlasvc

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_VLAN_VID = 1
View Source
const NLA_BRIDGE_VLAN_UPDATE_CHAN_SIZE = 128 * 4
View Source
const TunnelUpdateInterval = 1800 * time.Second

Variables

This section is empty.

Functions

func DatasToNetlnkMessages

func DatasToNetlnkMessages(nid uint8, mtype uint16, datas [][]byte) []*nlamsg.NetlinkMessage

func GetNetlinkMessageAddrs

func GetNetlinkMessageAddrs(nid uint8) ([]*nlamsg.NetlinkMessage, error)
func GetNetlinkMessageLinks(nid uint8) ([]*nlamsg.NetlinkMessage, error)

func GetNetlinkMessageNeighs

func GetNetlinkMessageNeighs(nid uint8) ([]*nlamsg.NetlinkMessage, error)

func GetNetlinkMessageRoutes

func GetNetlinkMessageRoutes(nid uint8) ([]*nlamsg.NetlinkMessage, error)

func NewLogEntry added in v0.4.0

func NewLogEntry(module string, fields log.Fields) *log.Entry

func NewLogger added in v0.4.0

func NewLogger(module string) *log.Entry

func SubscribeNetlinkResources

func SubscribeNetlinkResources(ch chan<- *nlamsg.NetlinkMessage, nid uint8) error

Types

type NLAApiServer

type NLAApiServer struct {
	NlMsgs chan<- *nlamsg.NetlinkMessageUnion
	// contains filtered or unexported fields
}

NLA API Server

func NewNLAApiServer

func NewNLAApiServer(addr string, nid uint8) *NLAApiServer

func (*NLAApiServer) GetAddr

func (n *NLAApiServer) GetAddr(ctxt context.Context, req *nlaapi.AddrKey) (*nlaapi.Addr, error)

func (*NLAApiServer) GetAddrs

func (*NLAApiServer) GetBridgeVlanInfo added in v0.4.0

func (n *NLAApiServer) GetBridgeVlanInfo(ctxt context.Context, req *nlaapi.BridgeVlanInfoKey) (*nlaapi.BridgeVlanInfo, error)

func (*NLAApiServer) GetBridgeVlanInfos added in v0.4.0

func (*NLAApiServer) GetEncapInfo

func (n *NLAApiServer) GetEncapInfo(ctxt context.Context, req *nlaapi.EncapInfoKey) (*nlaapi.EncapInfo, error)

func (*NLAApiServer) GetEncapInfos

func (*NLAApiServer) GetIptun added in v0.3.1

func (n *NLAApiServer) GetIptun(ctxt context.Context, req *nlaapi.IptunKey) (*nlaapi.Iptun, error)

func (*NLAApiServer) GetIptuns added in v0.3.1

func (n *NLAApiServer) GetLink(ctxt context.Context, req *nlaapi.LinkKey) (*nlaapi.Link, error)

func (*NLAApiServer) GetMpls

func (n *NLAApiServer) GetMpls(ctxt context.Context, req *nlaapi.MplsKey) (*nlaapi.Route, error)

func (*NLAApiServer) GetMplss

func (*NLAApiServer) GetNeigh

func (n *NLAApiServer) GetNeigh(ctxt context.Context, req *nlaapi.NeighKey) (*nlaapi.Neigh, error)

func (*NLAApiServer) GetNeighs

func (*NLAApiServer) GetNode

func (n *NLAApiServer) GetNode(ctxt context.Context, req *nlaapi.NodeKey) (*nlaapi.Node, error)

func (*NLAApiServer) GetNodes

func (*NLAApiServer) GetRoute

func (n *NLAApiServer) GetRoute(ctxt context.Context, req *nlaapi.RouteKey) (*nlaapi.Route, error)

func (*NLAApiServer) GetRoutes

func (*NLAApiServer) GetStats

func (*NLAApiServer) GetVpn

func (n *NLAApiServer) GetVpn(ctxt context.Context, req *nlaapi.VpnKey) (*nlaapi.Vpn, error)

func (*NLAApiServer) GetVpns

func (*NLAApiServer) ModVpn

func (*NLAApiServer) Start

func (n *NLAApiServer) Start(ch chan<- *nlamsg.NetlinkMessageUnion) error

type NLAApiService

type NLAApiService struct {
	NId    uint8
	Addr   string
	NlMsgs chan *nlamsg.NetlinkMessageUnion
	// contains filtered or unexported fields
}

NLA API Service

func NewNLAApiService

func NewNLAApiService(addr string) *NLAApiService

func (*NLAApiService) NetlinkAddr

func (n *NLAApiService) NetlinkAddr(nlmsg *nlamsg.NetlinkMessage, addr *nlamsg.Addr)

func (*NLAApiService) NetlinkBridgeVlanInfo added in v0.4.0

func (n *NLAApiService) NetlinkBridgeVlanInfo(nlmsg *nlamsg.NetlinkMessage, brvlan *nlamsg.BridgeVlanInfo)
func (n *NLAApiService) NetlinkLink(nlmsg *nlamsg.NetlinkMessage, link *nlamsg.Link)

func (*NLAApiService) NetlinkMessage

func (n *NLAApiService) NetlinkMessage(nlmsg *nlamsg.NetlinkMessage)

func (*NLAApiService) NetlinkNeigh

func (n *NLAApiService) NetlinkNeigh(nlmsg *nlamsg.NetlinkMessage, neigh *nlamsg.Neigh)

func (*NLAApiService) NetlinkNode

func (n *NLAApiService) NetlinkNode(nlmsg *nlamsg.NetlinkMessage, node *nlamsg.Node)

func (*NLAApiService) NetlinkRoute

func (n *NLAApiService) NetlinkRoute(nlmsg *nlamsg.NetlinkMessage, route *nlamsg.Route)

func (*NLAApiService) NetlinkVpn

func (n *NLAApiService) NetlinkVpn(nlmsg *nlamsg.NetlinkMessage, vpn *nlamsg.Vpn)

func (*NLAApiService) Start

func (n *NLAApiService) Start(nid uint8, chans *nlactl.NLAChannels) error

func (*NLAApiService) Stop

func (n *NLAApiService) Stop()

type NLABridgeVlanService added in v0.4.0

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

func NewNLABridgeVlanService added in v0.4.0

func NewNLABridgeVlanService(service nlactl.NLAService, updTime time.Duration, updChanSize int) *NLABridgeVlanService
func (s *NLABridgeVlanService) NetlinkLink(nlmsg *nlamsg.NetlinkMessage, link *nlamsg.Link)

func (*NLABridgeVlanService) NetlinkNeigh added in v0.4.0

func (n *NLABridgeVlanService) NetlinkNeigh(nlmsg *nlamsg.NetlinkMessage, neigh *nlamsg.Neigh)

func (*NLABridgeVlanService) Serve added in v0.4.0

func (s *NLABridgeVlanService) Serve(done chan struct{})

func (*NLABridgeVlanService) Start added in v0.4.0

func (s *NLABridgeVlanService) Start(nid uint8, chans *nlactl.NLAChannels) error

func (*NLABridgeVlanService) Stop added in v0.4.0

func (s *NLABridgeVlanService) Stop()

type NLABridgeVlanUpdate added in v0.4.0

type NLABridgeVlanUpdate struct {
	Link    netlink.Link
	MsgType uint16
}

func NewNLABridgeVlanUpdate added in v0.4.0

func NewNLABridgeVlanUpdate(msgType uint16, link netlink.Link) *NLABridgeVlanUpdate

func (*NLABridgeVlanUpdate) String added in v0.4.0

func (n *NLABridgeVlanUpdate) String() string

type NLACoreApiServer

type NLACoreApiServer struct {
	NlMsgs chan<- *nlamsg.NetlinkMessage
	// contains filtered or unexported fields
}

NLACoreApiServer

func NewNLACoreApiServer

func NewNLACoreApiServer(addr string) *NLACoreApiServer

func (*NLACoreApiServer) MonNetlinkMessage

func (n *NLACoreApiServer) MonNetlinkMessage(req *nlaapi.Node, stream nlaapi.NLACoreApi_MonNetlinkMessageServer) error

func (*NLACoreApiServer) SendNetlinkMessage

func (n *NLACoreApiServer) SendNetlinkMessage(ctxt context.Context, req *nlaapi.NetlinkMessage) (*nlaapi.NetlinkMessageReply, error)

func (*NLACoreApiServer) Start

func (n *NLACoreApiServer) Start(ch chan<- *nlamsg.NetlinkMessage) error

type NLACoreApiService

type NLACoreApiService struct {
	Addr string
	// contains filtered or unexported fields
}

func NewNLACoreApiService

func NewNLACoreApiService(addr string) *NLACoreApiService

func (*NLACoreApiService) Start

func (n *NLACoreApiService) Start(nid uint8, chans *nlactl.NLAChannels) error

func (*NLACoreApiService) Stop

func (n *NLACoreApiService) Stop()

type NLALogService

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

func NewNLALogService

func NewNLALogService(dump uint32) *NLALogService

func (*NLALogService) NetlinkAddr

func (n *NLALogService) NetlinkAddr(nlmsg *nlamsg.NetlinkMessage, addr *nlamsg.Addr)

func (*NLALogService) NetlinkBridgeVlanInfo added in v0.4.0

func (n *NLALogService) NetlinkBridgeVlanInfo(nlmsg *nlamsg.NetlinkMessage, brvlan *nlamsg.BridgeVlanInfo)
func (n *NLALogService) NetlinkLink(nlmsg *nlamsg.NetlinkMessage, link *nlamsg.Link)

func (*NLALogService) NetlinkMessage

func (n *NLALogService) NetlinkMessage(nlmsg *nlamsg.NetlinkMessage)

func (*NLALogService) NetlinkNeigh

func (n *NLALogService) NetlinkNeigh(nlmsg *nlamsg.NetlinkMessage, neigh *nlamsg.Neigh)

func (*NLALogService) NetlinkNode

func (n *NLALogService) NetlinkNode(nlmsg *nlamsg.NetlinkMessage, node *nlamsg.Node)

func (*NLALogService) NetlinkRoute

func (n *NLALogService) NetlinkRoute(nlmsg *nlamsg.NetlinkMessage, route *nlamsg.Route)

func (*NLALogService) NetlinkVpn

func (n *NLALogService) NetlinkVpn(nlmsg *nlamsg.NetlinkMessage, vpn *nlamsg.Vpn)

func (*NLALogService) Start

func (*NLALogService) Stop

func (n *NLALogService) Stop()

type NLAMasterIptun added in v0.3.1

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

func NewNLAMasterIptun added in v0.3.1

func NewNLAMasterIptun(master *NLAMasterService, updateInterval time.Duration) *NLAMasterIptun

func (*NLAMasterIptun) DelNeigh added in v0.3.1

func (n *NLAMasterIptun) DelNeigh(tun *nlamsg.Iptun)

func (*NLAMasterIptun) NewIptunRoute added in v0.3.1

func (n *NLAMasterIptun) NewIptunRoute(route *nlamsg.Route) *nlamsg.Route

func (*NLAMasterIptun) NewNeigh added in v0.3.1

func (n *NLAMasterIptun) NewNeigh(tun *nlamsg.Iptun, route *nlamsg.Route)

func (*NLAMasterIptun) NewRoutes added in v0.3.1

func (n *NLAMasterIptun) NewRoutes(neigh *nlamsg.Neigh, f func(*nlamsg.Route))

func (*NLAMasterIptun) RemoteDown added in v0.3.1

func (n *NLAMasterIptun) RemoteDown(nid uint8, remote net.IP)

func (*NLAMasterIptun) RemoteRouteDown added in v0.3.1

func (n *NLAMasterIptun) RemoteRouteDown(route *nlamsg.Route)

func (*NLAMasterIptun) RemoteRouteUp added in v0.3.1

func (n *NLAMasterIptun) RemoteRouteUp(route *nlamsg.Route)

func (*NLAMasterIptun) RemoteUp added in v0.3.1

func (n *NLAMasterIptun) RemoteUp(nid uint8, remote net.IP)

func (*NLAMasterIptun) Serve added in v0.3.1

func (n *NLAMasterIptun) Serve()

type NLAMasterService

type NLAMasterService struct {
	Service nlactl.NLAService

	NId uint8
	// contains filtered or unexported fields
}

func NewNLAMasterService

func NewNLAMasterService(service nlactl.NLAService) *NLAMasterService

func (*NLAMasterService) NetlinkAddr

func (n *NLAMasterService) NetlinkAddr(nlmsg *nlamsg.NetlinkMessage, addr *nlamsg.Addr)

func (*NLAMasterService) NetlinkBridgeVlanInfo added in v0.4.0

func (n *NLAMasterService) NetlinkBridgeVlanInfo(nlmsg *nlamsg.NetlinkMessage, brvlan *nlamsg.BridgeVlanInfo)

func (*NLAMasterService) NetlinkIPRouteOnMIC

func (n *NLAMasterService) NetlinkIPRouteOnMIC(nlmsg *nlamsg.NetlinkMessage, route *nlamsg.Route)

func (*NLAMasterService) NetlinkIPRouteOnRIC

func (n *NLAMasterService) NetlinkIPRouteOnRIC(nlmsg *nlamsg.NetlinkMessage, route *nlamsg.Route)
func (n *NLAMasterService) NetlinkLink(nlmsg *nlamsg.NetlinkMessage, link *nlamsg.Link)

func (*NLAMasterService) NetlinkMessage

func (n *NLAMasterService) NetlinkMessage(nlmsg *nlamsg.NetlinkMessage)

func (*NLAMasterService) NetlinkMplsRoute

func (n *NLAMasterService) NetlinkMplsRoute(nlmsg *nlamsg.NetlinkMessage, route *nlamsg.Route)

func (*NLAMasterService) NetlinkNeigh

func (n *NLAMasterService) NetlinkNeigh(nlmsg *nlamsg.NetlinkMessage, neigh *nlamsg.Neigh)

func (*NLAMasterService) NetlinkNode

func (n *NLAMasterService) NetlinkNode(nlmsg *nlamsg.NetlinkMessage, node *nlamsg.Node)

func (*NLAMasterService) NetlinkRoute

func (n *NLAMasterService) NetlinkRoute(nlmsg *nlamsg.NetlinkMessage, route *nlamsg.Route)

func (*NLAMasterService) NetlinkVpn

func (n *NLAMasterService) NetlinkVpn(nlmsg *nlamsg.NetlinkMessage, vpn *nlamsg.Vpn)

func (*NLAMasterService) NewVpnRoute

func (n *NLAMasterService) NewVpnRoute(ricRoute *nlamsg.Route) *nlamsg.Route

func (*NLAMasterService) NewVpnRoutes

func (n *NLAMasterService) NewVpnRoutes(gwRoute *nlamsg.Route, f func(*nlamsg.Route) error)

func (*NLAMasterService) Start

func (n *NLAMasterService) Start(nid uint8, chans *nlactl.NLAChannels) error

func (*NLAMasterService) Stop

func (n *NLAMasterService) Stop()

type NLANetlinkService

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

func NewNLANetlinkService

func NewNLANetlinkService() *NLANetlinkService
func (s *NLANetlinkService) NetlinkLink(nlmsg *nlamsg.NetlinkMessage, link *nlamsg.Link)

func (*NLANetlinkService) NetlinkNeigh added in v0.4.0

func (s *NLANetlinkService) NetlinkNeigh(nlmsg *nlamsg.NetlinkMessage, neigh *nlamsg.Neigh)

func (*NLANetlinkService) Start

func (*NLANetlinkService) Stop

func (s *NLANetlinkService) Stop()

type NLASlaveService

type NLASlaveService struct {
	NId   uint8
	Addr  string
	Chans *nlactl.NLAChannels
	// contains filtered or unexported fields
}

func NewNLASlaveService

func NewNLASlaveService(addr string) *NLASlaveService

func (*NLASlaveService) Connect

func (n *NLASlaveService) Connect(addr string) (<-chan *nlalib.ConnInfo, error)

func (*NLASlaveService) MonNetlinkMessage

func (n *NLASlaveService) MonNetlinkMessage(ci *nlalib.ConnInfo)

func (*NLASlaveService) NetlinkMessage

func (n *NLASlaveService) NetlinkMessage(nlmsg *nlamsg.NetlinkMessage)

func (*NLASlaveService) Serve

func (n *NLASlaveService) Serve(connected <-chan *nlalib.ConnInfo)

func (*NLASlaveService) Start

func (n *NLASlaveService) Start(nid uint8, chans *nlactl.NLAChannels) error

func (*NLASlaveService) Stop

func (n *NLASlaveService) Stop()

Jump to

Keyboard shortcuts

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