nl

package
v0.1.14-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const IFLA_BRPORT_NEIGH_SUPPRESS = 32

Variables

View Source
var (
	VRF_TABLE_START = 50
	VRF_TABLE_END   = 80

	VRF_PREFIX            = "vr."
	BRIDGE_PREFIX         = "br."
	VXLAN_PREFIX          = "vx."
	VRF_TO_DEFAULT_PREFIX = "vd."
	DEFAULT_TO_VRF_PREFIX = "dv."
	LAYER2_PREFIX         = "l2."
	MACVLAN_PREFIX        = "vlan."
	VETH_L2_PREFIX        = "l2v."

	UNDERLAY_LOOPBACK = "dum.underlay"

	VXLAN_PORT  = 4789
	DEFAULT_MTU = 9000

	MAC_PREFIX = []byte("\x02\x54")
)

Functions

This section is empty.

Types

type Layer2Information

type Layer2Information struct {
	VlanID int
	MTU    int
	VNI    int
	VRF    string

	AnycastMAC         *net.HardwareAddr
	AnycastGateways    []*netlink.Addr
	AdvertiseNeighbors bool
	NeighSuppression   *bool

	CreateMACVLANInterface bool
	// contains filtered or unexported fields
}

type NetlinkManager

type NetlinkManager struct {
}

func (*NetlinkManager) CleanupL2

func (n *NetlinkManager) CleanupL2(info Layer2Information) []error

func (*NetlinkManager) CleanupL3

func (n *NetlinkManager) CleanupL3(name string) []error

Cleanup will try to delete all interfaces associated with this VRF and return a list of errors (for logging) as a slice

func (*NetlinkManager) CreateL2

func (n *NetlinkManager) CreateL2(info Layer2Information) error

func (*NetlinkManager) CreateL3

func (n *NetlinkManager) CreateL3(info VRFInformation) error

Create will create a VRF and all interfaces neccessary to operate the EVPN and leaking

func (*NetlinkManager) GetBridgeId

func (n *NetlinkManager) GetBridgeId(info Layer2Information) (int, error)

func (*NetlinkManager) GetL3ByName

func (n *NetlinkManager) GetL3ByName(name string) (*VRFInformation, error)

func (*NetlinkManager) GetUnderlayIP added in v0.1.12

func (n *NetlinkManager) GetUnderlayIP() (net.IP, error)

func (*NetlinkManager) ListL2

func (n *NetlinkManager) ListL2() ([]Layer2Information, error)

func (*NetlinkManager) ListL3

func (n *NetlinkManager) ListL3() ([]VRFInformation, error)

func (*NetlinkManager) ParseIPAddresses

func (n *NetlinkManager) ParseIPAddresses(addresses []string) ([]*netlink.Addr, error)

func (*NetlinkManager) ReconcileL2

func (n *NetlinkManager) ReconcileL2(current Layer2Information, desired Layer2Information) error

func (*NetlinkManager) UpL3

func (n *NetlinkManager) UpL3(info VRFInformation) error

UpL3 will set all interfaces up. This is done after the FRR reload to not have a L2VNI for a short period of time

type VRFInformation

type VRFInformation struct {
	Name string
	VNI  int

	MarkForDelete bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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