diff options
| author | Ishan Agrawal <iagrawal9990@gmail.com> | 2026-06-24 04:08:07 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2026-06-24 12:15:20 +0000 |
| commit | 4c932a4d45fb3130ffa80176f5ff9dcacabd49f1 (patch) | |
| tree | 9465234988b821d7f5b109987c8a878bdbda9efd /lib/libsysdecode/sysdecode.h | |
| parent | 34397aec163cacf179991fc3606273093be6df2e (diff) | |
netlink: decode netlink message flags symbolically
Generate an nlm_flag table definition for mktable from
netlink/netlink.h, add a sysdecode_nlm_flag() helper to
libsysdecode, and use it when decoding netlink message headers.
This enables mktable to generate netlink message flag lookup tables and
replaces raw hexadecimal output for recognized NLM_F_* flag values
with their symbolic names.
Reviewed by: kp
Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com>
Sponsored by: Google LLC (GSoC 2026)
Pull Request: https://github.com/freebsd/freebsd-src/pull/2294
Diffstat (limited to 'lib/libsysdecode/sysdecode.h')
| -rw-r--r-- | lib/libsysdecode/sysdecode.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index 4675b1e3c463..3675a582a9b8 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -66,7 +66,8 @@ const char *sysdecode_ipproto(int _protocol); void sysdecode_kevent_fflags(FILE *_fp, short _filter, int _fflags, int _base); const char *sysdecode_itimer(int _which); -const char *sysdecode_pfnl_cmd(int cmd); +const char *sysdecode_pfnl_cmd(int _cmd); +const char *sysdecode_nlm_flag(int _flag); const char *sysdecode_kevent_filter(int _filter); bool sysdecode_kevent_flags(FILE *_fp, int _flags, int *_rem); const char *sysdecode_kldsym_cmd(int _cmd); |
