vlan

package
v0.0.0-...-71ad85e Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const OutOfVlans string = "no more vlans availible"

Variables

This section is empty.

Functions

func Initialize

func Initialize(vlanIDs *[]uint, prefix string) (err error)

func Release

func Release(demo string) (err error)

Releases all vlans associated with the speciefied demo from the list of availible vlans

func ReserveVlans

func ReserveVlans(demo *demo.Demo, list []*LocalList) (idList []uint, err error)

Reserves a vlan for each unique itm in the list

Types

type LocalList

type LocalList struct {
	OriginalNetwork string
	RouterIP        net.IP
	Net             *net.IPNet
	Mac             string
	BackingInfo     *types.BaseVirtualDeviceBackingInfo
}

func CreateLocalList

func CreateLocalList(configList *[]template.Network) (list []*LocalList, err error)

Create a list containg all the localy needed vlan/network information

type VlanData

type VlanData struct {
	Vlans     *[]*database.Vlan
	NewPrefix string
	Mutex     sync.Mutex
}
var List *VlanData

This is used to keep track of wich vlans have been reserved. it should be synced to the database after every change.

Jump to

Keyboard shortcuts

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