4bfc6630ba
Historically we've used SOL_IP/SOL_IPV6/SOL_TCP everywhere as the socket level value in getsockopt() and setsockopt() but as we've seen over time it regularly broke the build and required to have them defined to their IPPROTO_* equivalent. The Linux ip(7) man page says: Using the SOL_IP socket options level isn't portable; BSD-based stacks use the IPPROTO_IP level. And it indeed looks like a pure linuxism inherited from old examples and documentation. strace also reports SOL_* instead of IPPROTO_*, which does not help... A check to linux/in.h shows they have the same values. Only SOL_SOCKET and other non-IP values make sense since there is no IPPROTO equivalent. Let's get rid of this annoying confusion by removing all redefinitions of SOL_IP/IPV6/TCP and using IPPROTO_* instead, just like any other operating system. This also removes duplicated tests for the same value. Note that this should not result in exposing syscalls to other OSes as the only ones that were still conditionned to SOL_IPV6 were for IPV6_UNICAST_HOPS which already had an IPPROTO_IPV6 equivalent, and IPV6_TRANSPARENT which is Linux-specific. |
||
---|---|---|
.. | ||
51d/src | ||
base64 | ||
debug | ||
deviceatlas | ||
halog | ||
hpack | ||
ip6range | ||
iprange | ||
mod_defender | ||
modsecurity | ||
netsnmp-perl | ||
opentracing | ||
plug_qdisc | ||
prometheus-exporter | ||
release-estimator | ||
selinux | ||
spoa_example | ||
spoa_server | ||
syntax-highlight | ||
systemd | ||
tcploop | ||
trace | ||
wireshark-dissectors/peers | ||
wurfl |