+ return (Hostname() == wxT("localhost") || IPAddress() == wxT("127.0.0.1"));
+}
+
+bool wxIPV6address::AnyAddress()
+{
+ return (GAddress_INET_SetAnyAddress(m_address) == GSOCK_NOERROR);
+}
+
+wxString wxIPV6address::IPAddress() const
+{
+ unsigned long raw = GAddress_INET_GetHostAddress(m_address);
+ return wxString::Format(
+ _T("%u.%u.%u.%u"),
+ (unsigned char)(raw & 0xff),
+ (unsigned char)((raw>>8) & 0xff),
+ (unsigned char)((raw>>16) & 0xff),
+ (unsigned char)((raw>>24) & 0xff)
+ );
+}
+
+wxString wxIPV6address::Hostname() const
+{
+ char hostname[1024];
+
+ hostname[0] = 0;
+ GAddress_INET_GetHostName(m_address, hostname, 1024);
+ return wxString::FromAscii(hostname);