icmp echo can be sent and reply is sent but not yet handled
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/26 17:01:53 by tomoron #+# #+# */
|
||||
/* Updated: 2025/04/29 02:13:24 by tomoron ### ########.fr */
|
||||
/* Updated: 2025/04/30 00:17:50 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
#include "includes/ft_ping.h"
|
||||
@ -98,6 +98,8 @@ void parse_opt(int *i, t_settings *set, int argc, char **argv)
|
||||
set->count = get_set_int(i, argc, argv, 7, set);
|
||||
else if(!strcmp(argv[*i], "-w") || !strncmp(argv[*i], "--timeout", 9))
|
||||
set->timeout = get_set_int(i, argc, argv, 9, set);
|
||||
else if(!strcmp(argv[*i], "-W") || !strncmp(argv[*i], "--linger", 8))
|
||||
set->timeout = get_set_int(i, argc, argv, 8, set);
|
||||
else if(!strcmp(argv[*i], "-i") || !strncmp(argv[*i], "--interval", 10))
|
||||
set->interval = get_set_float(i, argc, argv, 10, set);
|
||||
else if(!strncmp(argv[*i], "--ttl", 5))
|
||||
@ -105,8 +107,6 @@ void parse_opt(int *i, t_settings *set, int argc, char **argv)
|
||||
set->ttl = get_set_int(i, argc, argv, 5, set);
|
||||
set->setTtl = 1;
|
||||
}
|
||||
else if(!strcmp(argv[*i], "-n") || !strcmp(argv[*i], "--numeric"))
|
||||
set->no_resolve = 1;
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "%s: unrecognized option '%s'\n", argv[0], argv[*i]);
|
||||
|
Reference in New Issue
Block a user