server

package
v0.0.0-...-ac9ef1f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ARPServer

type ARPServer struct {
	AsicdSubSocketCh chan commonDefs.AsicdNotifyMsg

	ConfRefreshTimeout int
	MinRefreshTimeout  int

	ResolveIPv4Ch        chan ResolveIPv4
	DeleteResolvedIPv4Ch chan DeleteResolvedIPv4
	ArpConfCh            chan ArpConf

	InitDone chan bool

	ArpActionCh chan ArpActionMsg

	AsicdPlugin asicdClient.AsicdClientIntf
	// contains filtered or unexported fields
}

func NewARPServer

func NewARPServer(logger *logging.Writer) *ARPServer

func (*ARPServer) FlushLinuxArpCache

func (server *ARPServer) FlushLinuxArpCache()

func (*ARPServer) GetArpEntry

func (server *ARPServer) GetArpEntry(ipAddr string) (arpState ArpState, err error)

func (*ARPServer) GetBulkArpEntry

func (server *ARPServer) GetBulkArpEntry(idx int, cnt int) (int, int, []ArpState)

func (*ARPServer) GetBulkLinuxArpEntry

func (server *ARPServer) GetBulkLinuxArpEntry(idx int, cnt int) (int, int, []ArpLinuxState)

func (*ARPServer) GetLinuxArpEntry

func (server *ARPServer) GetLinuxArpEntry(ipAddr string) (arpState ArpLinuxState, err error)

func (*ARPServer) InitServer

func (server *ARPServer) InitServer(asicdPlugin asicdClient.AsicdClientIntf)

func (*ARPServer) SendArpProbe

func (server *ARPServer) SendArpProbe(port int)

func (*ARPServer) StartArpRxTx

func (server *ARPServer) StartArpRxTx(ifName string, macAddr string) (*pcap.Handle, error)

func (*ARPServer) StartServer

func (server *ARPServer) StartServer(asicdPlugin asicdClient.AsicdClientIntf)

type ActionType

type ActionType uint8
const (
	DeleteByIPAddr  ActionType = 1
	RefreshByIPAddr ActionType = 2
	DeleteByIfName  ActionType = 3
	RefreshByIfName ActionType = 4
)

type ArpActionMsg

type ArpActionMsg struct {
	Type ActionType
	Obj  string
}

type ArpConf

type ArpConf struct {
	RefTimeout int
}

type ArpEntry

type ArpEntry struct {
	MacAddr   string
	VlanId    int
	IfName    string
	L3IfIdx   int
	Counter   int
	TimeStamp time.Time
	PortNum   int
	Type      bool //True : RIB False: RX
}

type ArpLinuxEntry

type ArpLinuxEntry struct {
	IpAddr  string
	HWType  string
	Flags   string
	MacAddr string
	Mask    string
	IfName  string
}

func GetLinuxArpCache

func GetLinuxArpCache() []ArpLinuxEntry

type ArpLinuxState

type ArpLinuxState struct {
	IpAddr  string
	HWType  string
	MacAddr string
	IfName  string
}

type ArpState

type ArpState struct {
	IpAddr         string
	MacAddr        string
	VlanId         int
	Intf           string
	ExpiryTimeLeft string
}

type AsicdMsg

type AsicdMsg struct {
	MsgType AsicdMsgType
	IpAddr  string
	MacAddr string
	VlanId  int32
	IfIdx   int32
}

type AsicdMsgType

type AsicdMsgType uint8
const (
	Create AsicdMsgType = 1
	Delete AsicdMsgType = 2
	Update AsicdMsgType = 3
)

type ClientJson

type ClientJson struct {
	Name string `json:Name`
	Port int    `json:Port`
}

type DeleteArpEntryMsg

type DeleteArpEntryMsg struct {
	PortNum int
}

type DeleteResolvedIPv4

type DeleteResolvedIPv4 struct {
	IpAddr string
}

type EventData

type EventData struct {
	IpAddr  string
	MacAddr string
	IfName  string
}

type L3IntfProperty

type L3IntfProperty struct {
	Netmask net.IPMask
	IpAddr  string
	IfName  string
}

type LagProperty

type LagProperty struct {
	IfName  string
	PortMap map[int]bool
}

type PortProperty

type PortProperty struct {
	IfName      string
	MacAddr     string
	IpAddr      string
	Netmask     net.IPMask
	L3IfIdx     int
	LagIfIdx    int
	CtrlCh      chan bool
	CtrlReplyCh chan bool
	PcapHdl     *pcap.Handle
	OperState   bool
}

type ResolveIPv4

type ResolveIPv4 struct {
	TargetIP string
	//	IfType   int
	IfId int
}

type UpdateArpEntryMsg

type UpdateArpEntryMsg struct {
	PortNum int
	IpAddr  string
	MacAddr string
	Type    bool // True: RIB False: Rx
}

type VlanProperty

type VlanProperty struct {
	IfName       string
	UntagPortMap map[int]bool
}

Jump to

Keyboard shortcuts

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