summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-ndisc-rs.c
AgeCommit message (Collapse)AuthorFilesLines
2019-03-27headers: remove unneeded includes from util.hZbigniew Jędrzejewski-Szmek1-0/+1
This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way.
2018-11-12libsystemd-network: set SOCK_CLOEXEC and SOCK_NONBLOCKYu Watanabe1-1/+1
2018-09-14tests: use a helper function to parse environment and open loggingZbigniew Jędrzejewski-Szmek1-3/+2
The advantages are that we save a few lines, and that we can override logging using environment variables in more test executables.
2018-06-14tree-wide: use proper unicode © instead of (C) where we canLennart Poettering1-1/+1
Let's use a proper unicode copyright symbol where we can, it's prettier. This important patch is very important.
2018-06-14tree-wide: drop 'This file is part of systemd' blurbLennart Poettering1-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.
2018-04-06tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek1-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.
2017-11-19Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek1-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.
2017-11-09tree-wide: do not work in assert()Yu Watanabe1-1/+1
Follow-up for 85e55d14dea66f5fe412ca8128487d5ea828b7b1.
2017-05-30test-ndisc-rs.c: Test Router Solicitation timer computationPatrik Flykt1-0/+100
Test ICMPv6 Router Solicitation exponential backoff timer by computing the minimum and maximum values according to RFC 7559, Section 2 and the algorithm itself described in RFC 3315, Section 14. Reset the sd_ndisc timer to trigger after a zero second delay, which causes the ndisc timeout to be triggered immediately once the caller of the "sending" function returns to the main loop.
2017-05-15sd-radv: Receive Router SolicitationsPatrik Flykt1-0/+10
Receive Router Solicitations and send a unicast Router Advertisment in response. Refactor ICMPv6 packet handling code so that the common ICMPv6 validation parts are reused between the existing router discovery and the new functionality adding reception of Router Solicitation messages.
2017-05-15icmp6-util: Bind Router Advertisement socketPatrik Flykt1-0/+5
Reuse and refactor the functionality already present for Router Solicitations in order to create a socket for sending Router Advertisements. Anticipate reception of incoming Router Solicitations by setting the ICMPv6 filter accordingly. Also set the unicast hop limit to 255 for ICMPv6 sockets as unicast Router Advertisments are to be sent in response to Router Solicitations. Update the Router Solicitation test case code with a function definition in order to keep the test case working.
2016-06-06network: beef up ipv6 RA support considerablyLennart Poettering1-7/+156
This reworks sd-ndisc and networkd substantially to support IPv6 RA much more comprehensively. Since the API is extended quite a bit networkd has been ported over too, and the patch is not as straight-forward as one could wish. The rework includes: - Support for DNSSL, RDNSS and RA routing options in sd-ndisc and networkd. Two new configuration options have been added to networkd to make this configurable. - sd-ndisc now exposes an sd_ndisc_router object that encapsulates a full RA message, and has direct, friendly acessor functions for the singleton RA properties, as well as an iterative interface to iterate through known and unsupported options. The router object may either be retrieved from the wire, or generated from raw data. In many ways the sd-ndisc API now matches the sd-lldp API, except that no implicit database of seen data is kept. (Note that sd-ndisc actually had a half-written, but unused implementaiton of such a store, which is removed now.) - sd-ndisc will now collect the reception timestamps of RA, which is useful to make sd_ndisc_router fully descriptive of what it covers. Fixes: #1079
2016-05-26sd-network: rename "index" field of the various clients to "ifindex"Lennart Poettering1-1/+1
A field "index" is not particularly precise and also might conflict with libc's index() function definition. Also, pretty much everywhere else we call this concept "ifindex", including in networkd, the primary user of these libraries. Hence, let's fix this up and call this "ifindex" everywhere here too.
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack1-2/+0
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2015-11-11sd-ndisc: introduce separate callbacksTom Gundersen1-15/+12
As the data passed is very different, we introduce four different callbacks: - Generic - router discovery timed out or state machine stopped - Router - router and link configuration received - Prefix onlink - configuration for an onlink prefix received - Prefix autonomous - configuration for to configure a SLAAC address for a prefix received
2015-11-11sd-ndisc: notify user on STOPTom Gundersen1-2/+4
Also, stop the state machine when we get into a broken state, rather than just notify the user.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering1-2/+2
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-10-22sd-ndisc: drop sd_ndisc_get_prefixlen()Tom Gundersen1-186/+0
This is unused, and in the future we will pass prefixes and prefixlengths directly to the callbacks when needed rather than having to search for them.
2015-10-22libsystemd-network: split icm6-util.[ch] out of dhcp6 codeTom Gundersen1-3/+3
2015-10-22sd-ndisc: rename API from sd-icmp6-ndTom Gundersen1-33/+33
2015-10-22sd-icmp6-nd: rename files to sd-ndiscTom Gundersen1-0/+357
The actual code rename will follow. The reason for the change of name is to make it simpler and more uniform with how we name other libraries (we don't include the underlying protocol). The new name also matches the naming in the kernel (which is particularly relevent here as we expect to let the kernel do some parts of the protocol and we do others).