summaryrefslogtreecommitdiff
path: root/src/libsystemd-dhcp/dhcp-internal.h
AgeCommit message (Collapse)Author
2014-02-24sd-dhcp-client: respect TP_STATUS_CSUMNOTREADYTom Gundersen
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.
2014-02-23sd-dhcp: message_init - only set secs in the clientTom Gundersen
2014-02-23sd-dhcp: equally verify udp and raw dhcp messagesTom Gundersen
Also be more explicit about why packages are ignored.
2014-02-22sd-dhcp: add very basic debug loggingTom Gundersen
2014-02-15sd-dhcp: network - don't hardcode portsTom Gundersen
We want to reuse these functions for the server library too.
2014-02-11sd-dhcp: split out packet handling from clientTom Gundersen
2014-01-21libsystemd-dhcp: revert merge into libsystemdTom Gundersen
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.
2014-01-13libsystemd-dhcp: merge into libsystemdTom Gundersen
2013-12-22libsystemd-dhcp: Add functions for sending unicast UDP messagesPatrik Flykt
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']
2013-12-12dhcp: Handle received DHCP Offer messagePatrik Flykt
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.
2013-12-12dhcp: Add function for sending a raw packetPatrik Flykt
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.
2013-12-12dhcp: Add option appending and parsingPatrik Flykt
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.