SimpleSocket
0.1
Some wrappers that make using sockets easier in C++
|
#include <comboaddress.hh>
Public Member Functions | |
Netmask (const ComboAddress &network, uint8_t bits=0xff) | |
Netmask (const std::string &mask) | |
Constructor supplies the mask, which cannot be changed. | |
bool | match (const ComboAddress &ip) const |
bool | match (const ComboAddress *ip) const |
If this IP address in socket address matches. | |
bool | match (const std::string &ip) const |
If this ASCII IP address matches. | |
bool | match4 (uint32_t ip) const |
If this IP address in native format matches. | |
std::string | toString () const |
std::string | toStringNoMask () const |
const ComboAddress & | getNetwork () const |
const ComboAddress | getMaskedNetwork () const |
int | getBits () const |
bool | isIpv6 () const |
bool | isIpv4 () const |
bool | operator< (const Netmask &rhs) const |
bool | operator== (const Netmask &rhs) const |
bool | empty () const |
This class represents a netmask and can be queried to see if a certain IP address is matched by this mask