23 #ifndef __ccxx_InetAddress_hxx 24 #define __ccxx_InetAddress_hxx 32 #include <sys/types.h> 33 #include <netinet/in.h> 54 inline virtual void write(std::ostream& stream)
const 55 { _write(stream,
"HostNotFoundException"); }
105 void setHost(
const String& host);
112 void setAddress(uint32_t addr);
128 char getNetworkClass()
const;
134 bool isMulticast()
const;
140 bool isNonroutable()
const;
143 bool isLinkLocal()
const;
164 {
return(_resolved); }
170 String toIPString()
const;
177 {
return(!
operator==(other)); }
190 bool _fromDotSeparated();
194 mutable bool _resolved;
200 return(stream << cstr_a.
data());
205 #endif // __ccxx_InetAddress_hxx uint32_t getAddress() const
Get the host IP address for this address.
Definition: InetAddress.h++:119
bool operator!=(const InetAddress &other) const
Inequality operator.
Definition: InetAddress.h++:176
String toString() const
Get aString representation for this address.
Definition: InetAddress.c++:213
static const String empty
The empty string.
Definition: String.h++:1134
const char * data() const
Get a pointer to the character array.
Definition: CString.h++:58
static const InetAddress ANY
A value representing the wildcard address, 0.0.0.0.
Definition: InetAddress.h++:186
An exception indicating an I/O error.
Definition: IOException.h++:36
bool operator==(const Blob &b1, const Blob &b2)
Definition: Blob.h++:344
An exception indicating a hostname resolution failure or malformed IP address string.
Definition: InetAddress.h++:44
std::ostream & operator<<(std::ostream &stream, const BitSet &bs)
Definition: BitSet.h++:383
#define COMMONCPP_API
Definition: Common.h++:126
A flexible, reference counted, copy-on-write, thread-safe, nullable string.
Definition: String.h++:50
An implicitly shared, reference-counted container for an immutable, NUL-terminated C string...
Definition: CString.h++:39
CString toUTF8() const
Return the contents of the string as an immutable C string.
Definition: String.c++:1143
bool isResolved() const
Test if this InetAddress has been successfully resolved.
Definition: InetAddress.h++:163
virtual void write(std::ostream &stream) const
Write a textual representation of the exception to a stream.
Definition: InetAddress.h++:54
An IPv4 Internet address.
Definition: InetAddress.h++:64
Definition: AllocationMap.c++:25
unsigned char byte_t
An unsigned 8-bit value.
Definition: Integers.h++:68