本文整理汇总了C++中NetworkInterface::printAvailableInterfaces方法的典型用法代码示例。如果您正苦于以下问题:C++ NetworkInterface::printAvailableInterfaces方法的具体用法?C++ NetworkInterface::printAvailableInterfaces怎么用?C++ NetworkInterface::printAvailableInterfaces使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetworkInterface
的用法示例。
在下文中一共展示了NetworkInterface::printAvailableInterfaces方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: usage
//.........这里部分代码省略.........
" [-c <categorization key>] [-r <redis>]\n"
" [-l] [-U <sys user>] [-s] [-v] [-C]\n"
" [-F] [-D <mode>] [-E <mode>]\n"
" [-B <filter>] [-A <mode>]\n"
"\n"
"Options:\n"
"[--dns-mode|-n] <mode> | DNS address resolution mode\n"
" | 0 - Decode DNS responses and resolve\n"
" | local numeric IPs only (default)\n"
" | 1 - Decode DNS responses and resolve all\n"
" | numeric IPs\n"
" | 2 - Decode DNS responses and don't\n"
" | resolve numeric IPs\n"
" | 3 - Don't decode DNS responses and don't\n"
" | resolve numeric IPs\n"
"[--interface|-i] <interface|pcap> | Input interface name (numeric/symbolic)\n"
" | or pcap file path\n"
#ifndef WIN32
"[--data-dir|-d] <path> | Data directory (must be writable).\n"
" | Default: %s\n"
"[--daemon|-e] | Daemonize ntopng\n"
#endif
"[--httpdocs-dir|-1] <path> | HTTP documents root directory.\n"
" | Default: %s\n"
"[--scripts-dir|-2] <path> | Scripts directory.\n"
" | Default: %s\n"
"[--callbacks-dir|-3] <path> | Callbacks directory.\n"
" | Default: %s\n"
"[--dump-timeline|-C] | Enable timeline dump.\n"
"[--categorization-key|-c] <key> | Key used to access host categorization\n"
" | services (default: disabled). \n"
" | Please read README.categorization for\n"
" | more info.\n"
"[--http-port|-w] <http port> | HTTP port. Default: %u\n"
"[--https-port|-W] <http port> | HTTPS port. Default: %u\n"
"[--local-networks|-m] <local nets> | Local nets list (default: 192.168.1.0/24)\n"
" | (e.g. -m \"192.168.0.0/24,172.16.0.0/16\")\n"
"[--ndpi-protocols|-p] <file>.protos | Specify a nDPI protocol file\n"
" | (eg. protos.txt)\n"
"[--disable-host-persistency|-P] | Disable host persistency\n"
"[--redis|-r] <redis host[:port]> | Redis host[:port]\n"
#ifdef linux
"[--core-affinity|-g] <cpu core id> | Bind the capture/processing thread to a\n"
" | specific CPU Core\n"
#endif
"[--user|-U] <sys user> | Run ntopng with the specified user\n"
" | instead of %s\n"
"[--dont-change-user|-s] | Do not change user (debug only)\n"
"[--disable-login|-l] | Disable user login authentication\n"
"[--max-num-flows|-X] <num> | Max number of active flows\n"
" | (default: %u)\n"
"[--max-num-hosts|-x] <num> | Max number of active hosts\n"
" | (default: %u)\n"
"[--users-file|-u] <path> | Users configuration file path\n"
" | Default: %s\n"
#ifndef WIN32
"[--pid|-G] <path> | Pid file path\n"
#endif
"[--disable-alerts|-H] | Disable alerts generation\n"
"[--packet-filter|-B] <filter> | Ingress packet filter (BPF filter)\n"
"[--enable-aggregations|-A] <mode> | Setup data aggregation:\n"
" | 0 - No aggregations (default)\n"
" | 1 - Enable aggregations, no timeline dump\n"
" | 2 - Enable aggregations, with timeline\n"
" | dump (see -C)\n"
"[--dump-flows|-F] | Dump expired flows.\n"
"[--dump-hosts|-D] <mode> | Dump hosts policy (default: none).\n"
" | Values:\n"
" | all - Dump all hosts\n"
" | local - Dump only local hosts\n"
" | remote - Dump only remote hosts\n"
"[--dump-aggregations|-E] <mode> | Dump aggregations policy (default: none).\n"
" | Values:\n"
" | all - Dump all hosts\n"
" | local - Dump only local hosts\n"
" | remote - Dump only remote hosts\n"
"[--sticky-hosts|-S] <mode> | Dont flush hosts (default: none).\n"
" | Values:\n"
" | all - Keep all hosts in memory\n"
" | local - Keep only local hosts\n"
" | remote - Keep only remote hosts\n"
" | none - Flush hosts when idle\n"
"[--verbose|-v] | Verbose tracing\n"
"[--help|-h] | Help\n"
, PACKAGE_MACHINE, PACKAGE_VERSION, NTOPNG_SVN_RELEASE,
#ifndef WIN32
CONST_DEFAULT_DATA_DIR,
#endif
CONST_DEFAULT_DOCS_DIR, CONST_DEFAULT_SCRIPTS_DIR,
CONST_DEFAULT_CALLBACKS_DIR, CONST_DEFAULT_NTOP_PORT, CONST_DEFAULT_NTOP_PORT+1,
CONST_DEFAULT_NTOP_USER,
MAX_NUM_INTERFACE_HOSTS, MAX_NUM_INTERFACE_HOSTS/2,
CONST_DEFAULT_USERS_FILE);
printf("\n");
n.printAvailableInterfaces(true, 0, NULL, 0);
exit(0);
}