18#ifndef _DECAF_NET_INETADDRESS_H_
19#define _DECAF_NET_INETADDRESS_H_
36 static const unsigned char loopbackBytes[4];
37 static const unsigned char anyBytes[4];
49 InetAddress(
const std::string& hostname,
const unsigned char* ipAddress,
int numBytes);
242 static unsigned int bytesToInt(
const unsigned char* bytes,
int start);
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: ArrayPointer.h:51
Represents an IP address.
Definition: InetAddress.h:33
virtual bool isLoopbackAddress() const
Check if this InetAddress is a valid loopback address.
Definition: InetAddress.h:116
decaf::lang::ArrayPointer< unsigned char > addressBytes
Definition: InetAddress.h:43
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.
virtual std::string toString() const
Returns a string representation of the InetAddress in the form 'hostname / ipaddress'.
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.
virtual bool isMCGlobal() const
Check if this InetAddress is Multicast and has Global scope.
Definition: InetAddress.h:152
virtual bool isMCOrgLocal() const
Check if this InetAddress is Multicast and has Organization scope.
Definition: InetAddress.h:188
virtual decaf::lang::ArrayPointer< unsigned char > getAddress() const
Returns the Raw IP address in Network byte order.
virtual bool isSiteLocalAddress() const
Check if this InetAddress is a valid site local address.
Definition: InetAddress.h:143
virtual bool isMCSiteLocal() const
Check if this InetAddress is Multicast and has Site Local scope.
Definition: InetAddress.h:179
virtual bool isLinkLocalAddress() const
Check if this InetAddress is a valid link local address.
Definition: InetAddress.h:134
std::string hostname
Definition: InetAddress.h:41
virtual bool isAnyLocalAddress() const
Check if this InetAddress is a valid wildcard address.
Definition: InetAddress.h:107
static InetAddress getLoopbackAddress()
bool reached
Definition: InetAddress.h:42
InetAddress(const unsigned char *ipAddress, int numBytes)
virtual bool isMCLinkLocal() const
Check if this InetAddress is Multicast and has Link Local scope.
Definition: InetAddress.h:170
virtual std::string getHostAddress() const
Returns a textual representation of the IP Address.
virtual bool isMulticastAddress() const
Check if this InetAddress is a valid Multicast address.
Definition: InetAddress.h:125
InetAddress(const std::string &hostname, const unsigned char *ipAddress, int numBytes)
virtual InetAddress * clone() const
Returns a newly allocated copy of this InetAddress.
static InetAddress getAnyAddress()
virtual std::string getHostName() const
Get the host name associated with this InetAddress instance.
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 val...
virtual bool isMCNodeLocal() const
Check if this InetAddress is Multicast and has Node Local scope.
Definition: InetAddress.h:161
#define DECAF_API
Definition: Config.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition: AprPool.h:25