#include <senf/Socket/Protocols/INet/INet6Address.hh>
This helper allows to easily and efficiently check an INet6Address against an arbitrary but constant network prefix. It takes from 1 to 8 arguments for the network address and an additional last argument providing the prefix length. So
senf::CheckINet6Network< addr_1 , addr_2 , ... , prefix_len >
: addr_2 : ... ::/ prefix_len .match( addr ) which matches the INet6Address addr against the prefix:
if (senf::CheckINet6Network<0x2000u,0xDB8u,32u>::match(addr)) { // 'addr' is within in the 2001:db8::/32 documentation-only network ... }
The code generated by this call is highly optimized and probably as efficient as it can get.
Definition at line 335 of file INet6Address.hh.