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

Function scope6_setdefault

freebsd/netinet6/scope6.c:253–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251 */
252
253void
254scope6_setdefault(struct ifnet *ifp)
255{
256
257 /*
258 * Currently, this function just sets the default "interfaces"
259 * and "links" according to the given interface.
260 * We might eventually have to separate the notion of "link" from
261 * "interface" and provide a user interface to set the default.
262 */
263 SCOPE6_LOCK();
264 if (ifp) {
265 V_sid_default.s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL] =
266 ifp->if_index;
267 V_sid_default.s6id_list[IPV6_ADDR_SCOPE_LINKLOCAL] =
268 ifp->if_index;
269 } else {
270 V_sid_default.s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL] = 0;
271 V_sid_default.s6id_list[IPV6_ADDR_SCOPE_LINKLOCAL] = 0;
272 }
273 SCOPE6_UNLOCK();
274}
275
276int
277scope6_get_default(struct scope6_id *idlist)

Callers 1

nd6_setdefaultifaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected