A class for representing an IP address in an OS independent way. More...
#include <AsyncIpAddress.h>
A class for representing an IP address in an OS independent way.
Definition at line 104 of file AsyncIpAddress.h.
typedef struct in_addr Async::IpAddress::Ip4Addr |
The type for the OS specific representation of an IP address.
Definition at line 110 of file AsyncIpAddress.h.
Async::IpAddress::IpAddress | ( | void | ) |
Default constructor for the IpAddress class.
Async::IpAddress::IpAddress | ( | const std::string & | addr | ) |
Constructor for the IpAddress class.
addr | The string representation of an IP address |
Async::IpAddress::IpAddress | ( | const Ip4Addr & | addr | ) |
Constructor for the IpAddress class.
addr | The IP address in OS specific representation |
Async::IpAddress::IpAddress | ( | const IpAddress & | addr | ) | [inline] |
Copy contructor.
addr | An IpAddress object to construct the new object from |
Definition at line 133 of file AsyncIpAddress.h.
Async::IpAddress::~IpAddress | ( | void | ) | [inline] |
Destructor.
Definition at line 138 of file AsyncIpAddress.h.
Ip4Addr Async::IpAddress::ip4Addr | ( | void | ) | const [inline] |
Return the IP address in OS specific representation.
Definition at line 144 of file AsyncIpAddress.h.
bool Async::IpAddress::isUnicast | ( | void | ) | const |
Check if this is a unicast IP address.
bool Async::IpAddress::isWithinSubet | ( | const std::string & | subnet | ) | const |
Check if the IP address is within the given netmask.
subnet | The subnet to use in the check. The subnet should be given on the form a.b.c.d/m (e.g. 192.168.1.0/24). |
bool Async::IpAddress::operator!= | ( | const IpAddress & | rhs | ) | const [inline] |
Unequality operator.
rhs | Right hand side expression |
Definition at line 196 of file AsyncIpAddress.h.
bool Async::IpAddress::operator< | ( | const IpAddress & | rhs | ) | const [inline] |
Less than operator.
rhs | Right hand side expression |
Definition at line 207 of file AsyncIpAddress.h.
Assignment operator.
rhs | The address object to assign to this object |
Definition at line 173 of file AsyncIpAddress.h.
bool Async::IpAddress::operator== | ( | const IpAddress & | rhs | ) | const [inline] |
Equality operator.
rhs | Right hand side expression |
Definition at line 185 of file AsyncIpAddress.h.
std::string Async::IpAddress::toString | ( | void | ) | const |
Return the string representation of the IP address.
std::ostream& operator<< | ( | std::ostream & | os, | |
const Async::IpAddress & | ip | |||
) | [friend] |
Output stream operator.
os | The stream to output data to | |
ip | The IP address to output to the stream |