Files
nethogs/src/conninode_test.cpp
2016-05-16 14:46:39 +09:00

25 lines
571 B
C++

#include "conninode.cpp"
local_addr *local_addrs = NULL;
bool bughuntmode = false;
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 !defined(__APPLE__) && !defined(__FreeBSD__)
if (!addprocinfo("/proc/net/tcp")) {
std::cerr << "Failed to load /proc/net/tcp" << std::endl;
return 3;
}
#endif
return 0;
}