summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp6-protocol.h
AgeCommit message (Collapse)Author
2014-06-19sd-dhcp6-client: Receive and parse a reply and set T1 and T2 timersPatrik Flykt
Receive and parse a Reply from the server. Set up T1 and T2 timers and notify the library user of an acquired DHCPv6 lease.
2014-06-19sd-dhcp6-client: Add Request message sendingPatrik Flykt
As described in RFC 3315, Section 17.1.2, a client has to wait until the first timeout has elapsed before it is allowed to request IPv6 addresses from the DHCPv6 server. This is indicated by a non-NULL lease and a non-zero resend count. Should the Advertisement contain a preference value of 255 or be received after the first timeout, IPv6 address requesting is started immediately. In response to these events, create a Request message and set up proper resend timers to send the message to the server.
2014-06-19sd-dhcp6-client: Receive and parse Advertise messagesPatrik Flykt
When receiving DHCPv6 messages, discard the ones that are not meant for DHCPv6 clients and verify the transaction id. Once that is done, process the Advertise message and select the Advertise with the highest preference. Create a separate function for lease information parsing so that it can be reused in other parts of the protocol. Verify both DUID and IAID in the received message and store other necessary information with the lease structure.
2014-06-19sd-dhcp6-client: Add functions to bind to DHCPv6 UDP socketPatrik Flykt
Add a function that creates a UDP socket bound to the given interface and optionally to an IPv6 address. Add another function that will send the DHCPv6 UDP packet to its destination. Using IPV6_PKTINFO in setsockopt to bind the IPv6 socket to an interface is documented in section 4. of RFC 3542, "Advanced Sockets Application Program Interface (API) for IPv6" Add a define for DHCPv6 Relay Agents and Servers multicast address as its not available elsewhere.
2014-06-19sd-dhcp6-client: Add DHCPv6 client Solicitation timeout handlingPatrik Flykt
Add the core of DHCPv6 client message retransmission and upper bound timer and message count handling according to RFC 3315 Secions 7.1.2 and 14. Omit the DHCPv6 initial delay; for now it is assumed that systemd-networkd will provide decent startup randomization that will desynchronize the clients. When reinitializing the client, clear all timers.
2014-06-19sd-dhcp6-client: Add initial DHCPv6 client filesPatrik Flykt
Add initial structure definition and functions for setting index, MAC address, callback and event loop. Define protocol values and states.