IPv4 and IPv6 in global options

Initial
Stephane Bortzmeyer 20 years ago
parent 5a99238de8
commit efeff930f9

@ -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)

@ -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;

Loading…
Cancel
Save