This commit is contained in:
chris
2002-03-26 21:07:26 +00:00
parent af27fdaabe
commit 5d52b1f944
2 changed files with 9 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
.TH DRIFTNET 1 .TH IFTOP 8
.\" .\"
.\" iftop.1: .\" iftop.8:
.\" Manual page for iftop. .\" Manual page for iftop.
.\" .\"
.\" $Id$ .\" $Id$

View File

@@ -179,6 +179,7 @@ void usage(FILE *fp) {
"iftop: display bandwidth usage on an interface by host\n" "iftop: display bandwidth usage on an interface by host\n"
"Options:\n" "Options:\n"
"\n" "\n"
" -d don't do hostname lookups\n"
" -i interface listen on named interface (default: eth0)\n" " -i interface listen on named interface (default: eth0)\n"
" -f filter code use filter code to select packets to count\n" " -f filter code use filter code to select packets to count\n"
" (default: none, but only IP packets are counted)\n" " (default: none, but only IP packets are counted)\n"
@@ -190,10 +191,11 @@ void usage(FILE *fp) {
/* main: /* main:
* Entry point. See usage(). */ * Entry point. See usage(). */
char optstr[] = "+i:f:h"; char optstr[] = "+i:f:dh";
int main(int argc, char **argv) { int main(int argc, char **argv) {
pthread_t thread; pthread_t thread;
struct sigaction sa = {0}; struct sigaction sa = {0};
extern int dnsresolution; /* in ui.c */
int opt; int opt;
opterr = 0; opterr = 0;
@@ -203,6 +205,10 @@ int main(int argc, char **argv) {
usage(stdout); usage(stdout);
return 0; return 0;
case 'd':
dnsresolution = 0;
break;
case 'i': case 'i':
interface = optarg; interface = optarg;
break; break;
@@ -224,7 +230,6 @@ int main(int argc, char **argv) {
} }
sa.sa_handler = finish; sa.sa_handler = finish;
sigaction(SIGINT, &sa, NULL); sigaction(SIGINT, &sa, NULL);
pthread_mutex_init(&tick_mutex, NULL); pthread_mutex_init(&tick_mutex, NULL);