Lines Matching refs:ifr
190 struct ifaddrs *ifr; in lws_interface_to_sa() local
196 getifaddrs(&ifr); in lws_interface_to_sa()
197 for (ifc = ifr; ifc != NULL && rc; ifc = ifc->ifa_next) { in lws_interface_to_sa()
247 freeifaddrs(ifr); in lws_interface_to_sa()
342 struct ifreq ifr; in lws_plat_if_up() local
344 memset(&ifr, 0, sizeof(ifr)); in lws_plat_if_up()
345 lws_strncpy(ifr.ifr_name, ifname, IFNAMSIZ); in lws_plat_if_up()
347 if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) { in lws_plat_if_up()
353 ifr.ifr_flags |= IFF_UP; in lws_plat_if_up()
355 ifr.ifr_flags &= ~IFF_UP; in lws_plat_if_up()
357 if (ioctl(fd, SIOCSIFFLAGS, &ifr) < 0) { in lws_plat_if_up()
401 struct ifreq ifr; in lws_plat_ifconfig_ip() local
403 memset(&ifr, 0, sizeof(ifr)); in lws_plat_ifconfig_ip()
407 lws_strncpy(ifr.ifr_name, ifname, IFNAMSIZ); in lws_plat_ifconfig_ip()
414 memcpy(&ifr.ifr_addr, &sin, sizeof(struct sockaddr)); in lws_plat_ifconfig_ip()
415 if (ioctl(fd, SIOCSIFADDR, &ifr) < 0) { in lws_plat_ifconfig_ip()
421 memcpy(&ifr.ifr_addr, &sin, sizeof(struct sockaddr)); in lws_plat_ifconfig_ip()
422 if (ioctl(fd, SIOCSIFNETMASK, &ifr) < 0) { in lws_plat_ifconfig_ip()