Lines Matching defs:ifa
913 struct ifaddr *ifa;
923 ifa = ifnet_addrs[interface->if_index - 1];
924 if (ifa != NULL) {
925 sdl = (struct sockaddr_dl*)ifa->ifa_addr;
1065 struct ifaddr *ifa = ifnet_addrs[ifp->if_index - 1];
1068 if (!ifa || !ifa->ifa_addr)
1071 ll_addr = (struct sockaddr_dl *)ifa->ifa_addr;
1172 ifaddr_t ifa)
1174 if (ifa == NULL) return EINVAL;
1175 ifaref(ifa);
1181 ifaddr_t ifa)
1183 if (ifa == NULL) return EINVAL;
1184 ifafree(ifa);
1190 ifaddr_t ifa)
1192 if (ifa && ifa->ifa_addr)
1193 return ifa->ifa_addr->sa_family;
1200 ifaddr_t ifa,
1206 if (ifa == NULL || out_addr == NULL) return EINVAL;
1207 if (ifa->ifa_addr == NULL) return ENOTSUP;
1209 copylen = (addr_size >= ifa->ifa_addr->sa_len) ? ifa->ifa_addr->sa_len : addr_size;
1210 bcopy(ifa->ifa_addr, out_addr, copylen);
1212 if (ifa->ifa_addr->sa_len > addr_size) return EMSGSIZE;
1219 ifaddr_t ifa,
1224 if (ifa == NULL || out_addr == NULL) return EINVAL;
1225 if (ifa->ifa_dstaddr == NULL) return ENOTSUP;
1227 copylen = (addr_size >= ifa->ifa_dstaddr->sa_len) ? ifa->ifa_dstaddr->sa_len : addr_size;
1228 bcopy(ifa->ifa_dstaddr, out_addr, copylen);
1230 if (ifa->ifa_dstaddr->sa_len > addr_size) return EMSGSIZE;
1237 ifaddr_t ifa,
1242 if (ifa == NULL || out_addr == NULL) return EINVAL;
1243 if (ifa->ifa_netmask == NULL) return ENOTSUP;
1245 copylen = addr_size >= ifa->ifa_netmask->sa_len ? ifa->ifa_netmask->sa_len : addr_size;
1246 bcopy(ifa->ifa_netmask, out_addr, copylen);
1248 if (ifa->ifa_netmask->sa_len > addr_size) return EMSGSIZE;
1255 ifaddr_t ifa)
1258 if (ifa == NULL) return NULL;
1259 ifp = ifa->ifa_ifp;