Documentation ¶
Overview ¶
Package vxlan provides helper methods for the Mechanism vxlan
Index ¶
- Constants
- type Mechanism
- func (m *Mechanism) DstIP() net.IP
- func (m *Mechanism) DstPort() uint16
- func (m *Mechanism) EvenVNI() bool
- func (m *Mechanism) GenerateRandomVNI() (uint32, error)
- func (m *Mechanism) GetParameters() map[string]string
- func (m *Mechanism) MTU() uint32
- func (m *Mechanism) SetDstIP(ip net.IP) *Mechanism
- func (m *Mechanism) SetDstPort(port uint16) *Mechanism
- func (m *Mechanism) SetMTU(mtu uint32) *Mechanism
- func (m *Mechanism) SetSrcIP(ip net.IP) *Mechanism
- func (m *Mechanism) SetSrcPort(port uint16) *Mechanism
- func (m *Mechanism) SetVNI(vni uint32) *Mechanism
- func (m *Mechanism) SrcIP() net.IP
- func (m *Mechanism) SrcPort() uint16
- func (m *Mechanism) VNI() uint32
Constants ¶
View Source
const ( // MECHANISM string MECHANISM = "VXLAN" // SrcIP - source IP SrcIP = common.SrcIP // DstIP - destination IP DstIP = common.DstIP // SrcPort - Source vxlan listening port SrcPort = common.SrcPort // DstPort - Destination vxlan listening port DstPort = common.DstPort // VNI - vni VNI = "vni" // MTU - maximum transmission unit MTU = common.MTU )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mechanism ¶
type Mechanism struct {
*networkservice.Mechanism
}
Mechanism - a vxlan Mechanism utility wrapper
func ToMechanism ¶
func ToMechanism(m *networkservice.Mechanism) *Mechanism
ToMechanism - convert unified Mechanism to useful wrapper
func (*Mechanism) EvenVNI ¶
EvenVNI - true if the VNI issues by the NSE should be even, false otherwise
func (*Mechanism) GenerateRandomVNI ¶
GenerateRandomVNI - generates a random VNI for the mechanism, even or odd as determined by EvenVNI()
func (*Mechanism) GetParameters ¶
GetParameters returns the map of all parameters to the mechanism
func (*Mechanism) SetDstIP ¶
SetDstIP - sets the DstIP for the VXLAN and returns the *vxlan.Mechanism
func (*Mechanism) SetDstPort ¶
SetDstPort - Set destination vxlan listening port
func (*Mechanism) SetSrcIP ¶
SetSrcIP - sets the SrcIP for the VXLAN and returns the *vxlan.Mechanism
func (*Mechanism) SetSrcPort ¶
SetSrcPort - Set source vxlan listening port
Click to show internal directories.
Click to hide internal directories.