summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp6-lease.c
AgeCommit message (Collapse)Author
2015-01-27sd-dhcp6-lease: Revise address iteration functionsPatrik Flykt
Revise the address iteration functions so that one helper function resets the iterator to the start of the address list while the second one fetches addresses one by one. The test case is also updated.
2015-01-13refcnt: refcnt is unsigned, fix comparisonsTom Gundersen
This does not make a difference, but the code was confusing.
2014-12-10sd-dhcp6-lease: Return only -EINVAL when a NULL lease is suppliedPatrik Flykt
Suppyling a NULL lease is not a condition that needs to be asserted, returning -EINVAL is informative enough to the caller. This simplifies calling code and doesn't falsely indicate that something erroneous was attempted.
2014-10-09sd-dhcp6-lease: Name the structure containing IAADDR dataPatrik Flykt
With this change the DHCP6_OPTION_IAADDR_LEN define can be removed in favor of using sizeof(). Using the name of the struct and sizeof() makes it clearer how much and what data is being copied from the DHCPv6 message.
2014-06-26sd-dhcp6-client: Implement Rapid CommitPatrik Flykt
Add a Rapid Commit option to Solicit messages and expect a Reply to be received instead of an Advertise. When receiving a DHCPv6 message from the server in state Solicit, continue testing whether the message is a Reply. Ease up the message type checking, it's not fatal if the message is of a wrong type. Add helper functions to set/get the rapid commit of a lease. See RFC 3315, sections 17., 17.1.2., 17.1.4. and 18.1.8.
2014-06-26sd-dhcp6-lease: Add helper function to compute remaining expiry timePatrik Flykt
Create a helper function to compute the remaining time in seconds from time T2 to the IPv6 address with the longest lifetime. The computed time is used as the Maximum Retransmission Duration in Rebinding state. See RFC 3315, section 18.1.4. for details.
2014-06-19sd-dhcp6-lease: Add functions for accessing lease and addressesPatrik Flykt
Add support functions for accessing the current client lease as well as iterating over the addresses and get their preferred and valid lifetimes.
2014-06-19sd-dhcp6-lease: Add DHCPv6 lease handlingPatrik Flykt
Create a structure describing a DHCPv6 lease. Add internal functions for creating a new lease and accessing the server ID, preference and IAID. Provide functions for clearing addresses and associated timers. External users are initially given only the capabilities of referencing and unreferencing the lease structure.