nl

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddressFamily added in v0.2.0

func GetAddressFamily(addressFamily int) (string, error)

func GetProtocolName added in v0.2.0

func GetProtocolName(p netlink.RouteProtocol) string

func GetProtocolNumber added in v0.2.0

func GetProtocolNumber(protocol string, frr bool) int

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 NeighborInformation added in v0.2.0

type NeighborInformation struct {
	Interface string
	State     string
	Family    string
	Flag      string
	Quantity  float64
}

type NeighborKey added in v0.2.3

type NeighborKey struct {
	InterfaceIndex, State, Flags, Family int
}

type NetlinkManager

type NetlinkManager struct {
}

func (*NetlinkManager) CleanupL2

func (*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) CleanupTaas added in v0.2.3

func (n *NetlinkManager) CleanupTaas(info TaasInformation) error

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 necessary to operate the EVPN and leaking.

func (*NetlinkManager) CreateTaas added in v0.2.3

func (n *NetlinkManager) CreateTaas(info TaasInformation) error

func (*NetlinkManager) EnsureBPFProgram added in v0.2.0

func (*NetlinkManager) EnsureBPFProgram(info VRFInformation) error

func (*NetlinkManager) EnsureMTU added in v0.2.3

func (*NetlinkManager) EnsureMTU(info VRFInformation) error

func (*NetlinkManager) GetBridgeID added in v0.2.0

func (*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 (*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) ListNeighborInformation added in v0.2.0

func (n *NetlinkManager) ListNeighborInformation() ([]NeighborInformation, error)

func (*NetlinkManager) ListNeighborInterfaces added in v0.2.6

func (*NetlinkManager) ListNeighborInterfaces() (map[int]netlink.Link, error)

func (*NetlinkManager) ListRouteInformation added in v0.2.0

func (n *NetlinkManager) ListRouteInformation() ([]route.Information, error)

func (*NetlinkManager) ListTaas added in v0.2.3

func (*NetlinkManager) ListTaas() ([]TaasInformation, error)

func (*NetlinkManager) ListVRFInterfaces added in v0.2.0

func (*NetlinkManager) ListVRFInterfaces() (map[int]VRFInformation, error)

func (*NetlinkManager) ParseIPAddresses

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

func (*NetlinkManager) ReconcileL2

func (n *NetlinkManager) ReconcileL2(current, 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 TaasInformation added in v0.2.3

type TaasInformation struct {
	Name  string
	Table int
}

type VRFInformation

type VRFInformation struct {
	Name string
	VNI  int
	MTU  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