vlan

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VlanIDMin specifies the min VLAN ID we want to use on our switches
	VlanIDMin uint16 = 1001

	// VlanIDMax specifies the max VLAN ID we want to use on our switches
	VlanIDMax uint16 = 2000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapping

type Mapping map[uint16]uint32

Mapping holds the current mapping of VLAN IDs to VNIs of the switch

func ReadMapping

func ReadMapping() (Mapping, error)

ReadMapping reads the current VLAN to VNI mapping with the help of netlink

func (Mapping) ReserveVlanIDs

func (m Mapping) ReserveVlanIDs(n uint16) ([]uint16, error)

ReserveVlanIDs tries to reserve n VLAN IDs given the current switch configuration

Jump to

Keyboard shortcuts

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