diff --git a/SRC/echoping.c b/SRC/echoping.c index d6cac75..49a0b87 100644 --- a/SRC/echoping.c +++ b/SRC/echoping.c @@ -462,6 +462,14 @@ main (argc, argv) } global_options.udp = udp; global_options.verbose = verbose; + if (family == AF_INET) + global_options.only_ipv4 = 1; + else + global_options.only_ipv4 = 0; + if (family == AF_INET6) + global_options.only_ipv6 = 1; + else + global_options.only_ipv6 = 0; plugin_port_name = plugin_init (remaining, (const char **) leftover, global_options); if (plugin_port_name != NULL) diff --git a/SRC/echoping.h b/SRC/echoping.h index 03176f0..ddb5c66 100644 --- a/SRC/echoping.h +++ b/SRC/echoping.h @@ -122,6 +122,8 @@ unsigned short timeout_flag; struct echoping_struct { unsigned short udp; /* Use the UDP protocol (TCP is the default) */ + unsigned short only_ipv4; + unsigned short only_ipv6; unsigned short verbose; }; typedef struct echoping_struct echoping_options;