13 IPAddress(uint8_t first, uint8_t second, uint8_t third, uint8_t fourth) :
addr_({first, second, third, fourth}) {}
15 addr_[0] = (uint8_t) (raw >> 0);
16 addr_[1] = (uint8_t) (raw >> 8);
17 addr_[2] = (uint8_t) (raw >> 16);
18 addr_[3] = (uint8_t) (raw >> 24);
20 operator uint32_t()
const {
22 res |= ((uint32_t)
addr_[0]) << 0;
23 res |= ((uint32_t)
addr_[1]) << 8;
24 res |= ((uint32_t)
addr_[2]) << 16;
25 res |= ((uint32_t)
addr_[3]) << 24;
28 std::string
str()
const {
std::array< uint8_t, 4 > addr_
bool operator==(const IPAddress &other) const
uint8_t & operator[](int index)
IPAddress(uint8_t first, uint8_t second, uint8_t third, uint8_t fourth)
uint8_t operator[](int index) const