HomeFreeBSD

net/if_dl.h: make self-contained

Description

net/if_dl.h: make self-contained

include <sys/_types.h> for u_char and u_short.

to avoid including <sys/types.h>, remove the caddr_t cast from LLADDR.
we are trying to get rid of caddr_t anyway, and since sdl_data is
already an array of char, the cast is unnecessary. this also makes
LLADDR const-correct, i.e. passing a const sockaddr_dl will return a
const pointer.

Reviewed by: des
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D50065

(cherry picked from commit 70b5c918571b6c79459ee6de66ceb4c83974d542)

Details

Provenance
ivyAuthored on May 6 2025, 10:20 AM
Reviewer
des
Differential Revision
D50065: net/if_dl.h: make self-contained
Parents
rG243de2ac1545: net/if_dl.h: put kernel decls behind _KERNEL
Branches
Unknown
Tags
Unknown