HomeFreeBSD

Simplify filling sockaddr_dl structure for if_resolvemulti()

Description

Simplify filling sockaddr_dl structure for if_resolvemulti()
callback providers. link_init_sdl() function can be used to
fill most of the parameters. Use caller stack instead of
allocation / freing memory for each request. Do not drop support
for extra-long (probably non-existing) link-layer protocols by
introducing link_alloc_sdl() (used by if_resolvemulti() callback)
and link_free_sdl() (used by caller).
Since this change breaks KBI, MFC requires slightly different approach
(link_init_sdl() auto-allocating buffer if necessary to handle cases
with unmodified if_resolvemulti() callers).

MFC after: 2 weeks

Details

Provenance
melifaroAuthored on Jan 18 2014, 11:24 PM
Parents
rGe06674ffd2be: Fix a bad comparison operator (s/==/=/), and address a use-case issue where-
Branches
Unknown
Tags
Unknown

Event Timeline