dhcp: initial dhcp implementation

Operating Systems / OSv - Guy Zana [cloudius-systems.com] - 28 July 2013 10:12 UTC

Use DHCP to discover an IP address per each interface, DHCP packets are being hooked in the networking stack in ip_input and queued for deffered processing using a dhcp worker thread. Sending dhcp packet is done directly over ethrernet (building IP and UDP).

There's still alot to be done: setting up lease time, timeouts, more error handling but it's possible to implement these later on.

fc428fc dhcp: initial dhcp implementation
build.mk | 1 +
core/debug.cc | 1 +
core/dhcp.cc | 587 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
include/dhcp.hh | 230 ++++++++++++++++++++++
4 files changed, 819 insertions(+)

Upstream: github.com


  • Share