HomeFreeBSD

clnt_broadcast(3): fix eachresult argument type

Description

clnt_broadcast(3): fix eachresult argument type

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
Reviewed by: ngie, glebius, jhb
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D54940

Details

Provenance
brooksAuthored on Feb 2 2026, 9:20 PM
Reviewer
ngie
Differential Revision
D54940: clnt_broadcast(3): fix eachresult argument type
Parents
rG47413f23e503: clnt_broadcast(3): don't free function pointers
Branches
Unknown
Tags
Unknown