MCPcopy Create free account
hub / github.com/F-Stack/f-stack / link_init_sdl

Function link_init_sdl

freebsd/net/if.c:2175–2188  ·  view source on GitHub ↗

* Fills in given sdl with interface basic info. * Returns pointer to filled sdl. */

Source from the content-addressed store, hash-verified

2173 * Returns pointer to filled sdl.
2174 */
2175struct sockaddr_dl *
2176link_init_sdl(struct ifnet *ifp, struct sockaddr *paddr, u_char iftype)
2177{
2178 struct sockaddr_dl *sdl;
2179
2180 sdl = (struct sockaddr_dl *)paddr;
2181 memset(sdl, 0, sizeof(struct sockaddr_dl));
2182 sdl->sdl_len = sizeof(struct sockaddr_dl);
2183 sdl->sdl_family = AF_LINK;
2184 sdl->sdl_index = ifp->if_index;
2185 sdl->sdl_type = iftype;
2186
2187 return (sdl);
2188}
2189
2190/*
2191 * Mark an interface down and notify protocols of

Callers 5

in6_newaddrmsgFunction · 0.85
ether_resolvemultiFunction · 0.85
lacp_port_createFunction · 0.85
infiniband_resolvemultiFunction · 0.85

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected