Commit 5ff845e0 authored by jedi's avatar jedi
Browse files

some minor fixes

parents 06351d87 aa8af556
...@@ -57,6 +57,17 @@ ipAddr Host::getIp() { ...@@ -57,6 +57,17 @@ ipAddr Host::getIp() {
return data; return data;
} }
} }
/*
for (ifa = ifaddr, n = 0; ifa != NULL; ifa = ifa->ifa_next, n++) {
if (ifa->ifa_addr == NULL)
continue;
if (ifa->ifa_addr->sa_family == AF_INET)
if (getIface().compare(ifa->ifa_name) == 0) {
memcpy(&data[0], &ifa->ifa_addr->sa_data[2], 4);
return data;
}
}
*/
freeifaddrs(ifaddr); freeifaddrs(ifaddr);
return data; return data;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment