senf::CheckINet6Network< a0, a1, a2, a3, a4, a5, a6, a7, a8 > Struct Template Reference

Check INet6Address against a fixed network prefix. More...

#include <senf/Socket/Protocols/INet/INet6Address.hh>

Detailed Description

template<unsigned a0, unsigned a1, unsigned a2 = 0u, unsigned a3 = 0u, unsigned a4 = 0u, unsigned a5 = 0u, unsigned a6 = 0u, unsigned a7 = 0u, unsigned a8 = 0u>
struct senf::CheckINet6Network< a0, a1, a2, a3, a4, a5, a6, a7, a8 >

Check INet6Address against a fixed network prefix.

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 >

represents the network

addr_1 : addr_2 : ... ::/ prefix_len .

The class exposes a single static member match( addr ) which matches the INet6Address addr against the prefix:

// '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 325 of file INet6Address.hh.


The documentation for this struct was generated from the following file: