A simple wrapper class for IpAddress objects.
More...
#include <ip_address.hpp>
A simple wrapper class for IpAddress objects.
◆ IpAddress() [1/2]
hebi::IpAddress::IpAddress |
( |
| ) |
|
|
default |
Creates IPv4 address 0.0.0.0.
◆ IpAddress() [2/2]
hebi::IpAddress::IpAddress |
( |
uint32_t |
address_raw | ) |
|
|
inline |
◆ fromBytes()
static IpAddress hebi::IpAddress::fromBytes |
( |
uint8_t |
a, |
|
|
uint8_t |
b, |
|
|
uint8_t |
c, |
|
|
uint8_t |
d |
|
) |
| |
|
inlinestatic |
◆ fromLittleEndian()
static IpAddress hebi::IpAddress::fromLittleEndian |
( |
uint32_t |
raw | ) |
|
|
inlinestatic |
Creates an IpAddress from a little endian uint32_t.
◆ setToString()
bool hebi::IpAddress::setToString |
( |
const std::string & |
ip_str | ) |
|
|
inline |
Sets the value of the current IpAddress to the value given in 'ip_str'.
This value must be a valid string of format a.b.c.d, where 'a' - 'd' are integers from 0-255.
- Returns
- 'true' on success (valid ip_str), 'false' on failure.
◆ toString()
std::string hebi::IpAddress::toString |
( |
| ) |
const |
|
inline |
Returns a string representation of the IP address.
◆ getLittleEndian()
uint32_t hebi::IpAddress::getLittleEndian |
( |
| ) |
const |
|
inline |
Returns the IP Address as a little endian uint32_t.
◆ getBigEndian()
uint32_t hebi::IpAddress::getBigEndian |
( |
| ) |
const |
|
inline |
Returns the IP Address as a big endian (network order) uint32_t.
The documentation for this class was generated from the following file: