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

Function in6_getscopezone

freebsd/netinet6/scope6.c:504–514  ·  view source on GitHub ↗

* Return zone id for the specified scope. */

Source from the content-addressed store, hash-verified

502 * Return zone id for the specified scope.
503 */
504uint32_t
505in6_getscopezone(const struct ifnet *ifp, int scope)
506{
507
508 if (scope == IPV6_ADDR_SCOPE_INTFACELOCAL ||
509 scope == IPV6_ADDR_SCOPE_LINKLOCAL)
510 return (ifp->if_index);
511 if (scope >= 0 && scope < IPV6_ADDR_SCOPES_COUNT)
512 return (SID(ifp)->s6id_list[scope]);
513 return (0);
514}
515
516/*
517 * Extracts scope from adddress @dst, stores cleared address

Callers 4

dyn_getscopeidFunction · 0.85
nd6_lle_eventFunction · 0.85
sa6_checkzoneFunction · 0.85
sa6_checkzone_ifpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected