Lines Matching refs:ifr
96 struct ifreq ifr; in get_ifi_info_linuxv6() local
173 strncpy(ifr.ifr_name, ifname, IFNAMSIZ); in get_ifi_info_linuxv6()
174 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) { in get_ifi_info_linuxv6()
190 ifi->ifi_flags = ifr.ifr_flags; in get_ifi_info_linuxv6()
231 struct ifreq *ifr, ifrcopy; in get_ifi_info() local
280 ifr = (struct ifreq *) ptr; in get_ifi_info()
283 if (sizeof(struct ifreq) > sizeof(ifr->ifr_name) + GET_SA_LEN(ifr->ifr_addr)) in get_ifi_info()
286 ptr += sizeof(ifr->ifr_name) + GET_SA_LEN(ifr->ifr_addr); in get_ifi_info()
290 if (ifr->ifr_addr.sa_family != family) in get_ifi_info()
294 if ( (cptr = strchr(ifr->ifr_name, ':')) != NULL) in get_ifi_info()
296 if (strncmp(lastname, ifr->ifr_name, IFNAMSIZ) == 0) { in get_ifi_info()
301 memcpy(lastname, ifr->ifr_name, IFNAMSIZ); in get_ifi_info()
303 ifrcopy = *ifr; in get_ifi_info()
324 ifi->ifi_index = if_nametoindex(ifr->ifr_name); in get_ifi_info()
326 ifrcopy = *ifr; in get_ifi_info()
334 memcpy(ifi->ifi_name, ifr->ifr_name, IFI_NAME); in get_ifi_info()
338 switch (ifr->ifr_addr.sa_family) { in get_ifi_info()
340 sinptr = (struct sockaddr_in *) &ifr->ifr_addr; in get_ifi_info()
419 sinptr6 = (struct sockaddr_in6 *) &ifr->ifr_addr; in get_ifi_info()
438 memcpy(&ifr6.ifr_name, &ifr->ifr_name, sizeof(ifr6.ifr_name )); in get_ifi_info()
439 memcpy(&ifr6.ifr_ifru.ifru_addr, &ifr->ifr_addr, sizeof(ifr6.ifr_ifru.ifru_addr)); in get_ifi_info()