Home | History | Annotate | Download | only in dhcpcd-6.8.2

Lines Matching defs:ap

333 				struct ipv6_addr *ap;
336 TAILQ_FOREACH(ap, &rap->addrs, next) {
337 if (ap->prefix_vltime) {
338 ap->prefix_vltime = seconds;
339 ap->prefix_pltime = seconds / 2;
414 struct ipv6_addr *ap;
420 TAILQ_FOREACH(ap, &rap->addrs, next) {
422 if ((ap->flags &
425 return ap;
426 } else if (ap->prefix_vltime &&
427 IN6_ARE_ADDR_EQUAL(&ap->addr, addr) &&
428 (!flags || ap->flags & flags))
429 return ap;
530 struct ipv6_addr *ap;
535 TAILQ_FOREACH(ap, &rap->addrs, next) {
536 if ((ap->flags & (IPV6_AF_AUTOCONF | IPV6_AF_ADDED)) ==
540 if (!(ap->flags & IPV6_AF_DADCOMPLETED) &&
541 ipv6_iffindaddr(ap->iface, &ap->addr))
542 ap->flags |= IPV6_AF_DADCOMPLETED;
543 if ((ap->flags & IPV6_AF_DADCOMPLETED) == 0) {
544 logger(ap->iface->ctx, LOG_DEBUG,
589 struct ipv6_addr *ap = arg;
591 ipv6_addaddr(ap, NULL);
598 const struct ipv6_addr *ap;
603 TAILQ_FOREACH(ap, &rap->addrs, next) {
604 if (ap->flags & IPV6_AF_AUTOCONF &&
605 ap->flags & IPV6_AF_ADDED &&
606 !(ap->flags & IPV6_AF_DADCOMPLETED))
616 struct ipv6_addr *ap = arg, *rapap;
625 ifp = ap->iface;
626 wascompleted = (ap->flags & IPV6_AF_DADCOMPLETED);
627 ap->flags |= IPV6_AF_DADCOMPLETED;
628 if (ap->flags & IPV6_AF_DUPLICATED) {
629 ap->dadcounter++;
631 ifp->name, ap->saddr);
634 * Because ap->dadcounter is always increamented,
638 if (ap->dadcounter >= IDGEN_RETRIES) {
646 ifp->name, ap->saddr);
647 if (if_deladdress6(ap) == -1 &&
650 dadcounter = ap->dadcounter;
651 if (ipv6_makestableprivate(&ap->addr,
652 &ap->prefix, ap->prefix_len,
660 ap->dadcounter = dadcounter;
661 ap->flags &= ~(IPV6_AF_ADDED | IPV6_AF_DADCOMPLETED);
662 ap->flags |= IPV6_AF_NEW;
663 p = inet_ntop(AF_INET6, &ap->addr, buf, sizeof(buf));
665 snprintf(ap->saddr,
666 sizeof(ap->saddr),
668 p, ap->prefix_len);
670 ap->saddr[0] = '\0';
676 ipv6nd_addaddr, ap);
696 if (rapap == ap)
744 struct ipv6_addr *ap;
863 TAILQ_FOREACH(ap, &rap->addrs, next) {
864 ap->flags |= IPV6_AF_STALE;
919 TAILQ_FOREACH(ap, &rap->addrs, next)
920 if (ap->prefix_len ==pi->nd_opt_pi_prefix_len &&
921 IN6_ARE_ADDR_EQUAL(&ap->prefix,
924 if (ap == NULL) {
930 ap = calloc(1, sizeof(*ap));
931 if (ap == NULL)
933 ap->iface = rap->iface;
934 ap->flags = IPV6_AF_NEW;
935 ap->prefix_len = pi->nd_opt_pi_prefix_len;
936 ap->prefix = pi->nd_opt_pi_prefix;
939 ap->iface->options->options &
942 ap->flags |= IPV6_AF_AUTOCONF;
943 ap->dadcounter =
944 ipv6_makeaddr(&ap->addr, ifp,
945 &ap->prefix,
947 if (ap->dadcounter == -1) {
948 free(ap);
952 &ap->addr,
955 snprintf(ap->saddr,
956 sizeof(ap->saddr),
958 cbp, ap->prefix_len);
960 ap->saddr[0] = '\0';
962 memset(&ap->addr, 0, sizeof(ap->addr));
963 ap->saddr[0] = '\0';
965 ap->dadcallback = ipv6nd_dadcallback;
966 ap->created = ap->acquired = rap->received;
967 TAILQ_INSERT_TAIL(&rap->addrs, ap, next);
975 if (ipv6_iffindaddr(ifp, &ap->addr) &&
976 ipv6_settemptime(ap, 0))
985 ap->flags &= ~IPV6_AF_STALE;
986 ap->acquired = rap->received;
990 ap->flags |= IPV6_AF_ONLINK;
991 ap->prefix_vltime =
993 ap->prefix_pltime =
995 ap->nsprobes = 0;
996 cbp = inet_ntop(AF_INET6, &ap->prefix, buf, sizeof(buf));
1002 ap->prefix_len);
1003 opt2 = strdup(ap->saddr);
1009 if (ap->flags & IPV6_AF_AUTOCONF &&
1010 ap->iface->options->options & DHCPCD_IPV6RA_OWN &&
1011 ip6_use_tempaddr(ap->iface->name))
1014 if (ipv6_settemptime(ap, 1) == NULL)
1017 if (new_ap && ap->prefix_pltime) {
1018 if (ipv6_createtempaddr(ap,
1019 &ap->acquired) == NULL)
1020 logger(ap->iface->ctx, LOG_ERR,
1026 lifetime = ap->prefix_vltime;