Age | Commit message (Collapse) | Author |
|
This is similar to sd-login, but exposes the state of networkd rather than logind.
Include it in libsystemd-dhcp and rename it to libsystemd-network.
|
|
If an UDP packet has not passed through a hardware device, its checksum may not
have been computed. This is exposed through the TP_STATUS_CSUMNOTREADY sockopt.
When using raw sockets, skip checksum validation when TP_STATUS_CSUMNOTREADY
is set.
This is necessary for dhcp to work directly over a veth tunnel, e.g. as done
in systemd-nspawn.
|
|
|
|
Also be more explicit about why packages are ignored.
|
|
|
|
We want to reuse these functions for the server library too.
|
|
|
|
Unlike the other merged libs, the rest of libsystemd will never depend on
sd-dhcp-client, so there is no reason not to keep it separate.
|
|
|
|
Create a helper functions setting up an unicast DHCP UDP socket and
sending data. Add function stubs for the test program.
[tomegun: initialize structs when allocating, and drop unneccesary 'err']
|
|
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.
|
|
Open a packet socket, create a link level header, send packet and
close socket. Adding it to a separate file makes testing of the
DHCP sending much easier, as the test program can supply any socket
to the DHCP client code.
|
|
Add functions to append and parse DHCP options. Not all options
are passed to the callback function, the ones not exposed are
pad, end, message type and overload. If indicated by the overload
option, file and sname fields will be examined for more options.
The option functions are internal to DHCP, add a new header files
for interal function prototypes.
|