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

Function sppp_ipv6cp_open

freebsd/net/if_spppsubr.c:3410–3440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3408}
3409
3410static void
3411sppp_ipv6cp_open(struct sppp *sp)
3412{
3413 STDDCL;
3414 struct in6_addr myaddr, hisaddr;
3415
3416#ifdef IPV6CP_MYIFID_DYN
3417 sp->ipv6cp.flags &= ~(IPV6CP_MYIFID_SEEN|IPV6CP_MYIFID_DYN);
3418#else
3419 sp->ipv6cp.flags &= ~IPV6CP_MYIFID_SEEN;
3420#endif
3421
3422 sppp_get_ip6_addrs(sp, &myaddr, &hisaddr, 0);
3423 /*
3424 * If we don't have our address, this probably means our
3425 * interface doesn't want to talk IPv6 at all. (This could
3426 * be the case if somebody wants to speak only IPX, for
3427 * example.) Don't open IPv6CP in this case.
3428 */
3429 if (IN6_IS_ADDR_UNSPECIFIED(&myaddr)) {
3430 /* XXX this message should go away */
3431 if (debug)
3432 log(LOG_DEBUG, SPP_FMT "ipv6cp_open(): no IPv6 interface\n",
3433 SPP_ARGS(ifp));
3434 return;
3435 }
3436
3437 sp->ipv6cp.flags |= IPV6CP_MYIFID_SEEN;
3438 sp->ipv6cp.opts |= (1 << IPV6CP_OPT_IFID);
3439 sppp_open_event(&ipv6cp, sp);
3440}
3441
3442static void
3443sppp_ipv6cp_close(struct sppp *sp)

Callers

nothing calls this directly

Calls 3

sppp_get_ip6_addrsFunction · 0.85
sppp_open_eventFunction · 0.85
logFunction · 0.50

Tested by

no test coverage detected