Summary:
To set `Type Of Service` for IP layer packets ZMQ provides `ZMQ_TOS` socket
option. However this only works for v4 sockets. Considering things are moving to
IPv6 heavily (especially within enterprise networks), ZMQ should support setting
`traffic class` for v6 based on `ZMQ_TOS`.
There is a subtle difference between v4 and v6 in terms of the positioning of
field but TOS has same meaning in both v4 and v6. Linux provides following APIs
for v4/v6 to set TOS field value.
```
// For v4
setsockopt(fd, IPPROTO_IP, IP_TOS, tos, sizeof(tos));
// For v6
setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, tos, sizeof(tos));
```
Test Plan:
Make sure Cmake works fine and all tests passes.
Imported this change to `OpenR` project and tested on our local testbed.
Captured some packets exchanged between PUB/SUB and ROUTER/ROUTER sockets
pairs. Verify that `TCLASS` value is set as per expectation.
Tasks: #2208
Solution: search and add it via AC_CHECK_LIB when building with
libunwind, as the backtrace function uses dladdr. This problem
only appears on some distributions and with some compiler/toolchain
versions.
Solution: test ENABLE_CURVE_KEYGEN and enable it only if
zmq_enable_curve_keygen=yes nad enable_curve=yes. Additionally set
enable_curve=yes for libsodium and tweetnacl, so it is enabled
implicitly and fixes the problem.
#define ZMQ_HAVE_WINDOWS_TARGET_XP disable uncompatible WinAPI
1. Disable call if_indextoname()
2. Emulate windows Condition Variable API in class condition_variable_t with std::condition_variable
This code can be compiled in MSVC 2015 with option "Platform toolset: Visual Studio 2015 - Windows XP (v140_xp)"
Solution: try to detect architecture if building with VC++ and
hardcode pointer size accordingly.
Expressions are not allowed inside declspec intrinsics, which
includes other intrinsics.
Solution: use compiler's alignment attributes instead which is
clearer and less of a hack.
Pointer alignment violations causing crashes on architectures
such as sparc64 and aarch64.
This also avoid triggering ABI checkers as the change is compatible
even though applications that suffer from the bug should rebuild to
take advantage of the fix.
Solution: Rename the custom implementation of clock_gettime for macOS to
alt_clock_gettime and wrap all usage in preprocessor macros to only enable the
alternative version when using macOS <= 10.11.
This issue occurs when targeting macOS 10.11 or earlier but using the 10.12
or newer SDK.
Solution: keep the new --without-docs option, but also keep the old
--without-documentation with an added deprecation warning.
We can then remove it in the next major release, to leave enough time
for users and maintainers to change it without disruptions.