activemq-cpp-3.6.0
|
Represents an IP address. More...
#include <src/main/decaf/net/InetAddress.h>
Public Member Functions | |
virtual | ~InetAddress () |
virtual decaf::lang::ArrayPointer < unsigned char > | getAddress () const |
Returns the Raw IP address in Network byte order. | |
virtual std::string | getHostAddress () const |
Returns a textual representation of the IP Address. | |
virtual std::string | getHostName () const |
Get the host name associated with this InetAddress instance. | |
virtual std::string | toString () const |
Returns a string representation of the InetAddress in the form 'hostname / ipaddress'. | |
virtual InetAddress * | clone () const |
Returns a newly allocated copy of this InetAddress. | |
virtual bool | isAnyLocalAddress () const |
Check if this InetAddress is a valid wildcard address. | |
virtual bool | isLoopbackAddress () const |
Check if this InetAddress is a valid loopback address. | |
virtual bool | isMulticastAddress () const |
Check if this InetAddress is a valid Multicast address. | |
virtual bool | isLinkLocalAddress () const |
Check if this InetAddress is a valid link local address. | |
virtual bool | isSiteLocalAddress () const |
Check if this InetAddress is a valid site local address. | |
virtual bool | isMCGlobal () const |
Check if this InetAddress is Multicast and has Global scope. | |
virtual bool | isMCNodeLocal () const |
Check if this InetAddress is Multicast and has Node Local scope. | |
virtual bool | isMCLinkLocal () const |
Check if this InetAddress is Multicast and has Link Local scope. | |
virtual bool | isMCSiteLocal () const |
Check if this InetAddress is Multicast and has Site Local scope. | |
virtual bool | isMCOrgLocal () const |
Check if this InetAddress is Multicast and has Organization scope. |
Static Public Member Functions | |
static InetAddress | getByAddress (const unsigned char *bytes, int numBytes) |
Given a raw IP Address in byte array form, create and return a new InetAddress instance. | |
static InetAddress | getByAddress (const std::string &hostname, const unsigned char *bytes, int numBytes) |
Given a host name and IPAddress return a new InetAddress. | |
static InetAddress | getLocalHost () |
Gets an InetAddress that is the local host address. |
Protected Member Functions | |
InetAddress () | |
InetAddress (const unsigned char *ipAddress, int numBytes) | |
InetAddress (const std::string &hostname, const unsigned char *ipAddress, int numBytes) |
Static Protected Member Functions | |
static unsigned int | bytesToInt (const unsigned char *bytes, int start) |
Converts the bytes in an address array to an int starting from the value start treating the start value as the high order byte. | |
static InetAddress | getAnyAddress () |
static InetAddress | getLoopbackAddress () |
Protected Attributes | |
std::string | hostname |
bool | reached |
decaf::lang::ArrayPointer < unsigned char > | addressBytes |
Static Protected Attributes | |
static const unsigned char | loopbackBytes [4] |
static const unsigned char | anyBytes [4] |
Represents an IP address.
|
protected |
|
protected |
|
protected |
|
virtual |
|
staticprotected |
Converts the bytes in an address array to an int starting from the value start treating the start value as the high order byte.
bytes | The array of bytes to convert to an int. |
start | The index in the array to treat as the high order byte. |
|
virtual |
Returns a newly allocated copy of this InetAddress.
The caller owns the resulting copy and must delete it.
Reimplemented in decaf::net::Inet4Address, and decaf::net::Inet6Address.
|
virtual |
Returns the Raw IP address in Network byte order.
The returned address is a copy of the bytes contained in this InetAddress.
|
staticprotected |
|
static |
Given a raw IP Address in byte array form, create and return a new InetAddress instance.
An IPV4 address must be only four bytes in length and an IPV6 address must be 16 bytes in length.
UnknownHostException | if the address array length is invalid. |
|
static |
Given a host name and IPAddress return a new InetAddress.
There is no name service checking or address validation done on the provided host name. The host name can either be machine name or the text based representation of the IP Address.
An IPV4 address must be only four bytes in length and an IPV6 address must be 16 bytes in length.
UnknownHostException | if the address array length is invalid. |
|
virtual |
Returns a textual representation of the IP Address.
|
virtual |
Get the host name associated with this InetAddress instance.
If a host name was set upon construction then that value is returned, otherwise a reverse name lookup with be performed to attempt to get the host name associated with the set IP Address. If the host name cannot be resolved the textual representation of the IP Address is returned instead.
|
static |
Gets an InetAddress that is the local host address.
If the localhost value cannot be resolved than the InetAddress for Loopback is returned.
UnknownHostException | if the address for local host is not found. |
|
staticprotected |
|
inlinevirtual |
Check if this InetAddress is a valid wildcard address.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is a valid link local address.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is a valid loopback address.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is Multicast and has Global scope.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is Multicast and has Link Local scope.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is Multicast and has Node Local scope.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is Multicast and has Organization scope.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is Multicast and has Site Local scope.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is a valid Multicast address.
Reimplemented in decaf::net::Inet4Address.
|
inlinevirtual |
Check if this InetAddress is a valid site local address.
Reimplemented in decaf::net::Inet4Address.
|
virtual |
Returns a string representation of the InetAddress in the form 'hostname / ipaddress'.
If the hostname is not resolved than it appears as empty.
|
mutableprotected |
|
staticprotected |
|
mutableprotected |
|
staticprotected |
|
mutableprotected |