Documentation
¶
Overview ¶
Package dhcp providers UDP listening and serving functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoConn = &noConnError{}
ErrNoConn is an error im still not sure i want to use.
Functions ¶
Types ¶
type Handler ¶
type Handler interface { // Handle is used for how to respond to DHCP messages. Handle(net.PacketConn, net.Addr, *dhcpv4.DHCPv4) }
Handler is the interface is responsible for responding to DHCP messages.
type Listener ¶
Listener is a DHCPv4 server.
func (*Listener) Handler ¶
Handler is the main handler passed to the server4 function. Internally it allows for multiple handlers to be defined. Each handler in l.handlers then executed for every received packet.
func (*Listener) ListenAndServe ¶
ListenAndServe will listen for DHCP messages and call the given handler for each.
Directories
¶
Path | Synopsis |
---|---|
backend
|
|
file
Package file watches a file for changes and updates the in memory DHCP data.
|
Package file watches a file for changes and updates the in memory DHCP data. |
kube
Package kube is a backend implementation that uses the Tinkerbell CRDs to get DHCP data.
|
Package kube is a backend implementation that uses the Tinkerbell CRDs to get DHCP data. |
noop
Package noop is a backend handler that does nothing.
|
Package noop is a backend handler that does nothing. |
Package data is an interface between DHCP backend implementations and the DHCP server.
|
Package data is an interface between DHCP backend implementations and the DHCP server. |
example
|
|
fileBackend
package main is an example of how to use the dhcp package with the file backend.
|
package main is an example of how to use the dhcp package with the file backend. |
kubeBackend
package main is an example of how to use the dhcp package with the kube backend.
|
package main is an example of how to use the dhcp package with the kube backend. |
Package handler holds the interface that backends implement, handlers take in, and the top level dhcp package passes to handlers.
|
Package handler holds the interface that backends implement, handlers take in, and the top level dhcp package passes to handlers. |
noop
Package noop is a handler that does nothing.
|
Package noop is a handler that does nothing. |
reservation
Package reservation is the handler for responding to DHCPv4 messages with only host reservations.
|
Package reservation is the handler for responding to DHCPv4 messages with only host reservations. |
Package otel handles translating DHCP headers and options to otel key/value attributes.
|
Package otel handles translating DHCP headers and options to otel key/value attributes. |
Click to show internal directories.
Click to hide internal directories.