Commit graph

11 commits

Author SHA1 Message Date
lohhiiccc
1a4a007dbb style: indent and include order 2026-03-19 02:43:46 +01:00
lohhiiccc
ad7698d530 feat: add icmp_set_dont_fragment and next_mtu extraction
- Add icmp_set_dont_fragment() using IP_MTU_DISCOVER/IP_PMTUDISC_DO
- Add next_mtu field to icmp_offending_packet_t, populated from the
  outer ICMP header on type=3/code=4 (frag needed) replies
- Fix extract_offending: read MTU from outer ICMP, not embedded packet
- Update test to match corrected extraction semantics
- Clean up checksum odd-byte handling with a static zero sentinel
2026-03-13 03:21:35 +01:00
lohhiiccc
85543f3d19 fix(makefile)!: improve flags and type casts for stricter build and correctness
- Update Makefile:
  - Change test binary name to `libicmp.test`.
  - Add `-Wpedantic` and `-Wconversion` to global CFLAGS for stricter
    warnings.
  - Add dedicated `TEST_CFLAGS`.
  - Ensure test build uses `TEST_CFLAGS`.
- Refactor code for better correctness.

BREAKING CHANGE: Test binary is now named `libicmp.test` instead of
`test.out` and stricter compiler flags may trigger new warnings or
errors in code outside this patch.
2026-02-07 20:16:06 +01:00
lohhiiccc
97a9f24fc3 feat: extract_offending function 2026-02-07 11:15:42 +01:00
lohhiiccc
6cda2e8db5 refactor: standardize code style and improve clarity 2026-02-05 22:26:49 +01:00
lohhiiccc
ace00ea0f2 feat: rework icmp_parse_ip_header
Extend icmp_parse_ip_header to allow optional extraction of destination
IP address and protocol from the IP header
2026-02-05 22:26:49 +01:00
lohhiiccc
84490efc8e feat: add helpers to extract id and sequence from replies 2026-01-30 23:49:31 +01:00
lohhiiccc
06305696da refactor: remove unnecessary wrapper functions and redundant checks 2026-01-27 21:34:41 +01:00
lohhiiccc
e57d43de33 feat: add max_packets parameter to make icmp_process non-blocking 2026-01-27 21:30:49 +01:00
lohhiiccc
3c56ea024b feat: implement ICMP send/receive modules 2026-01-26 20:12:42 +01:00
lohhiiccc
9bd55cf24a Initial commit - libcimp 2026-01-24 16:04:09 +01:00