Files
nethogs/conninode_test.cpp
2016-03-27 21:43:15 +02:00

24 lines
523 B
C++

#include "conninode.cpp"
local_addr *local_addrs = NULL;
int main() {
if (!addprocinfo("testfiles/proc_net_tcp")) {
std::cerr << "Failed to load testfiles/proc_net_tcp" << std::endl;
return 1;
}
if (!addprocinfo("testfiles/proc_net_tcp_big")) {
std::cerr << "Failed to load testfiles/proc_net_tcp_big" << std::endl;
return 2;
}
#if not defined(__APPLE__)
if (!addprocinfo("/proc/net/tcp")) {
std::cerr << "Failed to load /proc/net/tcp" << std::endl;
return 3;
}
#endif
return 0;
}