1 #ifndef __IPADDRESS_H__
2 #define __IPADDRESS_H__
13 enum {NONE = 0, IPV4 = 4, IPV6 = 6 };
24 IPAddress(
const struct in6_addr& ip_addr);
28 bool operator==(
const IPAddress& other)
const;
29 int get_version()
const;
30 void setIPv4(uint32_t address);
31 void setIPv6(uint8_t address[16]);
34 static uint32_t IPv4from_string(
const std::string &address);
35 static struct in6_addr IPv6from_string(const std::string &address);