rangeplugin

package
v0.0.0-...-e3f7529 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugin = plugins.Plugin{
	Name:   "range",
	Setup4: setupRange,
}

Plugin wraps plugin registration information

Functions

This section is empty.

Types

type PluginState

type PluginState struct {
	// Rough lock for the whole plugin, we'll get better performance once we use leasestorage
	sync.Mutex
	// Recordsv4 holds a MAC -> IP address and lease time mapping
	Recordsv4 map[string]*Record
	LeaseTime time.Duration
	// contains filtered or unexported fields
}

PluginState is the data held by an instance of the range plugin

func (*PluginState) Handler4

func (p *PluginState) Handler4(req, resp *dhcpv4.DHCPv4) (*dhcpv4.DHCPv4, bool)

Handler4 handles DHCPv4 packets for the range plugin

type Record

type Record struct {
	IP net.IP
	// contains filtered or unexported fields
}

Record holds an IP lease record

Jump to

Keyboard shortcuts

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