overlay

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package overlay contains the overlays implementations supported in liqo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVxlanDevice added in v0.9.1

func CheckVxlanDevice(ctx context.Context, expected *netlink.Vxlan)

CheckVxlanDevice checks if the vxlan device is correctly configured.

func GenerateVxlanMac added in v0.9.1

func GenerateVxlanMac(nodename string) (net.HardwareAddr, error)

GenerateVxlanMac generate VXLAN MAC address.

Types

type Neighbor added in v0.3.0

type Neighbor struct {
	MAC net.HardwareAddr
	IP  net.IP
}

Neighbor struct that holds information for an fdb entry.

type VxlanDevice added in v0.3.0

type VxlanDevice struct {
	Link *netlink.Vxlan
}

VxlanDevice struct that holds a vxlan link.

func NewVxlanDevice added in v0.3.0

func NewVxlanDevice(devAttrs *VxlanDeviceAttrs) (*VxlanDevice, error)

NewVxlanDevice takes as argument a struct of type VxlanDeviceAttrs and returns a VxlanDevice or error.

func (*VxlanDevice) AddFDB added in v0.3.0

func (vxlan *VxlanDevice) AddFDB(n Neighbor) (bool, error)

AddFDB adds a fdb entry for the given neighbor into the current vxlan device. It returns an error if something goes wrong, and bool value set to true if it added the entry, otherwise is set to false.

func (*VxlanDevice) ConfigureIPAddress added in v0.3.0

func (vxlan *VxlanDevice) ConfigureIPAddress(ipAddr string) error

ConfigureIPAddress configures the IP address of the vxlan interface. The IP address has to be in CIDR notation.

func (*VxlanDevice) DelFDB added in v0.3.0

func (vxlan *VxlanDevice) DelFDB(n Neighbor) (bool, error)

DelFDB deletes a fdb entry for the given neighbor from the current vxlan device. It return an error if something goes wrong, and bool value to sai if it deleted the entry, if the entry does not exist the bool value is set to false.

type VxlanDeviceAttrs added in v0.3.0

type VxlanDeviceAttrs struct {
	Vni      int
	Name     string
	VtepPort int
	VtepAddr net.IP
	MTU      int
	MAC      net.HardwareAddr
}

VxlanDeviceAttrs configuration for a new vxlan device.

Jump to

Keyboard shortcuts

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