go-dhclient
is a DHCPv4 client library written in Go.
It uses raw sockets and binds them to a specific interface.
Callback functions are triggered on binding or expiration of a lease.
See main.go for example code.
- github.com/google/gopacket for serializing/unserializing of DHCP packets
- github.com/mdlayher/packet for raw sockets