tshark: Add "ip" as alias for "ipv4" in -z hosts option.
Make it consistent with -z conv,ip and -z endpoints,ip Bug: 15660 Change-Id: I9a3d2e95fed47231c0bab20e6cf069987eed142f Reviewed-on: https://code.wireshark.org/review/34426 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
f959f203a1
commit
c07e31c71d
|
@ -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
|
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 .
|
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
|
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"
|
Addresses are collected from a number of sources, including standard "hosts"
|
||||||
files and captured traffic.
|
files and captured traffic.
|
||||||
|
|
|
@ -102,12 +102,13 @@ hosts_init(const char *opt_arg, void *userdata _U_)
|
||||||
tokens = g_strsplit(opt_arg, ",", 0);
|
tokens = g_strsplit(opt_arg, ",", 0);
|
||||||
opt_count = 0;
|
opt_count = 0;
|
||||||
while (tokens[opt_count]) {
|
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;
|
dump_v4 = TRUE;
|
||||||
} else if (strcmp("ipv6", tokens[opt_count]) == 0) {
|
} else if (strcmp("ipv6", tokens[opt_count]) == 0) {
|
||||||
dump_v6 = TRUE;
|
dump_v6 = TRUE;
|
||||||
} else if (opt_count > 0) {
|
} 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);
|
exit(1);
|
||||||
}
|
}
|
||||||
opt_count++;
|
opt_count++;
|
||||||
|
|
Loading…
Reference in New Issue