|
|
@ -352,6 +352,12 @@ int main(int argc, char** argv)
|
|
|
|
HOST_ENTRY* cursor;
|
|
|
|
HOST_ENTRY* cursor;
|
|
|
|
struct optparse optparse_state;
|
|
|
|
struct optparse optparse_state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* pre-parse -h/--help, so that we also can output help information
|
|
|
|
|
|
|
|
* without trying to open the socket, which might fail */
|
|
|
|
|
|
|
|
if(argc == 2 && ( strcmp(argv[1],"-h")==0 || strcmp(argv[1],"--help")==0 )) {
|
|
|
|
|
|
|
|
usage(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
socket4 = open_ping_socket_ipv4(ping_data_size);
|
|
|
|
socket4 = open_ping_socket_ipv4(ping_data_size);
|
|
|
|
#ifdef IPV6
|
|
|
|
#ifdef IPV6
|
|
|
|
socket6 = open_ping_socket_ipv6(ping_data_size);
|
|
|
|
socket6 = open_ping_socket_ipv6(ping_data_size);
|
|
|
|