refactor: reorganize src/ and includes/ for multi-binary support
This commit is contained in:
parent
3c7ce5b9fb
commit
ab90dbb07f
60 changed files with 119 additions and 113 deletions
14
Makefile
14
Makefile
|
|
@ -28,8 +28,14 @@ endif
|
||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
MAKEFLAGS += --no-print-directory
|
MAKEFLAGS += --no-print-directory
|
||||||
|
|
||||||
|
BINARIES = ft_ping
|
||||||
|
# Future: BINARIES = ft_ping ft_traceroute
|
||||||
|
|
||||||
# Include source files
|
# Include source files
|
||||||
include sources.mk
|
include sources/ping.mk
|
||||||
|
|
||||||
|
SRCS = $(PING_SRCS)
|
||||||
|
TESTS = $(PING_TESTS)
|
||||||
|
|
||||||
# Get libicmp sources for dependency tracking if building locally
|
# Get libicmp sources for dependency tracking if building locally
|
||||||
ifeq ($(BUILD_LOCAL_LIBICMP),yes)
|
ifeq ($(BUILD_LOCAL_LIBICMP),yes)
|
||||||
|
|
@ -39,7 +45,7 @@ endif
|
||||||
|
|
||||||
# Build Directories
|
# Build Directories
|
||||||
OBJ_DIR = build
|
OBJ_DIR = build
|
||||||
OBJS = $(SRCS:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
|
OBJS = $(SRCS:src/%.c=$(OBJ_DIR)/%.o)
|
||||||
DEPS = $(OBJS:.o=.d)
|
DEPS = $(OBJS:.o=.d)
|
||||||
|
|
||||||
# Build Rules
|
# Build Rules
|
||||||
|
|
@ -96,7 +102,7 @@ $(NAME): $(OBJS) $(LIBICMP_DEP)
|
||||||
@echo "[OK] $(NAME) built successfully"
|
@echo "[OK] $(NAME) built successfully"
|
||||||
|
|
||||||
# Compile object files
|
# Compile object files
|
||||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
|
$(OBJ_DIR)/%.o: src/%.c
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -c $< -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -c $< -o $@
|
||||||
|
|
||||||
|
|
@ -122,7 +128,7 @@ endif
|
||||||
@echo "[OK] All tests passed"
|
@echo "[OK] All tests passed"
|
||||||
|
|
||||||
|
|
||||||
$(TEST_BIN): $(VERSION_HEADER) $(TESTS) $(filter-out $(OBJ_DIR)/main.o,$(OBJS)) $(LIBICMP_DEP)
|
$(TEST_BIN): $(VERSION_HEADER) $(TESTS) $(filter-out $(OBJ_DIR)/ping/main.o,$(OBJS)) $(LIBICMP_DEP)
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@echo "[BUILD] Building test binary..."
|
@echo "[BUILD] Building test binary..."
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(filter-out $(VERSION_HEADER),$^) $(LDFLAGS) $(TEST_LDFLAGS) -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(filter-out $(VERSION_HEADER),$^) $(LDFLAGS) $(TEST_LDFLAGS) -o $@
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CLI_INTERNAL_ARG_HANDLER
|
#ifndef CLI_INTERNAL_ARG_HANDLER
|
||||||
#define CLI_INTERNAL_ARG_HANDLER
|
#define CLI_INTERNAL_ARG_HANDLER
|
||||||
|
|
||||||
#include "ft_ping.h"
|
#include "ping/ft_ping.h"
|
||||||
|
|
||||||
typedef int (*t_option_handler)(const char *arg, t_ping_config *config);
|
typedef int (*t_option_handler)(const char *arg, t_ping_config *config);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CLI_INTERNAL_MESSAGES
|
#ifndef CLI_INTERNAL_MESSAGES
|
||||||
#define CLI_INTERNAL_MESSAGES
|
#define CLI_INTERNAL_MESSAGES
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
|
|
||||||
void print_help(void);
|
void print_help(void);
|
||||||
void print_version(void);
|
void print_version(void);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include "ft_ping.h"
|
#include "ping/ft_ping.h"
|
||||||
|
|
||||||
int cli_parse_uint64(const char *s, uint64_t *out);
|
int cli_parse_uint64(const char *s, uint64_t *out);
|
||||||
int cli_parse_float(const char *s, float *out);
|
int cli_parse_float(const char *s, float *out);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include "icmp.h"
|
#include "icmp.h"
|
||||||
#include "ft_ping.h"
|
#include "ping/ft_ping.h"
|
||||||
#include "internal/ping/ping_state.h"
|
#include "internal/ping/ping_state.h"
|
||||||
|
|
||||||
void ping_output_start(const t_ping_config *config,
|
void ping_output_start(const t_ping_config *config,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "icmp.h"
|
#include "icmp.h"
|
||||||
#include "ft_ping.h"
|
#include "ping/ft_ping.h"
|
||||||
#include "internal/ping/stats.h"
|
#include "internal/ping/stats.h"
|
||||||
#include "internal/ping/tracker.h"
|
#include "internal/ping/tracker.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PING_CLI_H
|
#ifndef PING_CLI_H
|
||||||
#define PING_CLI_H
|
#define PING_CLI_H
|
||||||
|
|
||||||
#include "ft_ping.h"
|
#include "ping/ft_ping.h"
|
||||||
|
|
||||||
enum e_cli_code {
|
enum e_cli_code {
|
||||||
CLI_EXIT_SUCCESS = -1,
|
CLI_EXIT_SUCCESS = -1,
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PING_H
|
#ifndef PING_H
|
||||||
#define PING_H
|
#define PING_H
|
||||||
|
|
||||||
#include "ft_ping.h"
|
#include "ping/ft_ping.h"
|
||||||
|
|
||||||
int ping_run(const t_ping_config *config);
|
int ping_run(const t_ping_config *config);
|
||||||
|
|
||||||
58
sources.mk
58
sources.mk
|
|
@ -1,58 +0,0 @@
|
||||||
|
|
||||||
SRC_DIR = src
|
|
||||||
SRCS = $(SRC_DIR)/main.c \
|
|
||||||
$(SRC_DIR)/cli/parse.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_count.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_deadline.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_flood.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_help.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_interval.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_quiet.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/option_map.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_size.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_timeout.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_ttl.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_version.c \
|
|
||||||
$(SRC_DIR)/cli/handlers/handle_verbose.c \
|
|
||||||
$(SRC_DIR)/cli/parse_utils/parse_int.c \
|
|
||||||
$(SRC_DIR)/cli/parse_utils/parse_float.c \
|
|
||||||
$(SRC_DIR)/cli/parse_utils/parse_inet_addr.c \
|
|
||||||
$(SRC_DIR)/cli/parse_utils/parse_destinations.c \
|
|
||||||
$(SRC_DIR)/cli/parse_utils/get_optstr.c \
|
|
||||||
$(SRC_DIR)/cli/config_free.c \
|
|
||||||
$(SRC_DIR)/cli/messages/help.c \
|
|
||||||
$(SRC_DIR)/cli/messages/version.c \
|
|
||||||
$(SRC_DIR)/cli/messages/error.c \
|
|
||||||
$(SRC_DIR)/core/ping.c \
|
|
||||||
$(SRC_DIR)/core/loop.c \
|
|
||||||
$(SRC_DIR)/core/send.c \
|
|
||||||
$(SRC_DIR)/core/callback.c \
|
|
||||||
$(SRC_DIR)/stats/stats.c \
|
|
||||||
$(SRC_DIR)/tracker/init.c \
|
|
||||||
$(SRC_DIR)/tracker/record_send.c \
|
|
||||||
$(SRC_DIR)/tracker/record_recv.c \
|
|
||||||
$(SRC_DIR)/output/start.c \
|
|
||||||
$(SRC_DIR)/output/packet.c \
|
|
||||||
$(SRC_DIR)/output/error.c \
|
|
||||||
$(SRC_DIR)/output/summary.c \
|
|
||||||
$(SRC_DIR)/output/flood.c \
|
|
||||||
$(SRC_DIR)/scheduler/scheduler.c \
|
|
||||||
|
|
||||||
TESTS_DIR = tests
|
|
||||||
TESTS = $(TESTS_DIR)/test_main.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_count.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_flood.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_help.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_interval.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_quiet.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handler_map.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_size.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_timeout.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_ttl.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_version.c \
|
|
||||||
$(TESTS_DIR)/cli/handlers/test_handle_verbose.c \
|
|
||||||
$(TESTS_DIR)/cli/parse_utils/test_parse_int.c \
|
|
||||||
$(TESTS_DIR)/cli/parse_utils/test_parse_float.c \
|
|
||||||
$(TESTS_DIR)/ping/stats/test_stats.c \
|
|
||||||
$(TESTS_DIR)/ping/tracker/test_tracker.c \
|
|
||||||
|
|
||||||
58
sources/ping.mk
Normal file
58
sources/ping.mk
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
|
||||||
|
PING_SRC_DIR = src/ping
|
||||||
|
PING_SRCS = $(PING_SRC_DIR)/main.c \
|
||||||
|
$(PING_SRC_DIR)/cli/parse.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_count.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_deadline.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_flood.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_help.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_interval.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_quiet.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/option_map.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_size.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_timeout.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_ttl.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_version.c \
|
||||||
|
$(PING_SRC_DIR)/cli/handlers/handle_verbose.c \
|
||||||
|
$(PING_SRC_DIR)/cli/parse_utils/parse_int.c \
|
||||||
|
$(PING_SRC_DIR)/cli/parse_utils/parse_float.c \
|
||||||
|
$(PING_SRC_DIR)/cli/parse_utils/parse_inet_addr.c \
|
||||||
|
$(PING_SRC_DIR)/cli/parse_utils/parse_destinations.c \
|
||||||
|
$(PING_SRC_DIR)/cli/parse_utils/get_optstr.c \
|
||||||
|
$(PING_SRC_DIR)/cli/config_free.c \
|
||||||
|
$(PING_SRC_DIR)/cli/messages/help.c \
|
||||||
|
$(PING_SRC_DIR)/cli/messages/version.c \
|
||||||
|
$(PING_SRC_DIR)/cli/messages/error.c \
|
||||||
|
$(PING_SRC_DIR)/core/ping.c \
|
||||||
|
$(PING_SRC_DIR)/core/loop.c \
|
||||||
|
$(PING_SRC_DIR)/core/send.c \
|
||||||
|
$(PING_SRC_DIR)/core/callback.c \
|
||||||
|
$(PING_SRC_DIR)/stats/stats.c \
|
||||||
|
$(PING_SRC_DIR)/tracker/init.c \
|
||||||
|
$(PING_SRC_DIR)/tracker/record_send.c \
|
||||||
|
$(PING_SRC_DIR)/tracker/record_recv.c \
|
||||||
|
$(PING_SRC_DIR)/output/start.c \
|
||||||
|
$(PING_SRC_DIR)/output/packet.c \
|
||||||
|
$(PING_SRC_DIR)/output/error.c \
|
||||||
|
$(PING_SRC_DIR)/output/summary.c \
|
||||||
|
$(PING_SRC_DIR)/output/flood.c \
|
||||||
|
$(PING_SRC_DIR)/scheduler/scheduler.c \
|
||||||
|
|
||||||
|
PING_TESTS_DIR = tests
|
||||||
|
PING_TESTS = $(PING_TESTS_DIR)/test_main.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_count.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_flood.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_help.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_interval.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_quiet.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handler_map.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_size.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_timeout.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_ttl.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_version.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/handlers/test_handle_verbose.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/parse_utils/test_parse_int.c \
|
||||||
|
$(PING_TESTS_DIR)/cli/parse_utils/test_parse_float.c \
|
||||||
|
$(PING_TESTS_DIR)/ping/stats/test_stats.c \
|
||||||
|
$(PING_TESTS_DIR)/ping/tracker/test_tracker.c \
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
cli_config_free(t_ping_config *config)
|
cli_config_free(t_ping_config *config)
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "internal/cli/parse_utils.h"
|
#include "internal/cli/parse_utils.h"
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "internal/cli/parse_utils.h"
|
#include "internal/cli/parse_utils.h"
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
cli_handle_flood(const char *arg, t_ping_config *config)
|
cli_handle_flood(const char *arg, t_ping_config *config)
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "internal/cli/messages.h"
|
#include "internal/cli/messages.h"
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "internal/cli/parse_utils.h"
|
#include "internal/cli/parse_utils.h"
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
cli_handle_quiet(const char *arg, t_ping_config *config)
|
cli_handle_quiet(const char *arg, t_ping_config *config)
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "internal/cli/parse_utils.h"
|
#include "internal/cli/parse_utils.h"
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "internal/cli/parse_utils.h"
|
#include "internal/cli/parse_utils.h"
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "internal/cli/parse_utils.h"
|
#include "internal/cli/parse_utils.h"
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "ft_ping.h"
|
#include "ping/ft_ping.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
cli_handle_verbose(const char *arg, t_ping_config *config)
|
cli_handle_verbose(const char *arg, t_ping_config *config)
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "internal/cli/messages.h"
|
#include "internal/cli/messages.h"
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "version_gen.h"
|
#include "version_gen.h"
|
||||||
|
|
||||||
#define CMD_NAME g_prog_name.name
|
#define CMD_NAME g_prog_name.name
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "ft_ping_const.h"
|
#include "ping/ft_ping_const.h"
|
||||||
#include "internal/cli/messages.h"
|
#include "internal/cli/messages.h"
|
||||||
#include "internal/cli/options.h"
|
#include "internal/cli/options.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/messages.h"
|
#include "internal/cli/messages.h"
|
||||||
#include "internal/cli/parse_utils.h"
|
#include "internal/cli/parse_utils.h"
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include "icmp.h"
|
#include "icmp.h"
|
||||||
#include "icmp_types.h"
|
#include "icmp_types.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "internal/ping/callback.h"
|
#include "internal/ping/callback.h"
|
||||||
#include "internal/ping/ping_state.h"
|
#include "internal/ping/ping_state.h"
|
||||||
#include "internal/ping/stats.h"
|
#include "internal/ping/stats.h"
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
|
|
||||||
#include "icmp.h"
|
#include "icmp.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "internal/ping/loop.h"
|
#include "internal/ping/loop.h"
|
||||||
#include "internal/ping/send.h"
|
#include "internal/ping/send.h"
|
||||||
#include "internal/ping/callback.h"
|
#include "internal/ping/callback.h"
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "ping.h"
|
#include "ping/ping.h"
|
||||||
#include "icmp.h"
|
#include "icmp.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "internal/ping/ping_state.h"
|
#include "internal/ping/ping_state.h"
|
||||||
#include "internal/ping/stats.h"
|
#include "internal/ping/stats.h"
|
||||||
#include "internal/ping/tracker.h"
|
#include "internal/ping/tracker.h"
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "icmp.h"
|
#include "icmp.h"
|
||||||
#include "ft_ping_const.h"
|
#include "ping/ft_ping_const.h"
|
||||||
#include "internal/ping/send.h"
|
#include "internal/ping/send.h"
|
||||||
#include "internal/ping/tracker.h"
|
#include "internal/ping/tracker.h"
|
||||||
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "ping.h"
|
#include "ping/ping.h"
|
||||||
#include "version_gen.h"
|
#include "version_gen.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "internal/ping/output.h"
|
#include "internal/ping/output.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "internal/ping/output.h"
|
#include "internal/ping/output.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "internal/ping/scheduler.h"
|
#include "internal/ping/scheduler.h"
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
|
|
||||||
/* Test 1: basic test */
|
/* Test 1: basic test */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
|
|
||||||
/* Test 1: test flag*/
|
/* Test 1: test flag*/
|
||||||
Test(handle_flood, flag_test)
|
Test(handle_flood, flag_test)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
|
|
||||||
/* Test 1: exit code test */
|
/* Test 1: exit code test */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
|
|
||||||
/* Test 1: basic test */
|
/* Test 1: basic test */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
|
|
||||||
/* Test 1: basic test */
|
/* Test 1: basic test */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
|
|
||||||
/* Test 1: basic test */
|
/* Test 1: basic test */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
|
|
||||||
/* Test 1: basic test */
|
/* Test 1: basic test */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "ft_ping_flags.h"
|
#include "ping/ft_ping_flags.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <criterion/criterion.h>
|
#include <criterion/criterion.h>
|
||||||
#include "cli.h"
|
#include "ping/cli.h"
|
||||||
#include "internal/cli/arg_handler.h"
|
#include "internal/cli/arg_handler.h"
|
||||||
|
|
||||||
/* Test 1: exit code test */
|
/* Test 1: exit code test */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue