Page MenuHomeFreeBSD

clnt_broadcast(3): fix eachresult argument type
ClosedPublic

Authored by brooks on Jan 29 2026, 12:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 11, 11:39 AM
Unknown Object (File)
Wed, Mar 11, 12:21 AM
Unknown Object (File)
Mon, Mar 9, 10:33 AM
Unknown Object (File)
Mon, Mar 9, 9:40 AM
Unknown Object (File)
Tue, Feb 17, 1:15 PM
Unknown Object (File)
Tue, Feb 17, 4:32 AM
Unknown Object (File)
Mon, Feb 16, 11:48 PM
Unknown Object (File)
Mon, Feb 16, 7:29 PM
Subscribers

Details

Summary

The eachresult argument is documented to take a function pointer of
type:

bool_t (*)(caddr_t, struct sockaddr_in *)

It was declared to take a resultproc_t which has historically been
declared to be:

bool_t (*resultproc_t)(caddr_t, ...);

This overlapped well enough for currently supported ABIs where variadic
arguments are passed in registers, but this declaration is misaligned
with the documentation (resultproc_t takes three arguments) and will be
fixed in a followup commit.

Fix the type to be non-variadic, matching callbacks, and define a
convenience type of as most callbacks take something other than a char *
as their first argument and need to be cast.

Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Question on naming. I would read "resultproc" as "result process". What does "resultprot" stands for?

Question on naming. I would read "resultproc" as "result process". What does "resultprot" stands for?

Sigh, typo. Will fix.

proc not prot in clnt_broadcast_resultproc_t

ngie added a subscriber: ngie.

This seems to me like a very reasonable change. Thank you!

This revision is now accepted and ready to land.Jan 30 2026, 4:53 PM