modulepackage
0.0.0-20210123023049-e52956c4cb35
Repository: https://github.com/inverse-inc/dhcp4.git
Documentation: pkg.go.dev
# README
DHCP4 - A DHCP library written in Go.
Original Author
Quick Start
See example_test.go for how to use this library to create a basic server.
Documentation
http://godoc.org/github.com/krolaw/dhcp4
Thanks
Special thanks to:
- https://github.com/pietern for suggesting how to use go.net to be able to listen on a single network interface.
- https://github.com/fdurand for proper interface binding on linux.
Wow
DHCP4 was one of the libraries used by Facebook's DHCP load balancing relay. "Facebook currently uses it in production, and it's deployed at global scale across all of our data centers." FB has since moved to another lib.
# Packages
No description provided by the author
# Functions
IPAdd returns a copy of start + add.
IPInRange returns true if ip is between (inclusive) start and stop.
IPLess returns where IP a is less than IP b.
IPRange returns how many ips in the ip range from start to stop (inclusive).
JoinIPs returns a byte slice of IP addresses, one immediately after the other This may be useful for creating multiple IP options such as OptionRouter.
ListenAndServe listens on the UDP network address addr and then calls Serve with handler to handle requests on incoming packets.
Deprecated, use Serve instead with connection from dhcp4/conn or own custom creation.
No description provided by the author
OptionsLeaseTime - converts a time.Duration to a 4 byte slice, compatible with OptionIPAddressLeaseTime.
ReplyPacket creates a reply packet that a Server would send to a client.
Creates a request packet that a Client would send to a server.
Serve takes a ServeConn (such as a net.PacketConn or dhcp4/conn) for reading and writing DHCP packets.
Deprecated, use Serve instead with connection from dhcp4/conn or own custom creation.
# Constants
From Server, Yes you can have that IP.
From Server.
From Client.
Broadcast From Client - Sorry I can't use that IP.
Broadcast Packet From Client - Can I have an IP?.
DHCP Options.
From Client, I have this IP and there's nothing you can do about it.
From Server, No you cannot have that IP.
Broadcast From Server - Here's an IP.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
IP Layer Parameters per Interface.
DHCP Options.
IP Layer Parameters per Host.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
Application and Service Parameters.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
From RFC3942 - Options Used by PXELINUX.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Extensions.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
TCP Parameters.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
Link Layer Parameters per Interface.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
DHCP Options.
From Client, I don't need that IP anymore.
Broadcast From Client - I'll take that IP (Also start for renewals).
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
Map of DHCP options.
A DHCP packet.