Documentation ¶
Overview ¶
Package ethface implements Ethernet-based faces.
Index ¶
Constants ¶
View Source
const ( // MinVXLAN is the minimum VXLAN Network Identifier. MinVXLAN = 0 // MaxVXLAN is the maximum VXLAN Network Identifier. MaxVXLAN = 1<<24 - 1 )
Variables ¶
View Source
var ( ErrIP = errors.New("invalid IP address") ErrIPFamily = errors.New("different address family in LocalIP and RemoteIP") ErrUnicastIP = errors.New("invalid unicast IP address") ErrUDPPort = errors.New("invalid UDP port") )
Error conditions.
View Source
var (
ErrVXLAN = errors.New("invalid VXLAN Network Identifier")
)
Error conditions.
Functions ¶
This section is empty.
Types ¶
type EtherLocator ¶
type EtherLocator struct { ethport.FaceConfig // packettransport.Locator contains MAC addresses. packettransport.Locator }
EtherLocator describes an Ethernet face.
func (EtherLocator) CreateFace ¶
func (loc EtherLocator) CreateFace() (face iface.Face, e error)
CreateFace creates an Ethernet face.
func (EtherLocator) EthLocatorC ¶
func (loc EtherLocator) EthLocatorC() (c ethport.LocatorC)
EthLocatorC implements ethport.Locator interface.
type IPLocator ¶
type IPLocator struct { // EtherLocator contains MAC addresses and EthDev specification. // loc.Remote must be a unicast address. EtherLocator // LocalIP is the local IP address. // It may be either IPv4 or IPv6. LocalIP netip.Addr `json:"localIP"` // RemoteIP is the remote IP address. // It may be either IPv4 or IPv6. RemoteIP netip.Addr `json:"remoteIP"` }
IPLocator describes an IP-based face.
type UDPLocator ¶
type UDPLocator struct { IPLocator // LocalUDP is the local UDP port number. LocalUDP int `json:"localUDP"` // RemoteUDP is the remote UDP port number. RemoteUDP int `json:"remoteUDP"` }
UDPLocator describes a UDP face.
func (UDPLocator) CreateFace ¶
func (loc UDPLocator) CreateFace() (face iface.Face, e error)
CreateFace creates a UDP face.
func (UDPLocator) EthLocatorC ¶
func (loc UDPLocator) EthLocatorC() (locC ethport.LocatorC)
EthLocatorC implements ethport.Locator interface.
type VxlanLocator ¶
type VxlanLocator struct { IPLocator // VXLAN is the VXLAN virtual network identifier. // This must be between MinVXLAN and MaxVXLAN. VXLAN int `json:"vxlan"` // InnerLocal is the inner local MAC address. // This must be a 48-bit unicast address. InnerLocal macaddr.Flag `json:"innerLocal"` // InnerRemote is the inner remote MAC address. // This must be a 48-bit unicast address. InnerRemote macaddr.Flag `json:"innerRemote"` }
VxlanLocator describes an Ethernet VXLAN face.
func (VxlanLocator) CreateFace ¶
func (loc VxlanLocator) CreateFace() (face iface.Face, e error)
CreateFace creates a VXLAN face.
func (VxlanLocator) EthLocatorC ¶
func (loc VxlanLocator) EthLocatorC() (locC ethport.LocatorC)
EthLocatorC implements ethport.Locator interface.
func (VxlanLocator) Validate ¶
func (loc VxlanLocator) Validate() error
Validate checks Locator fields.
Click to show internal directories.
Click to hide internal directories.