Commit 5b5c2532 authored by pdw's avatar pdw

Randomly reassigned command line options.

parent d2a11512
......@@ -11,7 +11,7 @@ iftop - display bandwidth usage on an interface by host
.SH SYNOPSIS
\fBiftop\fP \fB-h\fP |
[\fB-dpbP\fP] [\fB-i\fP \fIinterface\fP] [\fB-f\fP \fIfilter code\fP] [\fB-n\fP \fInet\fP/\fImask\fP]
[\fB-npbBP\fP] [\fB-i\fP \fIinterface\fP] [\fB-f\fP \fIfilter code\fP] [\fB-N\fP \fInet\fP/\fImask\fP]
.SH DESCRIPTION
\fBiftop\fP listens to network traffic on a named \fIinterface\fP, or on the
......@@ -25,13 +25,13 @@ By default, \fBiftop\fP will look up the hostnames associated with addresses it
finds in packets. This can cause substantial traffic of itself, and may result
in a confusing display. You may wish to suppress display of DNS traffic by
using filter code such as \fBnot port domain\fP, or switch it off entirely,
by using the \fB-d\fP option or by pressing \fBR\fP when the program is running.
by using the \fB-n\fP option or by pressing \fBR\fP when the program is running.
By default, \fBiftop\fP counts all IP packets that pass through the filter, and
the direction of the packet is determined according to the direction the packet
is moving across the interface. Using the \fB-n\fP option it is possible to
is moving across the interface. Using the \fB-N\fP option it is possible to
get \fBiftop\fP to show packets entering and leaving a given network. For
example, \fBiftop -n 10.0.0.0/255.0.0.0\fP will analyse packets flowing in and
example, \fBiftop -N 10.0.0.0/255.0.0.0\fP will analyse packets flowing in and
out of the 10.* network.
Some other filter ideas:
......@@ -52,7 +52,7 @@ slow?
\fB-h\fP
Print a summary of usage.
.TP
\fB-d\fP
\fB-n\fP
Don't do hostname lookups. This setting may be altered at run time.
.TP
\fB-p\fP
......@@ -75,7 +75,7 @@ Listen to packets on \fIinterface\fP.
Use \fIfilter code\fP to select the packets to count. Only IP packets are ever
counted, so the specified code is evaluated as \fB(\fP\fIfilter code\fP\fB) and ip\fP.
.TP
\fB-n\fP \fInet\fP/\fImask\fP
\fB-N\fP \fInet\fP/\fImask\fP
Specifies a network for traffic analysis. If specified, iftop will only
include packets flowing in to or out of the given network, and packet direction
is determined relative to the network boundary, rather than to the interface.
......@@ -169,7 +169,7 @@ frozen. In this case some captured information is not being shown to
you, but is included in the totals.
A more subtle explanation comes about when running in promiscuous mode
without specifying a \fB-n\fP option. In this case there is no easy way
without specifying a \fB-N\fP option. In this case there is no easy way
to assign the direction of traffic between two other hosts. For the
purposes of the main display this is done in an arbitrary fashion (by
ordering of IP addresses), but for the sake of totals all traffic
......
......@@ -18,7 +18,7 @@
options_t options;
char optstr[] = "+i:f:n:dhpbBP";
char optstr[] = "+i:f:n:NhpbBP";
/* Global options. */
......@@ -153,10 +153,10 @@ static void usage(FILE *fp) {
fprintf(fp,
"iftop: display bandwidth usage on an interface by host\n"
"\n"
"Synopsis: iftop -h | [-dpb] [-i interface] [-f filter code] [-n net/mask]\n"
"Synopsis: iftop -h | [-npbBP] [-i interface] [-f filter code] [-N net/mask]\n"
"\n"
" -h display this message\n"
" -d don't do hostname lookups\n"
" -n 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"
......@@ -164,7 +164,7 @@ static void usage(FILE *fp) {
" -i interface listen on named interface\n"
" -f filter code use filter code to select packets to count\n"
" (default: none, but only IP packets are counted)\n"
" -n net/mask show traffic flows in/out of network\n"
" -N net/mask show traffic flows in/out of network\n"
" -P show ports as well as hosts\n"
"\n"
"iftop, version " IFTOP_VERSION "\n"
......@@ -184,7 +184,7 @@ void options_read(int argc, char **argv) {
usage(stdout);
exit(0);
case 'd':
case 'n':
options.dnsresolution = 0;
break;
......@@ -204,7 +204,7 @@ void options_read(int argc, char **argv) {
options.showports = OPTION_PORTS_ON;
break;
case 'n':
case 'N':
set_net_filter(optarg);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment