| 84 | } |
| 85 | |
| 86 | std::string FormatMacAddress(const WlanMacAddress &addr) { |
| 87 | std::stringstream strm; |
| 88 | strm << std::hex << std::uppercase; |
| 89 | for(u32 i = 0; i < sizeof(WlanMacAddress); i++) { |
| 90 | strm << static_cast<u32>(addr.mac[i]); |
| 91 | if((i + 1) < sizeof(WlanMacAddress)) { |
| 92 | strm << ':'; |
| 93 | } |
| 94 | } |
| 95 | return strm.str(); |
| 96 | } |
| 97 | |
| 98 | std::string GetConsoleIpAddress() { |
| 99 | char ip_addr[0x20] = {0}; |