vlans

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetIfDiff

func SetIfDiff(a string, b string)

SetIfDiff UpdateCount a if b is not the same and not ""

func Start

func Start(args []string, path string, payloadPath string)

Types

type CmdPayload

type CmdPayload struct {
	Element *network.Element
	Payload []byte
}

type ElementMacAddressTable

type ElementMacAddressTable struct {
	Element *network.Element
	VlanMap map[int]*MacAddressTable
}

type MacAddressTable

type MacAddressTable struct {
	VlanId       int
	MacAddresses map[string]*VlanMacAddress // string = mac
}

MacAddressTable

func (*MacAddressTable) Update

func (v *MacAddressTable) Update(newEntry *VlanMacAddress)

Update

type VlanBuddy

type VlanBuddy struct {
	// contains filtered or unexported fields
}

func NewVlanBuddy

func NewVlanBuddy(writer io.Writer, interest []int, payloadPath string) *VlanBuddy

NewVlanBuddy

type VlanMacAddress

type VlanMacAddress struct {
	VlanId      int
	Device      string
	Interf      string
	Description string
	SwitchMode  string
	Mac         string
	Prefixes    map[string]bool
	UpdateCount int
}

VlanMacAddress represents a unique mac address

func ParseIosShowMacAddress

func ParseIosShowMacAddress(cmd *CmdPayload) []*VlanMacAddress

ParseIosShowMacAddress parses the show mac address of a Cisco IOS device

func ParseNexusShowMacAddress

func ParseNexusShowMacAddress(cmd *CmdPayload) []*VlanMacAddress

ParseNexusShowMacAddress parses the show mac address of a Cisco Nexus

func ParseShowIpArp

func ParseShowIpArp(cmd *CmdPayload) []*VlanMacAddress

ParseShowIpArp parses the show ip arp of a Cisco device

func (*VlanMacAddress) AddPrefix

func (mac *VlanMacAddress) AddPrefix(prefix string)

AddPrefix adds a prefix

func (*VlanMacAddress) PrefixExists

func (mac *VlanMacAddress) PrefixExists(prefix string) bool

PrefixExists checks whether a prefix exists or not

Jump to

Keyboard shortcuts

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