summaryrefslogtreecommitdiffstats
path: root/src/test/test-ip-protocol-list.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test-ip-protocol-list: include missing_network.h instead of netinet/in.hAntonio Alvarez Feijoo2024-06-121-3/+2
| | | | | | This fixes the build for glibc < 2.32 Follow-up for 3f69070598b569bf20f5c296ff21f861bfe003e3
* core/socket: allow MPTCP protocolMatthieu Baerts (NGI0)2024-06-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multipath TCP (MPTCP), standardized in RFC8684 [1], is a TCP extension that enables a TCP connection to use different paths. It allows a device to make use of multiple interfaces at once to send and receive TCP packets over a single MPTCP connection. MPTCP can aggregate the bandwidth of multiple interfaces or prefer the one with the lowest latency, it also allows a fail-over if one path is down, and the traffic is seamlessly re-injected on other paths. To benefit from MPTCP, both the client and the server have to support it. Multipath TCP is a backward-compatible TCP extension that is enabled by default on recent Linux distributions (Debian, Ubuntu, Redhat, ...). Multipath TCP is included in the Linux kernel since version 5.6 [2]. To use it on Linux, an application must explicitly enable it when creating the socket: int sd = socket(AF_INET(6), SOCK_STREAM, IPPROTO_MPTCP); No need to change anything else in the application. This patch allows MPTCP protocol in the Socket unit configuration. So now, a <unit>.socket can contain this to use MPTCP instead of TCP: [Socket] SocketProtocol=mptcp MPTCP support has been allowed similarly to what has been already done to allow SCTP: just one line in core/socket.c, a very simple addition thanks to the flexible architecture already in place. On top of that, IPPROTO_MPTCP has also been added in the list of allowed protocols in two other places, and in the doc. It has also been added to the missing_network.h file, for systems with an old libc -- note that it was also required to include <netinet/in.h> in this file to avoid redefinition errors. Link: https://www.rfc-editor.org/rfc/rfc8684.html [1] Link: https://www.mptcp.dev [2]
* ASSERT_STREQ for simple casesIvan Kruglov2024-04-151-2/+2
|
* shared/ip-procotol-list: generalize and rework parse_ip_protocol()Zbigniew Jędrzejewski-Szmek2023-09-221-21/+23
| | | | | | | | Optionally, accept protocols that don't have a known name. Avoid any allocations in the common case. Return more granular error codes: -ERANGE for negative values, -EOPNOTSUPP if the protocol is a valid number, but we don't know the protocol, and -EINVAL only if it's not a numerical string.
* test: Use TEST macroJan Janssen2021-11-251-12/+17
| | | | | | | | | This converts to TEST macro where it is trivial. Some additional notable changes: - simplify HAVE_LIBIDN #ifdef in test-dns-domain.c - use saved_argc/saved_argv in test-copy.c, test-path-util.c, test-tmpfiles.c and test-unit-file.c
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* test: add tests for ip_protocol_{from,to}_name()Yu Watanabe2018-12-021-0/+64