chiark / gitweb /
dhcp: Handle received DHCP Offer message
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 9 Dec 2013 21:43:26 +0000 (23:43 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 12 Dec 2013 16:43:34 +0000 (11:43 -0500)
commit8c00042c939938818365753023ff2d50f984dec6
treeafffca11004c504d8c6e98ca3efea1d8911e8f13
parentd3d8ac2f2bac721d99f893c0a0128d21db636d4c
dhcp: Handle received DHCP Offer message

Create a function for handling the full IP, UDP and DHCP packet
and tie it to the main loop. Verify IP and UDP headers and checksum.
Creat a new lease structure with using the values supplied in the
DHCP message. Free the lease structure when client is stopped.

Split out socket handling into a creation and a sending part. As a
result modify the test code.
src/libsystemd-dhcp/dhcp-client.c
src/libsystemd-dhcp/dhcp-internal.h
src/libsystemd-dhcp/dhcp-network.c
src/libsystemd-dhcp/dhcp-protocol.h
src/libsystemd-dhcp/test-dhcp-client.c