sella::net::IPAddress Class Reference

Inheritance diagram for sella::net::IPAddress:
sella::net::IPv4Address sella::net::IPv6Address

List of all members.

Classes

struct  hash
struct  ptr_eq
struct  ptr_hash
struct  shared_eq
struct  shared_hash

Public Types

typedef std::shared_ptr
< IPAddress
shared
typedef IPAddressptr
typedef std::list< IPAddresslist
typedef std::list< ptrptr_list
typedef std::list< shared > shared_list
typedef std::forward_list
< IPAddress
flist
typedef std::forward_list< ptrptr_flist
typedef std::forward_list< shared > shared_flist
typedef std::vector< IPAddressvector
typedef std::vector< ptrptr_vector
typedef std::vector< shared > shared_vector
typedef std::unordered_set
< IPAddress, hash
uset
typedef std::unordered_set
< ptr, ptr_hash, ptr_eq
ptr_uset
typedef std::unordered_set
< shared, shared_hash,
shared_eq
shared_uset
typedef
std::unordered_multiset
< IPAddress, hash
umset
typedef
std::unordered_multiset< ptr,
ptr_hash, ptr_eq
ptr_umset
typedef
std::unordered_multiset
< shared, shared_hash,
shared_eq
shared_umset

Public Member Functions

 IPAddress (const std::string &text, int family=IPv4Preferred, uint8_t cidr=255) throw (AddressException)
 IPAddress (int family=IPv4Preferred) throw (AddressException)
 IPAddress (const struct sockaddr_storage *ss, uint8_t cidr=255) throw (AddressException)
 IPAddress (const struct sockaddr *sa, uint8_t cidr=255) throw (AddressException)
 IPAddress (const struct in_addr *in, uint8_t cidr=255) throw (AddressException)
 IPAddress (const struct in6_addr *in6, uint8_t cidr=255) throw (AddressException)
 IPAddress (uint32_t address, uint8_t cidr=255) throw (AddressException)
 IPAddress (unsigned char address[16], uint8_t cidr=255) throw (AddressException)
 IPAddress (const IPAddress &other) throw ()
 IPAddress (const IPAddress &&other) throw ()
IPAddressoperator= (const IPAddress &other) throw ()
IPAddressoperator= (const IPAddress &&other) throw ()
bool operator== (const IPAddress &other) const throw ()
bool operator!= (const IPAddress &other) const throw ()
bool operator>= (const IPAddress &other) const throw ()
bool operator<= (const IPAddress &other) const throw ()
bool operator< (const IPAddress &other) const throw ()
bool operator> (const IPAddress &other) const throw ()
IPAddress operator& (const IPAddress &other) const throw (AddressException)
IPAddress operator| (const IPAddress &other) const throw (AddressException)
IPAddress operator^ (const IPAddress &other) const throw (AddressException)
IPAddress operator~ () const throw ()
IPAddressoperator+= (uint32_t increment) throw ()
IPAddress operator+ (uint32_t increment) const throw ()
IPAddress operator++ (int) throw ()
IPAddressoperator++ () throw ()
IPAddressoperator-= (uint32_t increment) throw ()
IPAddress operator- (uint32_t increment) const throw ()
IPAddress operator-- (int) throw ()
IPAddressoperator-- () throw ()
void applyCIDR (uint8_t cidr) throw (AddressException)
int getFamily (void) const throw ()
size_t getAddressStructureSize (void) const throw ()
struct in_addr & getIPv4AddressStructure (void) const throw (AddressException)
struct in6_addr & getIPv6AddressStructure (void) const throw (AddressException)
const std::string & str (void) const throw (AddressException)
const char * c_str (void) const throw (AddressException)
uint32_t getU32 (void) const throw ()
uint32_t getHash (void) const throw ()
bool empty (void) const throw ()
void clear (void) throw ()

Static Public Member Functions

static const IPAddress::shared shared_ptr (const std::string &text, int family=IPv4Preferred, uint8_t cidr=255) throw (AddressException)
static const IPAddress::shared shared_ptr (int family=IPv4Preferred, uint8_t cidr=255) throw (AddressException)
static const IPAddress::shared shared_ptr (const struct sockaddr_storage *ss, uint8_t cidr=255) throw (AddressException)
static const IPAddress::shared shared_ptr (const struct sockaddr *sa, uint8_t cidr=255) throw (AddressException)
static const IPAddress::shared shared_ptr (const struct in_addr *in, uint8_t cidr=255) throw (AddressException)
static const IPAddress::shared shared_ptr (const struct in6_addr *in6, uint8_t cidr=255) throw (AddressException)
static const IPAddress::shared shared_ptr (uint32_t address, uint8_t cidr=255) throw (AddressException)
static const IPAddress::shared shared_ptr (unsigned char address[16], uint8_t cidr=255) throw (AddressException)
static bool shared_bi_cmp (shared &a, shared &b)
static bool shared_bi_eq (shared &a, shared &b)

Static Public Attributes

static const int IPv4Preferred = 0x01
static const int IPv4Required = 0x03
static const int IPv6Preferred = 0x04
static const int IPv6Required = 0x12
static const int IPv4Family = AF_INET
static const int IPv6Family = AF_INET6

Protected Member Functions

bool parse (int &family, struct in_addr &v4, struct in6_addr &v6, const std::string &addr) throw ()
bool parse (int &family, struct in6_addr &v6, struct in_addr &v4, const std::string &addr) throw ()
bool parse (int &family, struct in_addr &v4, const std::string &addr) throw ()
bool parse (int &family, struct in6_addr &v6, const std::string &addr) throw ()

Detailed Description

Definition at line 31 of file IPAddress.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables

Generated on 20 Nov 2014 for libutil++ by  doxygen 1.6.1