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
e6a2b2b2d4
build: add -Wswitch-enum and -Wunreachable-code to strict flags
2026-03-12 18:46:30 +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
35217530e4
build: add -lm flag and update libicmp submodule
2026-03-12 16:12:30 +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
78ca539b99
fix(test): includes
2026-03-05 09:58:16 +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
lohhiiccc
a6cdef89ca
refactor(cli): use X-macro pattern for CLI options definition
...
Extract CLI options into a reusable macro (CLI_OPTIONS_LIST) in cli_opt.h
and refactor handler_map.c to eliminate manual option array duplication.
Calculate g_has_len automatically from option definitions.
2026-03-03 08:27:26 +01:00
lohhiiccc
37a4085cfc
test(cli/utils): implement parse_int and parse_float tests
2026-03-02 18:36:49 +01:00
lohhiiccc
20e3ae3a3d
test: create dummy tests
2026-03-02 18:19:58 +01:00
lohhiiccc
ea14b8394a
chore: update libicmp
2026-03-02 13:22:50 +01:00
lohhiiccc
ec3a3b8721
feat(cli): parse numeric option arguments and validate values
2026-03-02 12:48:28 +01:00
lohhiiccc
7304ec95f3
fix(test): compilation and deps
2026-03-02 10:04:24 +01:00
lohhiiccc
ad4df3a580
build: prevent unnecessary recompilation from version header updates
2026-03-01 16:35:52 +01:00
lohhiiccc
d0444f9431
fix(cli): avoid shadowing global optarg variable
...
Rename parameter 'optarg' to 'arg' in handle_one_option() to fix
-Wshadow warning.
2026-03-01 14:47:56 +01:00
lohhiiccc
44cd05a499
typo: correct 'hanlde' to 'handle'
2026-03-01 14:46:56 +01:00
lohhiiccc
cff77eef9d
refactor(cli): use named constants for return codes and implement flag handlers
2026-03-01 14:40:57 +01:00
lohhiiccc
52338017a6
feat: implement version command handlers
2026-03-01 13:56:23 +01:00
lohhiiccc
257ff100e3
feat: implement help command handlers
2026-03-01 13:56:07 +01:00
lohhiiccc
b786e79287
feat: add version generation and CLI parsing
...
Add auto-generated version header and implement full command-line
argument parsing with getopt_long support.
2026-03-01 13:55:11 +01:00
lohhiiccc
c29336ea81
typo: handle_quit -> handle_quiet
2026-02-09 15:05:03 +01:00
lohhiiccc
69b5766782
refactor: srcs/ -> src
2026-02-09 15:05:03 +01:00
lohhiiccc
d573990df8
feat: add CLI argument parsing structure
2026-02-09 15:05:03 +01:00
lohhiiccc
0ddbb95bad
refactor: improve build configuration and output
...
- Track libicmp sources for proper dependency rebuilds
- Remove verbose build output (CC and LINK messages)
- Fix typo in help message (uninstal -> uninstall)
- Pass compiler flags to libicmp build
- Align configuration summary output
2026-02-08 00:35:28 +01:00
lohhiiccc
741576d01e
chore: ignore clangd cache and compile commands
2026-02-08 00:33:28 +01:00
lohhiiccc
61bc793e9e
Initial commit
2026-02-07 20:54:16 +01:00