aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/tshark.pod5
-rw-r--r--ui/cli/tap-hosts.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/doc/tshark.pod b/doc/tshark.pod
index b56f16b00f..803272705b 100644
--- a/doc/tshark.pod
+++ b/doc/tshark.pod
@@ -1311,10 +1311,11 @@ on those calls that match that filter.
Example: B<-z "h225,srt,ip.addr==1.2.3.4"> will only collect stats for
ITU-T H.225 RAS packets exchanged by the host at IP address 1.2.3.4 .
-=item B<-z> hosts[,ipv4][,ipv6]
+=item B<-z> hosts[,ip][,ipv4][,ipv6]
Dump any collected IPv4 and/or IPv6 addresses in "hosts" format. Both IPv4
-and IPv6 addresses are dumped by default.
+and IPv6 addresses are dumped by default. "ip" argument will dump only ipv4
+addresses.
Addresses are collected from a number of sources, including standard "hosts"
files and captured traffic.
diff --git a/ui/cli/tap-hosts.c b/ui/cli/tap-hosts.c
index 584fe6c126..fcf134363a 100644
--- a/ui/cli/tap-hosts.c
+++ b/ui/cli/tap-hosts.c
@@ -102,12 +102,13 @@ hosts_init(const char *opt_arg, void *userdata _U_)
tokens = g_strsplit(opt_arg, ",", 0);
opt_count = 0;
while (tokens[opt_count]) {
- if (strcmp("ipv4", tokens[opt_count]) == 0) {
+ if ((strcmp("ipv4", tokens[opt_count]) == 0) ||
+ (strcmp("ip", tokens[opt_count]) == 0)) {
dump_v4 = TRUE;
} else if (strcmp("ipv6", tokens[opt_count]) == 0) {
dump_v6 = TRUE;
} else if (opt_count > 0) {
- cmdarg_err("invalid \"-z " TAP_NAME "[,ipv4|ipv6]\" argument");
+ cmdarg_err("invalid \"-z " TAP_NAME "[,ip|ipv4|ipv6]\" argument");
exit(1);
}
opt_count++;