add --ttl and -v flag
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/05/22 23:01:05 by tomoron ### ########.fr */
|
||||
/* Updated: 2025/06/01 21:37:16 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
#include "includes/ft_ping.h"
|
||||
@ -96,6 +96,8 @@ void parse_opt(int *i, t_settings *set, int argc, char **argv)
|
||||
show_help(set, *argv);
|
||||
else if(!strcmp(argv[*i], "-c") || !strncmp(argv[*i], "--count", 7))
|
||||
set->count = get_set_int(i, argc, argv, 7, set);
|
||||
else if(!strcmp(argv[*i], "-v") || !strncmp(argv[*i], "--verbose", 7))
|
||||
set->verbose = 1;
|
||||
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))
|
||||
@ -166,4 +168,3 @@ t_settings parse_args(int argc, char **argv)
|
||||
res.err = !check_values(&res, argv[0]);
|
||||
return(res);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user