Fix `query_route_table()` returning a buffer padded with extra '\0'
bytes because it ignored the buffer size returned by `sysctl()`.
This caused `route_entries()` / `route6_entries()` to fall into an
infinite loop, forever trying to parse a 0-length routing entry.
* simplify tcp flag checks, fix stream_follower
On various places was used simple comparison for checking state of flags.
tcp.flags() == (TCP::SYN | TCP::ACK)
This is not what you want usually, because this check is false
in case that another flag is set also. Correct check for syn-ack
packet should be:
(tcp.flags() & (TCP::SYN | TCP::ACK)) == (TCP::SYN | TCP::ACK)
To simplify this kind of check, add new has_flags method:
bool TCP::has_flags(small_uint<12> check_flags) const
* remove duplicate TCP::SYN flag check
If building (say) libtins 4.0 on a system with 3.4 installed, you need
the libtins include files to come from the repository include, not the
system include directory. The OpenSSL and PCAP includes may be from
the system include, so we need to ensure the libtins include is the
first on the list - which means the last on the before list.
* Add parsing of well known IPv6 extension headers
Add classes for IPv6 extension headers defined in the IPv6 protocol
specification (RFC 2460) as well as functions for creating them from
the IPv6 class' ext_header type.
The currently known extension headers are Hop-By-Hop Option,
Destination Routing, Routing and Fragment.
* Cleanup after PR #287 comments
Pull in stuff from the std namespace with "using" instead of
qualifying with std::.
Keep starting braces on the same line.
Avoid potential copy when appending to vector.
* * add or-operator and a simlple unit test for hw_address, ip_address, ipv6_address
* add not-operator and a simlple unit test for hw_address, ip_address, ipv6_address
* add greater-then-operator and a simlple unit test for ipv6_address
* add new constructor and a simlple unit test for network_interface, which use a ipv6_address to find the nic
* add override the function gateway_from_ip for ipv6_address parameter (untested)
* change the ipv6_address in NotMaskAdress_Test, so that the expceted addresses are valid for the winsock api
* Delete CMakeLists.txt.user
* * add <=, >, >= operator for HWAddress with tests
* add <=, >, >= operator for IPv4Address with tests
* add <=,>= operator for IPv6Address with tests
* refactoring the & , |, ~ operator of ipv6_address to "regular" operator
* Reorders SOURCE includes alphanumerically, and adds HEADERS as sources to enable code completion in CLion.
* Add forward slash after variable to clarify path.
* Separate out DOT11 headers and sources.
* Reposition some sources as per general alpha sorting.
* fixed compile failure due to macro
* add functional to cxxstd.h to try to fix mac
* clang bug identified, moving functional include to later
* last step, move hash def to header
* avoid allocation on hash
* set ipv6 back to string hash