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

Function scope6_ifattach

freebsd/netinet6/scope6.c:96–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96struct scope6_id *
97scope6_ifattach(struct ifnet *ifp)
98{
99 struct scope6_id *sid;
100
101 sid = malloc(sizeof(*sid), M_IFADDR, M_WAITOK | M_ZERO);
102 /*
103 * XXX: IPV6_ADDR_SCOPE_xxx macros are not standard.
104 * Should we rather hardcode here?
105 */
106 sid->s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL] = ifp->if_index;
107 sid->s6id_list[IPV6_ADDR_SCOPE_LINKLOCAL] = ifp->if_index;
108 return (sid);
109}
110
111void
112scope6_ifdetach(struct scope6_id *sid)

Callers 1

in6_domifattachFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected