SimpleSocket  0.1
Some wrappers that make using sockets easier in C++
Public Member Functions | List of all members
Netmask Class Reference

#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 ComboAddressgetNetwork () 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
 

Detailed Description

This class represents a netmask and can be queried to see if a certain IP address is matched by this mask


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