ztpv4

package
v0.0.0-...-efdc7c0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitID

type CircuitID struct {
	Slot    string
	Module  string
	Port    string
	SubPort string
	Vlan    string
}

CircuitID represents the structure of network vendor interface formats

func ParseCircuitID

func ParseCircuitID(packet *dhcpv4.DHCPv4) (*CircuitID, error)

ParseCircuitID will parse dhcpv4 packet and return CircuitID info

func (*CircuitID) FormatCircuitID

func (c *CircuitID) FormatCircuitID() string

FormatCircuitID is the CircuitID format we send in our Bootfile URL for ZTP devices

type VendorData

type VendorData struct {
	VendorName, Model, Serial string
}

VendorData is optional data a particular vendor may or may not include in the Vendor Class options.

func ParseVendorData

func ParseVendorData(packet *dhcpv4.DHCPv4) (*VendorData, error)

ParseVendorData will try to parse dhcp4 options looking for more specific vendor data (like model, serial number, etc).

Jump to

Keyboard shortcuts

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