senf::CheckINet4Network< address, prefix_len > Class Template Reference

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

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

Static Public Member Functions

static bool match (INet4Address const &addr)
 

Detailed Description

template<boost::uint32_t address, unsigned prefix_len>
class senf::CheckINet4Network< address, prefix_len >

Check INet4Address against a fixed network prefix.

This helper allows to easily and efficiently check an INet4Address against an arbitrary but constant network prefix. The network prefix is represented by

senf::CheckINet4Network< addr , prefix-len >

Where addr is the v4 Internet address as a 32-bit unsigned integer number in host byte order and prefix_len is the length of the network prefix. The class exposes a single static member match( addr ) which matches the INet4Address addr against the prefix:

// 'addr' is within the 127.0.0.0/8 loopback network
...
}
    \par "Implementation note:" This is implemented the way it is so the syntax is identical to the
        CheckINet6Network syntax.

Definition at line 198 of file INet4Address.hh.

Member Function Documentation

◆ match()

template<boost::uint32_t address, unsigned prefix_len>
static bool senf::CheckINet4Network< address, prefix_len >::match ( INet4Address const &  addr)
static

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