Lines Matching defs:ifra
415 struct in6_aliasreq *ifra = (struct in6_aliasreq *)data;
544 if (ifp->if_type == IFT_PPP && ifra->ifra_addr.sin6_family == AF_INET6 &&
545 ifra->ifra_dstaddr.sin6_family == AF_INET6)
546 in6_if_up(ifp, ifra); /* PPP may provide LinkLocal addresses */
604 if (ifra->ifra_addr.sin6_family == AF_INET6) { /* XXX */
606 (struct sockaddr_in6 *)&ifra->ifra_addr;
624 ia = in6ifa_ifpwithaddr(ifp, &ifra->ifra_addr.sin6_addr);
659 if (ifra->ifra_addr.sin6_family != AF_INET6 ||
660 ifra->ifra_addr.sin6_len != sizeof(struct sockaddr_in6)) {
814 if ((error = in6_update_ifa(ifp, ifra, ia)) != 0)
830 pr0.ndpr_plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr,
834 pr0.ndpr_prefix = ifra->ifra_addr;
835 pr0.ndpr_mask = ifra->ifra_prefixmask.sin6_addr;
839 ifra->ifra_prefixmask.sin6_addr.s6_addr32[i];
850 ((ifra->ifra_flags & IN6_IFF_AUTOCONF) != 0);
851 pr0.ndpr_vltime = ifra->ifra_lifetime.ia6t_vltime;
852 pr0.ndpr_pltime = ifra->ifra_lifetime.ia6t_pltime;
869 if ((ia = in6ifa_ifpwithaddr(ifp, &ifra->ifra_addr.sin6_addr))
980 in6_update_ifa(ifp, ifra, ia)
982 struct in6_aliasreq *ifra;
994 if (ifp == NULL || ifra == NULL) /* this maybe redundant */
1002 ifra->ifra_dstaddr.sin6_family != AF_INET6 &&
1003 ifra->ifra_dstaddr.sin6_family != AF_UNSPEC)
1009 if (ifra->ifra_prefixmask.sin6_len > sizeof(struct sockaddr_in6))
1015 if (ifra->ifra_prefixmask.sin6_len == sizeof(struct sockaddr_in6) &&
1016 ifra->ifra_prefixmask.sin6_family == 0) {
1017 ifra->ifra_prefixmask.sin6_family = AF_INET6;
1025 if (ia == NULL && ifra->ifra_prefixmask.sin6_len == 0)
1027 if (ifra->ifra_prefixmask.sin6_len != 0) {
1028 plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr,
1029 (u_char *)&ifra->ifra_prefixmask +
1030 ifra->ifra_prefixmask.sin6_len);
1046 dst6 = ifra->ifra_dstaddr;
1053 &ifra->ifra_dstaddr.sin6_addr,
1074 if (ifra->ifra_dstaddr.sin6_family == AF_INET6) {
1094 lt = &ifra->ifra_lifetime;
1106 ip6_sprintf(&ifra->ifra_addr.sin6_addr));
1164 if (ifra->ifra_prefixmask.sin6_len) {
1179 ia->ia_prefixmask = ifra->ifra_prefixmask;
1206 if ((error = in6_ifinit(ifp, ia, &ifra->ifra_addr, hostIsNew)) != 0)
1217 (ifra->ifra_flags & IN6_IFF_NOPFX) == 0) { /* XXX */
1243 ifra->ifra_addr.sin6_addr.s6_addr32[3];
1351 ia->ia6_flags = ifra->ifra_flags;
1355 ia->ia6_lifetime = ifra->ifra_lifetime;
1380 if (in6if_do_dad(ifp) && (ifra->ifra_flags & IN6_IFF_NODAD) == 0) {
1618 struct in6_aliasreq ifra;
1652 bzero(&ifra, sizeof(ifra));
1653 bcopy(iflr->iflr_name, ifra.ifra_name,
1654 sizeof(ifra.ifra_name));
1656 bcopy(&iflr->addr, &ifra.ifra_addr,
1660 ifra.ifra_addr.sin6_addr.s6_addr32[2] =
1662 ifra.ifra_addr.sin6_addr.s6_addr32[3] =
1667 bcopy(&iflr->dstaddr, &ifra.ifra_dstaddr,
1670 ifra.ifra_dstaddr.sin6_addr.s6_addr32[2] =
1672 ifra.ifra_dstaddr.sin6_addr.s6_addr32[3] =
1677 ifra.ifra_prefixmask.sin6_len = sizeof(struct sockaddr_in6);
1678 in6_len2mask(&ifra.ifra_prefixmask.sin6_addr, prefixlen);
1680 ifra.ifra_flags = iflr->flags & ~IFLR_PREFIX;
1681 return in6_control(so, SIOCAIFADDR_IN6, (caddr_t)&ifra, ifp, p);
1790 struct in6_aliasreq ifra;
1793 bzero(&ifra, sizeof(ifra));
1794 bcopy(iflr->iflr_name, ifra.ifra_name,
1795 sizeof(ifra.ifra_name));
1797 bcopy(&ia->ia_addr, &ifra.ifra_addr,
1800 bcopy(&ia->ia_dstaddr, &ifra.ifra_dstaddr,
1803 bzero(&ifra.ifra_dstaddr,
1804 sizeof(ifra.ifra_dstaddr));
1806 bcopy(&ia->ia_prefixmask, &ifra.ifra_dstaddr,
1809 ifra.ifra_flags = ia->ia6_flags;
1810 return in6_control(so, SIOCDIFADDR_IN6, (caddr_t)&ifra,
2623 struct in6_aliasreq *ifra)
2635 in6_ifattach(ifp, NULL, ifra);