12#include <netinet/in.h>
13#include <sys/socket.h>
32 Address(u8 a, u8 b, u8 c, u8 d, u16 port);
41 struct in_addr
getAddress() const {
return m_address.ipv4; }
42 struct in6_addr
getAddress6() const {
return m_address.ipv6; }
45 void print(std::ostream &s)
const;
struct in6_addr getAddress6() const
Definition address.h:42
u16 getPort() const
Definition address.h:43
void print(std::ostream &s) const
Definition address.cpp:193
bool isIPv6() const
Definition address.h:40
int getFamily() const
Definition address.h:38
union Address::@20 m_address
void setAddress(u32 address)
Definition address.cpp:167
Address()
Definition address.cpp:45
unsigned short m_addr_family
Definition address.h:65
bool isValid() const
Definition address.h:39
struct in_addr getAddress() const
Definition address.h:41
bool operator!=(const Address &address) const
Definition address.h:36
bool operator==(const Address &address) const
Definition address.cpp:72
struct in_addr ipv4
Definition address.h:68
bool isLocalhost() const
Definition address.cpp:203
u16 m_port
Definition address.h:72
std::string serializeString() const
Definition address.cpp:147
void setPort(u16 port)
Definition address.cpp:188
bool isAny() const
Definition address.cpp:155
struct in6_addr ipv6
Definition address.h:69
void Resolve(const char *name, Address *fallback=nullptr)
Definition address.cpp:89
IPv6AddressBytes()
Definition address.h:24
u8 bytes[16]
Definition address.h:23