1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-24 19:21:35 +01:00

libtins now compiles on windows. A couple of features were disabled and need to be fixed though.

This commit is contained in:
Matias Fontanini
2012-12-02 00:45:10 -03:00
parent dbe67c8cae
commit 6d1e96866e
11 changed files with 80 additions and 22 deletions

View File

@@ -58,14 +58,21 @@ using namespace std;
/** \cond */
struct InterfaceCollector {
set<string> ifaces;
#ifdef WIN32
bool operator() (PIP_ADAPTER_ADDRESSES addr) {
ifaces.insert(addr->AdapterName);
return true;
}
#else
bool operator() (struct ifaddrs *addr) {
ifaces.insert(addr->ifa_name);
return true;
}
#endif
};
struct IPv4Collector {
/*struct IPv4Collector {
uint32_t ip;
bool found;
const char *iface;
@@ -79,7 +86,7 @@ struct IPv4Collector {
}
return found;
}
};
};*/
namespace Tins {