MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / log_ip_addresses

Function log_ip_addresses

OpenHD/ohd_interface/src/microhard_link.cpp:382–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380static const std::string DEVICE_IP_AIR = find_device_ip_air();
381
382void log_ip_addresses() {
383 auto ip_addresses = get_ip_addresses(MICROHARD_IP_RANGE);
384 if (!ip_addresses.empty()) {
385 for (const auto& ip : ip_addresses) {
386 openhd::log::get_default()->warn("Found IP address: {}", ip);
387 std::string gateway_ip = get_gateway_ip();
388 openhd::log::get_default()->warn("Gateway IP for {}: {}", ip, gateway_ip);
389 }
390 } else {
391 openhd::log::get_default()->warn("No IP addresses starting with {} found.",
392 MICROHARD_IP_RANGE);
393 }
394}
395
396std::string get_detected_ip_address() {
397 auto ip_addresses = get_ip_addresses(MICROHARD_IP_RANGE);

Callers

nothing calls this directly

Calls 2

get_ip_addressesFunction · 0.85
get_gateway_ipFunction · 0.85

Tested by

no test coverage detected