aboutsummaryrefslogtreecommitdiff
path: root/lib/libsysdecode
Commit message (Collapse)AuthorAgeFilesLines
* libsysdecode: also verify command decodersKristof Provost14 days1-2/+20
| | | | | | | We already verified that the attribute parser tables were correctly sorted. Now also verify that the command decoders are too. While here move the assertions into a constructor so we only run them once.
* libsysdecode: verify decoder tables are sortedIshan Agrawal14 days1-0/+24
| | | | | | | | | Add assertions to validate decoder table ordering required by binary search. Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026) Reviewed by: kp
* libsysdecode: avoid extra commas for undecoded netlink attributesIshan Agrawal14 days1-5/+6
| | | | | | Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026) Reviewed by: kp
* libsysdecode: use decoder table for PF netlink commandsIshan Agrawal14 days1-24/+46
| | | | | | | | | | | Introduce a PF netlink command decoder table mapping PFNL commands to their attribute decoder sets. This replaces the existing switch-based dispatch and makes it easier to add support for additional PF netlink commands. Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026) Reviewed by: kp
* libsysdecode: add attribute parsing for PFNL_CMD_GETRULESIshan Agrawal14 days1-0/+13
| | | | | | Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026) Reviewed by: kp
* libsysdecode : add attribute parsing for PFNL_CMD_GET_LIMITIshan Agrawal14 days1-0/+10
| | | | | | Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026) Reviewed by: kp
* libsysdecode : add attribute parsing for PFNL_CMD_KILLSTATESIshan Agrawal14 days1-3/+79
| | | | | | Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026) Reviewed by: kp
* libsysdecode: fix nlm_flag regex in mktablesMitchell Horne2026-07-281-1/+1
| | | | | | | | | | Some NLM_F_ definitions contain multiple underscores in their name; this should pick them up. Reviewed by: kp, Ishan Agrawal <iagrawal9990@gmail.com> Fixes: 4c932a4d45fb ("netlink: decode netlink message flags symbolically") Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/2340
* kqueue: Add NOTE_REAPDag-Erling Smørgrav2026-07-271-1/+1
| | | | | | | | | | | Add a NOTE_REAP event for EVFILTER_PROC which provides a notification when the process is reaped. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D58313
* libsysdecode: decode combined Netlink message flagsIshan Agrawal2026-07-273-10/+10
| | | | | | | | | | | | Change sysdecode_nlm_flag() to decode Netlink message flags as a bitmask instead of looking up a single flag value. This correctly prints combinations of NLM_F_* flags while preserving any unknown bits in hexadecimal. Reported by: androvonx95 <androvonx95@tutamail.com> Reviewed by: kp Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026)
* libsysdecode: use local sysdecode.hIshan Agrawal2026-07-271-1/+1
| | | | | | | | | | | Replace <sysdecode.h> with "sysdecode.h" so local builds use the in-tree header in lib/libsysdecode instead of a stale installed copy in /usr/include, avoiding build failures after updating sysdecode.h. Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026) Reviewed by: kp Pull-Request: https://github.com/freebsd/freebsd-src/pull/2338
* libsysdecode: add Netlink attribute decoding infrastructureIshan Agrawal2026-07-241-2/+213
| | | | | | | | | | | | Introduce a generic Netlink attribute decoding framework based on attribute decoder tables. The framework supports decoding primitive attribute types as well as nested attributes and can be reused by different Generic Netlink families. Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored-by: Google LLC (GSoC 2026) Reviewed-by: kp Pull-Request: https://github.com/freebsd/freebsd-src/pull/2337
* libsysdecode: Recognize NOTE_PDSIGCHLDDag-Erling Smørgrav2026-07-211-2/+2
| | | | | | | MFC after: 1 week Fixes: 2a5e58c59694 ("procdesc: add NOTE_PDSIGCHLD") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D58388
* Retire dialogDag-Erling Smørgrav2026-07-071-3/+0
| | | | | | | | | | This is the last remaining piece of GPL software in the base system. The installer transitioned to bsddialog four years ago, and the last remaining dialog consumer, dpv, was turned off more than two years ago. Retire dpv, libdpv, libfigpar (used only by dpv), and dialog itself. Reviewed by: dteske Differential Revision: https://reviews.freebsd.org/D55424
* pf: revert netlink commands back to enumGleb Smirnoff2026-07-061-1/+1
| | | | | | | | Revert pf_nl.h part of 017690e50913 and use new libsysdecode build glue that parses enums. Reviewed by: kp, glebius Differential Revision: https://reviews.freebsd.org/D57866
* libsysdecode: Teach mktables to handle enumsDag-Erling Smørgrav2026-07-061-20/+39
| | | | | | | | While here, clean up and simplify the existing code. MFC after: 1 week Reviewed by: glebius, jhb Differential Revision: https://reviews.freebsd.org/D57993
* libsysdecode: decode PF Generic Netlink commandsIshan Agrawal2026-07-051-2/+27
| | | | | | | | | | Decode the Generic Netlink command header for messages belonging to the PF Generic Netlink family. Display the command name using the PF Generic Netlink command decoder. Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Reviewed by: kp Sponsored-by: Google LLC (GSoC 2026)
* libsysdecode: cache Generic Netlink family IDsIshan Agrawal2026-07-051-0/+32
| | | | | | | | | | | Record Generic Netlink family IDs learned from CTRL_CMD_GETFAMILY responses and use them to decode subsequent Generic Netlink messages using symbolic family names instead of numeric IDs. Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Reviewed by: kp Sponsored-by: Google LLC (GSoC 2026)
* libsysdecode: decode Generic Netlink controller messagesIshan Agrawal2026-07-051-10/+60
| | | | | | | | | | | Decode Generic Netlink controller (GENL_ID_CTRL) messages in Netlink payloads. Display the Generic Netlink header along with the CTRL_CMD_GETFAMILY attributes, including the family ID and family name. Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Reviewed by: kp Sponsored-by: Google LLC (GSoC 2026)
* truss: track Netlink socket protocolsIshan Agrawal2026-07-052-2/+3
| | | | | | | | | | | | | Record the Netlink protocol associated with AF_NETLINK sockets when they are created and pass it to libsysdecode during message decoding. Use the protocol to distinguish between Generic Netlink and Route Netlink sockets, ensuring that Generic Netlink decoding is only performed for NETLINK_GENERIC sockets. Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Reviewed by: kp Sponsored-by : Google LLC (GSoC 2026)
* libsysdecode: Fix shutdownhow tableDag-Erling Smørgrav2026-07-011-1/+1
| | | | | | | MFC after: 1 week Fixes: c3276e02beab ("sockets: make shutdown(2) how argument a enum") Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D57915
* Revert "Retire dialog"Dag-Erling Smørgrav2026-06-291-0/+3
| | | | This reverts commit 5b2bdadeb6c25c10dac9722fd66a668e14d3b384.
* Retire dialogDag-Erling Smørgrav2026-06-291-3/+0
| | | | | | | | | This is the last remaining piece of GPL software in the base system. The installer transitioned to bsddialog four years ago, and the last remaining dialog consumer, dpv, was turned off more than two years ago. Retire dpv, libdpv, libfigpar (used only by dpv), and dialog itself. (cherry picked from commit 73bb4a92985d747462d866248c1e7623f7ff1a7f)
* netlink: decode netlink message flags symbolicallyIshan Agrawal2026-06-244-3/+16
| | | | | | | | | | | | | | | 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
* netpfil: add PF netlink command decoding supportIshan Agrawal2026-06-033-0/+10
| | | | | | | | | | | | | Convert PFNL_CMD values in pf_nl.h from an enum to #define constants, add a pfnl_cmd table definition for mktable, and implement the corresponding command decoding helpers in libsysdecode. This allows mktable to generate PF netlink command lookup tables and enables symbolic decoding of PF netlink commands. Reviewed by: kp Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Sponsored by: Google LLC (GSoC 2026)
* truss: add support for decoding Netlink messagesIshan Agrawal2026-04-033-1/+96
| | | | | | | | | | | | | | | Netlink usage is growing in FreeBSD. This patch adds support to `truss(1)` to decode Netlink headers in sendmsg/recvmsg calls, making debugging network configuration tools significantly easier. Changes: libsysdecode: Add `sysdecode_netlink()` to parse struct `nlmsghdr`. truss: Detect `AF_NETLINK` sockets and decode the message payload. Reviewed by: kp Signed-off-by: Ishan Agrawal <iagrawal9990@gmail.com> Github PR: https://github.com/freebsd/freebsd-src/pull/1950
* Remove additional libtpool and libuutil-related filesEnji Cooper2026-02-041-1/+0
| | | | | | | | This change removes additional library files and tests orphaned in the commit referenced below. MFC with: 8b78d412a Fixes: 8b78d412a ("zfs: world changes after 89f729dcc merge")
* rtld: silence clang's unterminated-string-initialization warningAlex Richardson2025-12-161-1/+2
| | | | | | | | | | Since the initializer is used in other places where we can't just replace it with a char-by-char initializer, this adds a macro for the nonstring attribute (match the linuxkpi definition). Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52535
* libsysdecode: Use consistent include pathDag-Erling Smørgrav2025-12-071-1/+1
| | | | | | | | | | | mkioctls should look at the same set of headers as mktables does. MFC after: 1 week Fixes: 139d114acc7b ("libsysdecode use MKTABLES_INCLUDEDIR") Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D54106
* blocklist: Rename blacklist to blocklistJose Luis Duran2025-10-121-1/+1
| | | | | | | | | | | | | | | | | | Follow up upstream rename from blacklist to blocklist. - Old names and rc scripts are still valid, but emitting an ugly warning - Old firewall rules and anchor names should work, but emitting an ugly warning - Old MK_BLACKLIST* knobs are wired to the new ones Although care has been taken not to break current configurations, this is a large patch containing mostly duplicated code. If issues arise, it will be swiftly reverted. Reviewed by: ivy (pkgbase) Approved by: emaste (mentor) MFC after: 2 days Relnotes: yes
* sysdecode_syscallnames.3: s/names/name/Felix Johnson2025-08-264-6/+6
| | | | | | | | | The sysdecode_syscallname function was accidentally documented as being plural. Move it to reflect it's actual name, and adjust all references. PR: 278383 Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D51002
* libsysdecode: Add O_CLOFORK flags to sysdecodeRicardo Branco2025-07-062-7/+9
| | | | | | Reviewed by: kib MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1698
* libsysdecode: Add support for decoding inotify syscall flagsMark Johnston2025-07-044-1/+11
| | | | | MFC after: 3 months Sponsored by: Klara, Inc.
* libsysdecode: correct regexp for thr_new flagsKonstantin Belousov2025-06-041-1/+1
| | | | | | | Two flags include underscore after the "THR_" prefix. Sponsored by: The FreeBSD Foundation MFC after: 1 week
* manuals: Fix "unusual .Xr" warnings with a scriptGraham Percival2024-10-151-1/+1
| | | | | | | | | | | | | These were reported by `mandoc -T lint ...` as warnings: - unusual Xr order - unusual Xr punctuation Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts Signed-off-by: Graham Percival <gperciva@tarsnap.com> Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com> Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1464
* Remove a ktrace.out which snuck into an earlier commitMark Johnston2024-09-101-0/+0
| | | | Fixes: b76961e3a21a ("kdump: Print splice structures")
* kdump: Print splice structuresMark Johnston2024-09-101-0/+0
| | | | | | MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* libsysdecode: support rfork(RFSPAWN)Brooks Davis2024-06-191-1/+1
| | | | | | | | | Match the "U" in RFSPAWN's value (1U<<31) (and "u" for completeness). Reject kernel-only RFPPWAIT to avoid a duplicate entry. Reviewed by: imp, markj Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D45597
* libsysdecode use MKTABLES_INCLUDEDIRSimon J. Gerraty2024-03-211-1/+6
| | | | | | | | | | | We do not conflate SYSROOT with STAGE_ROOT/DESTDIR during DIRDEPS_BUILD Make sure mktables looks in the right place. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44415
* libsysdecode: fix build after 3d0a736796a9Kyle Evans2024-03-211-1/+1
| | | | | | | TCP_USE_DDP is a kernel-only macro, so we must exclude it in libsysdecode to avoid breaking the build. Fixes: 3d0a736796a9 ("tcp: Add a new kernel-only TCP_USE_DDP [...]")
* libsysdecode: add a decoder for pollfd eventsKyle Evans2024-03-055-1/+22
| | | | | | | | We'll use this in another change to read pollfd arrays coming from a successful poll(2) operation. Reviewed by: bapt, jhb Differential Revision: https://reviews.freebsd.org/D44159
* lib: Automated cleanup of cdefs and other formattingWarner Losh2023-11-275-5/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-1616-32/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-165-5/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-167-14/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* vm: Allow MAP_32BIT for all architecturesDmitry Chagin2023-08-142-10/+1
| | | | | Reviewed by: alc, kib, markj Differential revision: https://reviews.freebsd.org/D41435
* libsysdecode: Migrate from COMPAT_32BIT to generic COMPAT_LIBCOMPATJessica Clarke2023-07-091-1/+2
| | | | | | | | | | | | | | | | The use isn't any more generic, just the variable itself, which will allow COMPAT_32BIT to be removed. The fact we even have to check COMPAT_LIBCOMPAT here in order to pass the right flags to CPP points at our libcompat infrastructure not suitably modifying the CPP variable (which we barely use for world; this and bsd.symver.mk are the two uses, and the latter could benefit from the right flags too), but this change doesn't attempt to fix that. See commit 8fad2cda93c7 ("bsd.compat.mk: Provide new CPP and sub-make variables") for the context behind this change. Reviewed by: emaste, imp, brooks, jhb Differential Revision: https://reviews.freebsd.org/D40930
* libsysdecode: Drop dead __amd64__ && COMPAT_32BIT codeJessica Clarke2023-07-091-4/+0
| | | | | | | | Under COMPAT_32BIT we are compiling 32-bit code and so __amd64__ is not defined, __i386__ is, and we use the real i386 headers. Reviewed by: brooks, jhb, imp Differential Revision: https://reviews.freebsd.org/D40916