https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291165
Bug ID: 291165
Summary: KHELP example h_example.c does not compile on FreeBSD
14.x (incomplete TCP KHELP API)
Product: Base System
Version: 14.3-RELEASE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Created attachment 265586
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=265586&action=edit
Compiler ouy at console in txt format
The example KHELP module located at:
/usr/share/examples/kld/khelp/h_example.c
does not compile on FreeBSD 14.3-RELEASE.
The build fails with:
/usr/src/sys/netinet/tcp_var.h:305:15: error: field has incomplete type
'struct inpcb'
This happens because struct inpcb is only forward-declared in 14.x, and the TCP
KHELP interfaces used by the example module are no longer publicly exported to
KLD modules.
This makes the example impossible to compile on any 14.x system.
Additionally, including <netinet/in_pcb.h> or <netinet6/in6.h> does not solve
the issue, as kernel headers explicitly reject direct inclusion in KLD modules.
Steps to reproduce:
cd /usr/share/examples/kld/khelp
make
Actual result:
Compilation fails with incomplete type errors for:
struct inpcb
struct tcp_hhook_data
Expected result:
Either:
1. The example should compile successfully
OR
2. The example should be removed or replaced with a working KHELP example
for FreeBSD 14.x
Notes:
It appears that the TCP KHELP hook API used in this example was partially
removed or made private around FreeBSD 13.3 → 14.0 transition, but the example
was left behind unchanged.
This is misleading for developers writing KLD modules.
“Please confirm whether TCP KHELP hooks are still supported in FreeBSD 14.x.
If not, the example should be removed, as it misleads developers trying to use
the framework.”
--
You are receiving this mail because:
You are the assignee for the bug.