This commit is contained in:
chris
2002-04-02 21:40:28 +00:00
parent de65eda001
commit 2ece61a41f
4 changed files with 13 additions and 4 deletions

View File

@@ -13,7 +13,7 @@
options_t options;
char optstr[] = "+i:f:n:dhp";
char optstr[] = "+i:f:n:dhpb";
/* Global options. */
@@ -68,12 +68,13 @@ static void usage(FILE *fp) {
fprintf(fp,
"iftop: display bandwidth usage on an interface by host\n"
"\n"
"Synopsis: iftop -h | [-d] [-p] [-i interface] [-f filter code] [-n net/mask]\n"
"Synopsis: iftop -h | [-dpb] [-i interface] [-f filter code] [-n net/mask]\n"
"\n"
" -h display this message\n"
" -d don't do hostname lookups\n"
" -p run in promiscuous mode (show traffic between other\n"
" hosts on the same network segment)\n"
" -b don't display a bar graph of traffic\n"
" -i interface listen on named interface (default: eth0)\n"
" -f filter code use filter code to select packets to count\n"
" (default: none, but only IP packets are counted)\n"
@@ -115,6 +116,10 @@ void options_read(int argc, char **argv) {
set_net_filter(optarg);
break;
case 'b':
options.showbars = 0;
break;
case '?':
fprintf(stderr, "iftop: unknown option -%c\n", optopt);
usage(stderr);