Lines Matching defs:ifra
281 struct in_aliasreq *ifra = (struct in_aliasreq *)data;
346 if (ifra->ifra_addr.sin_family == AF_INET) {
353 ifra->ifra_addr.sin_addr.s_addr)
366 && (ifra->ifra_dstaddr.sin_addr.s_addr
392 if (ifra->ifra_addr.sin_family != AF_INET
643 i = ifra->ifra_addr.sin_addr.s_addr;
680 if (ifra->ifra_addr.sin_len == 0) {
681 ifra->ifra_addr = ia->ia_addr;
683 } else if (ifra->ifra_addr.sin_addr.s_addr ==
687 if (ifra->ifra_mask.sin_len) {
689 ia->ia_sockmask = ifra->ifra_mask;
695 (ifra->ifra_dstaddr.sin_family == AF_INET)) {
697 ia->ia_dstaddr = ifra->ifra_dstaddr;
700 if (ifra->ifra_addr.sin_family == AF_INET &&
702 error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0);
705 (ifra->ifra_broadaddr.sin_family == AF_INET))
706 ia->ia_broadaddr = ifra->ifra_broadaddr;
996 struct in_aliasreq ifra;
1002 bzero(&ifra, sizeof(ifra));
1003 bcopy(iflr->iflr_name, ifra.ifra_name,
1004 sizeof(ifra.ifra_name));
1006 bcopy(&iflr->addr, &ifra.ifra_addr, iflr->addr.ss_len);
1009 bcopy(&iflr->dstaddr, &ifra.ifra_dstaddr,
1013 ifra.ifra_mask.sin_family = AF_INET;
1014 ifra.ifra_mask.sin_len = sizeof(struct sockaddr_in);
1015 in_len2mask(&ifra.ifra_mask.sin_addr, iflr->prefixlen);
1017 return in_control(so, SIOCAIFADDR, (caddr_t)&ifra, ifp, p);
1089 struct in_aliasreq ifra;
1092 bzero(&ifra, sizeof(ifra));
1093 bcopy(iflr->iflr_name, ifra.ifra_name,
1094 sizeof(ifra.ifra_name));
1096 bcopy(&ia->ia_addr, &ifra.ifra_addr,
1099 bcopy(&ia->ia_dstaddr, &ifra.ifra_dstaddr,
1102 bcopy(&ia->ia_sockmask, &ifra.ifra_dstaddr,
1105 return in_control(so, SIOCDIFADDR, (caddr_t)&ifra,