modulepackage
0.0.0-20240118172413-dc2a5bbe6cdf
Repository: https://github.com/tinkerbell/dhcp.git
Documentation: pkg.go.dev
# README
[!IMPORTANT]
This repo is archived as the code has been moved into Smee.
dhcp
DHCP library and CLI server with multiple backends. All IP addresses are served as DHCP reservations. There are no lease pools as are normally found in DHCP servers.
Backends
- Tink Kubernetes CRDs
- This backend is also the main use case. It pulls hardware data from Kubernetes CRDs for use in serving DHCP clients.
- File based
- This backend is for mainly for testing and development. It reads a file for hardware data to use in serving DHCP clients. See example.yaml for the data model.
Definitions
DHCP Reservation: A fixed IP address that is reserved for a specific client.
DHCP Lease: An IP address, that can potentially change, that is assigned to a client by the DHCP server. The IP is typically pulled from a pool or subnet of available IP addresses.
# Packages
No description provided by the author
Package data is an interface between DHCP backend implementations and the DHCP server.
No description provided by the author
Package handler holds the interface that backends implement, handlers take in, and the top level dhcp package passes to handlers.
Package otel handles translating DHCP headers and options to otel key/value attributes.
# Functions
NewServer initializes and returns a new Server object.
# Interfaces
Handler is a type that defines the handler function to be called every time a valid DHCPv4 message is received type Handler func(ctx context.Context, conn net.PacketConn, d data.Packet).