net-tools/includes/compiler.h
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

11 lines
247 B
C

#ifndef COMPILER_H
#define COMPILER_H
#define __unused __attribute__((unused))
#define COUNT_OF(arr) (sizeof(arr) / sizeof((arr)[0]))
#define STATIC_ARRAY_FOREACH(arr, ptr) \
for ((ptr) = (arr); (ptr) < (arr) + COUNT_OF(arr); (ptr)++)
#endif