[systemd-devel] [PATCH v3 00/26] Initial DHCP v4 library implementation

Patrik Flykt patrik.flykt at linux.intel.com
Mon Dec 9 13:43:06 PST 2013


	Hi,

Here is version 3 fixed according to comments plus a few identical ones
found in the code.

Essential changes are unconditionally compiling the DHCP code and re-adding
the sd_dhcp_client_get_netmask() function due to popular demand. Prefix
length computation is turned into a support function instead.

The timer problem was solved, the timer callback function gets the supplied
timeout value, in this case zero, and thus it miscalculated any further
timer values causing them all to trigger "immediately".

A proper directory should be selected for the code, currently it's still
the same old src/dhcp.


Cheers,

	Patrik


Patrik Flykt (26):
  dhcp: Add DHCP protocol structures and initial defines
  dhcp: Add DHCP client initialization
  dhcp: Add test for DHCP client initialization and parameter setting
  build: Add initial build support
  dhcp: Add option appending and parsing
  dhcp: Add buffer length and invalid cookie tests for DHCP options
  build: Add DHCP option test
  dhcp: Add tests for DHCP options, file and sname fields
  dhcp: Add option append tests
  dhcp: Add test function for computing checksum
  shared: Add struct sockaddr_ll to sockaddr_union
  dhcp: Add function for sending a raw packet
  dhcp: Add DHCP discover sending
  build: Add libsystemd-dhcp
  dhcp: Add test for discover DHCP packet creation
  dhcp: Support seconds elapsed since start of DHCP negotiation
  dhcp: Add function to stop the DHCP client
  build: Add dependency on libsystemd-bus needed for main loop
  dhcp: Add timeout and main loop support
  dhcp: Handle received DHCP Offer message
  dhcp: Send DHCP Request to acquire an IP address
  dhcp: Add maximum message size option
  dhcp: Process DHCP Ack/Nak message
  dhcp: Compute expire, T1 and T2 timers
  dhcp: Add notification callback
  dhcp: Add function to free DHCP client data

 Makefile.am                  |   48 ++
 src/dhcp/Makefile            |    1 +
 src/dhcp/client.c            | 1002 ++++++++++++++++++++++++++++++++++++++++++
 src/dhcp/internal.h          |   41 ++
 src/dhcp/network.c           |   65 +++
 src/dhcp/option.c            |  184 ++++++++
 src/dhcp/protocol.h          |  119 +++++
 src/dhcp/test-dhcp-client.c  |  224 ++++++++++
 src/dhcp/test-dhcp-option.c  |  377 ++++++++++++++++
 src/shared/socket-util.h     |    2 +
 src/systemd/sd-dhcp-client.h |   63 +++
 11 files changed, 2126 insertions(+)
 create mode 120000 src/dhcp/Makefile
 create mode 100644 src/dhcp/client.c
 create mode 100644 src/dhcp/internal.h
 create mode 100644 src/dhcp/network.c
 create mode 100644 src/dhcp/option.c
 create mode 100644 src/dhcp/protocol.h
 create mode 100644 src/dhcp/test-dhcp-client.c
 create mode 100644 src/dhcp/test-dhcp-option.c
 create mode 100644 src/systemd/sd-dhcp-client.h

-- 
1.7.10.4



More information about the systemd-devel mailing list