summaryrefslogtreecommitdiff
path: root/src/libsystemd-dhcp/dhcp-protocol.h
AgeCommit message (Collapse)Author
2014-02-15sd-dhcp: minimum options size is part of the protocolTom 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: Use be32_t for IP addresses in network order.Patrik Flykt
2013-12-12dhcp: Compute expire, T1 and T2 timersPatrik Flykt
Compute the default T1 and T2 timer values if they were not set by the DHCP server. Verify that the values are reasonable.
2013-12-12dhcp: Add maximum message size optionPatrik Flykt
Add maximum message size option to keep some DHCP server implementations from sending too big messages. See ConnMan commit 0c5c862749c05193cf4c513628328c6db02b5222.
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 DHCP discover sendingPatrik Flykt
On starting the client, use the supplied interface mac address and create a transaction id. Puzzle together an IP/UDP/DHCP Discover message, compute checksums and send it out as a raw packet. Create an additional function that constructs default options common to all DHCP messages. Set the DHCP Client ID option as noticed by Grant Erickson in ConnMan commit b18d9798b3a0ae46ed87d6d2be8d5a474bf3ab1e: "Some Internet gateways and Wi-Fi access points are unhappy when the DHCPv4 client-id option (61) is missing and will refuse to issue a DHCP lease."
2013-12-12dhcp: Add DHCP client initializationPatrik Flykt
Provide functionality for initializing a DHCP client struct, setting interface index, last used address and additional options to request. On initialization the most useful options are added by default.