IPv4 address wrapper helper.
More...
#include <ipv4_address.h>
|
static void | Inject (std::vector< uint8_t > &vector, Ipv4Address ipAddress) |
| Inject an IP address into a byte vector. More...
|
|
static Ipv4Address | Extract (const std::vector< uint8_t > &vector, std::size_t &offset) |
| Extract an IPv4 address from a byte vector. More...
|
|
|
std::array< uint8_t, 4 > | Octets |
| IPv4 address octets.
|
|
IPv4 address wrapper helper.
◆ Ipv4Address() [1/2]
ara::com::helper::Ipv4Address::Ipv4Address |
( |
uint8_t |
octet0, |
|
|
uint8_t |
octet1, |
|
|
uint8_t |
octet2, |
|
|
uint8_t |
octet3 |
|
) |
| |
|
noexcept |
Constructor.
- Parameters
-
octet0 | IPv4 first octet |
octet1 | IPv4 second octet |
octet2 | IPv4 third octet |
octet3 | IPv4 forth octet |
◆ Ipv4Address() [2/2]
ara::com::helper::Ipv4Address::Ipv4Address |
( |
std::string |
ipAddress | ) |
|
Constructor.
- Parameters
-
ipAddress | IPv4 address string |
◆ Extract()
Ipv4Address ara::com::helper::Ipv4Address::Extract |
( |
const std::vector< uint8_t > & |
vector, |
|
|
std::size_t & |
offset |
|
) |
| |
|
static |
Extract an IPv4 address from a byte vector.
- Parameters
-
vector | Byte vector |
offset | Extract offset at the vector |
- Returns
- Extracted IPv4 address
◆ Inject()
void ara::com::helper::Ipv4Address::Inject |
( |
std::vector< uint8_t > & |
vector, |
|
|
Ipv4Address |
ipAddress |
|
) |
| |
|
static |
Inject an IP address into a byte vector.
- Parameters
-
vector | Byte vector |
ipAddress | IP address to be injected |
◆ ToString()
std::string ara::com::helper::Ipv4Address::ToString |
( |
| ) |
const |
Convert the IP address to string.
- Returns
- IP address in string format