Created attachment 243343 [details] Update pfi_kif Attached is a patch for 13-STABLE (14- appears slightly different).
Thanks for the report! I suspect the man page references the OpenBSD version of that struct. The difference between 13 and 14 is a minor cleanup in the definition, but the actual layout is identical. I'm going to use the 14 version, because it's slightly cleaner. Also, from this and your other report (272459) I'm going to assume you're trying to interact with pf through its ioctl interface. Are you aware of libpfctl (lib/libpfctl in the source tree)? I've been making somewhat regular changes to the API to clean it up and to add features, and your life is going to be a lot easier if you use that library, because using that will take care of (most of) the changes for you.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=64b30b7aeb6d0dc48d038b3df033328c8d8c3141 commit 64b30b7aeb6d0dc48d038b3df033328c8d8c3141 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-07-12 09:43:43 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-07-12 09:43:43 +0000 pf: fix pfi_kif definition in the man page PR: 272455 Submitted by: alex@inferiorhumanorgans.com MFC after: 1 week share/man/man4/pf.4 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
Ah thanks, I've not seen libpfctl. I'm working in not-C so it's about as much work (perhaps less since memory management is simplified) to shim the ioctl as it is the library. I suppose that largely ignores the changes coming down the pike in -CURRENT but given that the project (interactive pf shell) is just a bit of a distraction from a distraction from an attempt at shaking off some coding cobwebs I'm not so concerned with future compatibility. Insofar as poking at the ioctl interface directly goes the biggest ergonomic issue that I've run into is that some things can be easily molded into an iterator pattern, and some things (e.g. DIOCIGETIFACES) can't.
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=73a079021a6921ac3ff8ea4b2baca5ddb13de645 commit 73a079021a6921ac3ff8ea4b2baca5ddb13de645 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-07-12 09:43:43 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-07-19 07:26:59 +0000 pf: fix pfi_kif definition in the man page PR: 272455 Submitted by: alex@inferiorhumanorgans.com MFC after: 1 week (cherry picked from commit 64b30b7aeb6d0dc48d038b3df033328c8d8c3141) share/man/man4/pf.4 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e14a1e0029916cc99787ad93fe22dfe304c9d56a commit e14a1e0029916cc99787ad93fe22dfe304c9d56a Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-07-12 09:43:43 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-07-19 07:26:55 +0000 pf: fix pfi_kif definition in the man page PR: 272455 Submitted by: alex@inferiorhumanorgans.com MFC after: 1 week (cherry picked from commit 64b30b7aeb6d0dc48d038b3df033328c8d8c3141) share/man/man4/pf.4 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)