summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp6-protocol.h
Commit message (Collapse)AuthorAgeFilesLines
* send dhcpv6 release when stoppingchris2023-01-171-0/+1
|
* dhcp6: gracefully handle NoBinding errorYu Watanabe2022-08-131-0/+1
| | | | | | | When we receive NoBinding status code, the requesting binding (address or any other information) does not exist anymore in the server. Hence, resending the request is meaningless. Let's restart the transaction from the beginning in that case.
* sd-dhcp6-client: split dhcp6-internal.h into twoYu Watanabe2022-02-141-4/+12
| | | | Also, this moves string tables to dhcp6-protocol.c.
* sd-dhcp6-client: add missing parenthesisYu Watanabe2021-10-121-11/+11
|
* sd-dhcp6-client: add missing message typesYu Watanabe2021-10-121-16/+40
| | | | This also changes the prefix: DHCP6_ -> DHCP6_MESSAGE_.
* sd-dhcp6-client: typedef several enumsYu Watanabe2021-10-121-19/+23
| | | | Also introduces _MAX and _INVALID for several enums.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* sd-network: DHCPv6 - Add status codesSusant Sahani2020-04-131-8/+28
| | | | https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-5
* sd-network: DHCPv6 - Add NoPrefixAvail to error codeSusant Sahani2020-04-121-1/+2
|
* tree-wide: use proper unicode © instead of (C) where we canLennart Poettering2018-06-141-1/+1
| | | | | | Let's use a proper unicode copyright symbol where we can, it's prettier. This important patch is very important.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* dhcp6: Sanitize DHCPv6 IA option parsingPatrik Flykt2018-01-041-0/+1
| | | | | | | | | | | | Sanitize code for parsing DHCPv6 IA NA and TA options and their nested Status options so that the options can be fully and properly ignored should they not be conformant to the specification. Do this by defining a proper DHCP6Option structure and sending that structure to the parsing function. The parsing function will then not manipulate either any option data pointers or their lengths in order to iterate over the current option. Needless to say, this affects a few files including the test program.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* sd-dhcp6-client: Implement FQDN Option (#7309)Stefan Agner2017-11-161-0/+6
| | | | | | | | | | | | | | Implement DHCPv6 option to exchange information about the Fully Qualified Domain Name (FQDN) according to RFC 4704. The RFC 4704 describes two models of operations in section 3, currently only the second model is supported (DHCPv6 server updates both the AAAA and the PTR RRs). The existing DHCP Section Options SendHostname and Hostname are sent as FQDN to the server. According to section 4.2 sending only parts of its FQDN is allowed. Fixes #4682.
* DHCP DUID, IAID configuration optionsVinay Kulkarni2016-03-301-7/+0
|
* Revert "DHCP DUID and IAID configurability"revert-2818-masterZbigniew Jędrzejewski-Szmek2016-03-211-0/+7
|
* DHCP DUID and IAID configurabilityVinay Kulkarni2016-03-091-7/+0
|
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* dhcp: make DHCP6_OPTION_* enum publicBeniamino Galvani2016-01-201-35/+0
| | | | | | | | libsystemd-network provides the public function sd_dhcp6_client_set_request_option() to enable the request of a given DHCP option. However the enum defining such options is defined in the internal header dhcp6-protocol.h. Move the enum definition to the public header sd-dhcp6-client.h and properly namespace values.
* sd-dhcp6: Support deprecated SNTP Configuration OptionPatrik Flykt2015-08-211-1/+1
| | | | | | | | Although the SNTP option specified in RFC 4075 has been deprecated, some servers are still sending NTP information with this option. Use the SNTP information provided only if the NTP option is not present. Update the test case as SNTP information is also requested.
* sd-dhcp6: Add support for DHCPv6 NTP Server OptionPatrik Flykt2015-08-211-0/+6
| | | | | Support NTP server and multicast addresses and NTP server domain names as specified in RFC 5908.
* sd-dhcp6-client: Implement Information Request messagePatrik Flykt2014-12-101-0/+3
| | | | | | | | | | | Implement Information Request message according to RFC 3315, section 18.1.5. with the excepion that the first message is not delayed by a random amount. Instead systemd-networkd is supposed to take care of desynchronizing between other clients. Initialize the DHCPv6 client structure in sd_dhcp6_client_start() as this allows toggling between information request and normal DHCPv6 address aquisition modes.
* dhcp-network: remove unused DHCP6_STATE_RSDan Williams2014-07-231-1/+0
| | | | | | Probably a left-over from when router solicitations were requested in the DHCP6 code. But since they are now separate, this state is no longer needed.
* sd-dhcp6-client: Implement Renew and RebindPatrik Flykt2014-06-261-0/+6
| | | | | | | | | | Start sending Renew and Rebind DHCPv6 messages when respective timers T1 and T2 expire. Rebind messages do not include a Server ID option and the Rebind procedure ends when the last IPv6 address valid lifetime expires, whereafter the client restarts the address acquisition procedure by Soliciting for available servers. See RFC 3315, sections 18.1.3. and 18.1.4. for details.
* sd-dhcp6-client: Add Option Request Option supportPatrik Flykt2014-06-261-0/+12
| | | | | | | | | Provide a function to request more options from the DHCPv6 server. Provide a sensible default set at startup and add test basic test cases for the intended usage. Define DNS and NTP related option codes and add comments for the unassigned codes.
* sd-dhcp6-client: Receive and parse a reply and set T1 and T2 timersPatrik Flykt2014-06-191-0/+1
| | | | | Receive and parse a Reply from the server. Set up T1 and T2 timers and notify the library user of an acquired DHCPv6 lease.
* sd-dhcp6-client: Add Request message sendingPatrik Flykt2014-06-191-0/+4
| | | | | | | | | | | | 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.
* sd-dhcp6-client: Receive and parse Advertise messagesPatrik Flykt2014-06-191-0/+6
| | | | | | | | | | | | 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.
* sd-dhcp6-client: Add functions to bind to DHCPv6 UDP socketPatrik Flykt2014-06-191-0/+4
| | | | | | | | | | | | | 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.
* sd-dhcp6-client: Add DHCPv6 client Solicitation timeout handlingPatrik Flykt2014-06-191-0/+5
| | | | | | | | | | 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.
* sd-dhcp6-client: Add initial DHCPv6 client filesPatrik Flykt2014-06-191-0/+104
Add initial structure definition and functions for setting index, MAC address, callback and event loop. Define protocol values and states.