]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared: add ip_protocol_{from|to}_tcp_udp helpers
authorJulia Kartseva <hex@fb.com>
Sat, 26 Jun 2021 00:14:40 +0000 (17:14 -0700)
committerJulia Kartseva <hex@fb.com>
Tue, 29 Jun 2021 21:37:07 +0000 (14:37 -0700)
commit159d68c3e09657b4fd252b2c5ea6ef3095a37ad2
tree07acd8f9c9770d4e96b20ee10d0e3c450cb68b56
parent560d76243fab5b7809996ac353fbc79da9a3bd92
shared: add ip_protocol_{from|to}_tcp_udp helpers

Thin wrappers of ip_protocol_{from|to}_name targeting IPPROTO_TCP and
IPPROTO_UDP only.
Used to parse IP protocol configuration restricted only to TCP and UDP,
e.g. in SocketBind{Allow|Deny}= unit property.

These helpers are inspired by af_{from|to}_ipv4_ipv6 and potentially
extendable with other IP protocols if there is a use-case to expose
them.
src/shared/ip-protocol-list.c
src/shared/ip-protocol-list.h