Commit graph

60 commits

Author SHA1 Message Date
lohhiiccc
381f3bd159 feat: --tos param 2026-04-23 13:53:52 +02:00
lohhiiccc
7a76ff8d2a fix: rename timeout/deadline to linger/timeout 2026-04-23 13:14:33 +02:00
lohhiiccc
4b4750cb59 feat: --preload option 2026-04-23 12:59:08 +02:00
lohhiiccc
ce8883d6cd feat: --patern 2026-04-23 12:27:12 +02:00
lohhiiccc
d884a97c02 build: extract libping_core as noinst library 2026-04-22 23:22:32 +02:00
lohhiiccc
50b3a1a86b feat: implement try again on EAGAIN 2026-04-22 22:21:39 +02:00
lohhiiccc
d521db90f8 fix: avoid ttl of 0 2026-04-20 13:23:45 +02:00
lohhiiccc
fc9ddc404f fix: prog name behavior 2026-04-20 13:23:45 +02:00
lohhiiccc
2718ca6d94 fix: ‘inline’ is not at beginning of declaration 2026-04-19 12:48:51 +02:00
lohhiiccc
ab1009a2cb refactor: replace src/cli with libcli 2026-03-29 15:33:45 +02:00
lohhiiccc
526b452827 build!: replace custom build system with Autotools
BREAKING CHANGE: build now requires ./autogen.sh before ./configure.
2026-03-29 15:33:45 +02:00
lohhiiccc
d27ed4a839 fix: propagate setitimer and sigaction failures 2026-03-23 23:41:25 +01:00
lohhiiccc
de8d7e749b fix: check icmp_send_echo return and fix tracker ordering 2026-03-23 23:03:49 +01:00
lohhiiccc
2ab904f106 fix: handle select() errors in try_recv 2026-03-23 23:03:15 +01:00
lohhiiccc
3136b10395 refactor: do_send 2026-03-23 10:42:12 -05:00
lohhiiccc
f9b84f709c fix: error message 2026-03-23 10:42:12 -05:00
lohhiiccc
297d38bff1 style: format code (80 col) 2026-03-23 09:21:37 -05:00
lohhiiccc
aec4d1991a fix: summary messages 2026-03-21 16:21:20 +01:00
Loic Rio
78a210fad9 fix: destination 2026-03-21 15:25:20 +01:00
lohhiiccc
111c3cf71c fix: print hostname in summary 2026-03-19 02:24:56 +01:00
lohhiiccc
18432a527c fix: edge case on multiple host 2026-03-19 01:46:45 +01:00
lohhiiccc
896aa30726 refactor: simplify tracker 2026-03-18 21:08:01 +01:00
lohhiiccc
07588298cd refactor(error): improve output error code 2026-03-18 16:57:54 +01:00
lohhiiccc
dd6bafe132 feat(send): abcd.. payload 2026-03-18 16:57:18 +01:00
lohhiiccc
2d77cca584 refactor(scheduler): split scheduler into 3 files 2026-03-17 09:37:39 -05:00
lohhiiccc
743caab482 style(includes): remove useless includes 2026-03-16 11:49:10 -05:00
lohhiiccc
cde8ada0a3 feat(core): add domaine name in start message 2026-03-16 11:27:58 -05:00
lohhiiccc
25116a7787 fix(cli): exit code 2026-03-16 11:24:16 -05:00
lohhiiccc
d4dfc554f0 refactor(cli): merge ft_ping.h and ping.h and rename CLI related enums 2026-03-16 09:39:05 -05:00
lohhiiccc
e7f4caf342 refactor: simplify FLAGS condition 2026-03-16 09:39:05 -05:00
lohhiiccc
79bc8b7424 refacor(stats): split stat module into more files 2026-03-16 08:23:26 -05:00
lohhiiccc
770265ee80 feat: add -M (dont-fragment) option
- Add FLAG_DONT_FRAGMENT flag and cli_handle_dont_fragment handler
- Register -M/--dont-fragment option in the X-macro option table
- Apply DF bit via icmp_set_dont_fragment() before ping loop
- Expand error output: table-driven ICMP error messages and dedicated
  frag-needed output with next-hop MTU
- Add STATIC_ARRAY_FOREACH / COUNT_OF macros to compiler.h
2026-03-13 03:22:14 +01:00
lohhiiccc
5a8671bdde style: fix struct/variable alignment and wrap indentation 2026-03-13 01:02:28 +01:00
lohhiiccc
07cd155f3a refactor: remove typedefs, use struct/enum directly, fix 80-col violations 2026-03-12 19:17:49 +01:00
lohhiiccc
9836774466 style: add __unused attribute macro 2026-03-12 18:46:12 +01:00
lohhiiccc
0dc1e09205 refactor: complete multi-binary CLI reorganization 2026-03-12 18:45:54 +01:00
lohhiiccc
ab90dbb07f refactor: reorganize src/ and includes/ for multi-binary support 2026-03-12 16:45:11 +01:00
lohhiiccc
3c7ce5b9fb build: move -lm flag from Makefile to configure 2026-03-12 16:39:26 +01:00
lohhiiccc
3f666ff011 refactor: move internal ping headers to internal/ping/ 2026-03-12 16:36:47 +01:00
lohhiiccc
04e1f3f15b feat: implement ping core 2026-03-12 16:12:18 +01:00
lohhiiccc
a4ed2780f2 feat(cli): add -w/deadline option 2026-03-12 16:11:26 +01:00
lohhiiccc
cba820ae7a feat: add support for multiple destination 2026-03-07 16:20:58 +01:00
lohhiiccc
f59f984a0e refactor(cli): simplfy handle_one_option and coding style improvement
- Fix indentation
- Fix import order
- Simplify handle_one_option
- Fix line too long
2026-03-06 11:09:44 +01:00
lohhiiccc
de872facd3 feat(cli): add error functions and duplicate option tracking for CLI arguments 2026-03-05 19:54:32 +01:00
lohhiiccc
f6ca69f795 feat(cli): refactor CLI move utilities, and improve build/version metadata
- Move CLI internal headers to `includes/internal/cli/`
- Split CLI handler and parsing declarations across dedicated internal headers
- Move handler map to `option_map.c` and properly update references
- Relocate CLI utility source and test files from `utils` to `parse_utils`
- Refactor `cli.h` to only expose the public interface, move internal
  typedefs/functions out
- Update build system: add conditional git commit detection
2026-03-04 14:36:30 +01:00
lohhiiccc
18211e441c refactor(cli): replace int return codes with e_cli_code enum for argument parsing
- Introduces the e_cli_code enum for CLI status codes, replacing integer constants.
- Updates cli_parse_arguments to return e_cli_code instead of int.
- Refactors main.c, cli.h, and cli/parse.c to use the new enum.
2026-03-03 15:18:28 +01:00
lohhiiccc
e5093af710 chore: random cleaning stuff 2026-03-03 11:28:16 +01:00
lohhiiccc
f6af6473db test(cli/handlers): add unit tests for CLI handlers
- Add unit tests for handlers
- Update sources.mk to remove test_parse.c from test sources
- Fix in handle_size to set packet_size instead of count
2026-03-03 11:26:58 +01:00
lohhiiccc
88b65cc62e feat(cli): auto-generated options string for getopt_long API 2026-03-03 09:39:18 +01:00
lohhiiccc
2fc8d92e98 refactor(cli): replace runtime size vars with compile-time enum constants
Replace g_options_len and g_opt_str_len extern variables with
CLI_OPT_LEN and CLI_OPT_STR_LEN enum constants computed via X-macros.

Disables Variable Length Arrays (VLA) by enforcing the use of the -Wvla
flag in strict mode.
2026-03-03 09:06:28 +01:00