transport

package
v0.0.0-...-a9890c3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EPStatus

type EPStatus int

EPStatus provides finite state of an endpoint

const (
	//EPStatusUP is available and live
	EPStatusUP EPStatus = iota

	//EPStatusDOWN is available but administratively down
	EPStatusDOWN

	//EPStatusMISSING is missing
	EPStatusMISSING
)

type ForwardingMiss

type ForwardingMiss struct {
	Type   ForwardingMissType
	HwAddr net.HardwareAddr
	IP     net.IP
}

ForwardingMiss contains info for missed forwarding info

type ForwardingMissType

type ForwardingMissType int

ForwardingMissType type of forwarding miss

const (
	//MissTypeEP L2 Miss or FDB Miss
	MissTypeEP ForwardingMissType = iota

	//MissTypeARP L3 Miss or ARP proxy
	MissTypeARP
)

func (ForwardingMissType) String

func (m ForwardingMissType) String() string

type Transport

type Transport interface {
	//Start begins the listener
	Start() error

	//SetMTU sets the default MTU of added interfaces
	SetMTU(mtu int32) error

	//SetSDN allows the transport to use SDN functions like IP/MAC lookups
	SetSDN(sdn controller.Controller) error

	//AddEP adds a new VNID endpoint device to a given bridge
	AddEP(vnid uint32, br *netlink.Bridge) error

	//DelEP removes a  VNID endpoint device
	DelEP(vnid uint32) error

	//Status gives the device status of the VNID endpoint device
	Status(vnid uint32) EPStatus

	//AddVLAN adds a vlan to the trunking device
	AddVLAN(vnid uint32, vlan uint16) error

	//DelVLAN removes a vlan from the trunking device
	DelVLAN(vnid uint32, vlan uint16) error

	//AddForwardEntry adds a forwarding entry for the trunking devices to relay packets to other endpoints
	AddForwardEntry(vnid uint32, mac net.HardwareAddr, ip net.IP) error

	//ForwardingMiss provides a readonly channel to react to missing forwarding entries
	ForwardingMiss(vnid uint32) (<-chan ForwardingMiss, error)
}

Transport are drivers for handling lower level packet actions

Directories

Path Synopsis
tap

Jump to

Keyboard shortcuts

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