25 std::sscanf(str,
"%hhu.%hhu.%hhu.%hhu", &ip.bytes[0], &ip.bytes[1], &ip.bytes[2],
30 void ToString(
char out[IPADDR_STRLEN])
const
32 std::snprintf(out, IPADDR_STRLEN,
"%u.%u.%u.%u", bytes[0], bytes[1], bytes[2],
41 bool operator!=(
const IPAddressRaw& other)
const {
return !(*
this == other); }
71 std::sscanf(str,
"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &mac.bytes[0], &mac.bytes[1],
72 &mac.bytes[2], &mac.bytes[3], &mac.bytes[4], &mac.bytes[5]);
76 void ToString(
char out[MACADDR_STRLEN])
const
78 std::snprintf(out, MACADDR_STRLEN,
"%02X:%02X:%02X:%02X:%02X:%02X", bytes[0],
79 bytes[1], bytes[2], bytes[3], bytes[4], bytes[5]);
87 bool operator!=(
const MACAddressRaw& other)
const {
return !(*
this == other); }