Lines Matching refs:ifr
283 struct ifreq ifr; in tap_if_up() local
290 memset(&ifr, 0, sizeof(ifr)); in tap_if_up()
291 strlcpy(ifr.ifr_name, devname, IFNAMSIZ); in tap_if_up()
292 err = ioctl(sk, SIOCGIFHWADDR, &ifr); in tap_if_up()
301 strlcpy(ifr.ifr_name, devname, IFNAMSIZ); in tap_if_up()
302 memcpy(ifr.ifr_hwaddr.sa_data, addr->address, 6); in tap_if_up()
312 if (ifr.ifr_hwaddr.sa_data[0] & 0x01) { in tap_if_up()
315 ifr.ifr_hwaddr.sa_data[0] &= ~0x01; in tap_if_up()
318 err = ioctl(sk, SIOCSIFHWADDR, (caddr_t)&ifr); in tap_if_up()
328 memset(&ifr, 0, sizeof(ifr)); in tap_if_up()
329 strlcpy(ifr.ifr_name, devname, IF_NAMESIZE); in tap_if_up()
331 ifr.ifr_flags |= IFF_UP; in tap_if_up()
332 ifr.ifr_flags |= IFF_MULTICAST; in tap_if_up()
334 err = ioctl(sk, SIOCSIFFLAGS, (caddr_t)&ifr); in tap_if_up()
348 struct ifreq ifr; in tap_if_down() local
354 memset(&ifr, 0, sizeof(ifr)); in tap_if_down()
355 strlcpy(ifr.ifr_name, devname, IF_NAMESIZE); in tap_if_down()
357 ifr.ifr_flags &= ~IFF_UP; in tap_if_down()
359 ioctl(sk, SIOCSIFFLAGS, (caddr_t)&ifr); in tap_if_down()
378 struct ifreq ifr; in btpan_tap_open() local
390 memset(&ifr, 0, sizeof(ifr)); in btpan_tap_open()
391 ifr.ifr_flags = IFF_TAP | IFF_NO_PI; in btpan_tap_open()
393 strlcpy(ifr.ifr_name, TAP_IF_NAME, IFNAMSIZ); in btpan_tap_open()
396 err = ioctl(fd, TUNSETIFF, (void*)&ifr); in btpan_tap_open()