Lines Matching refs:ifr
267 struct ifreq ifr; in tap_if_up() local
274 memset(&ifr, 0, sizeof(ifr)); in tap_if_up()
275 strlcpy(ifr.ifr_name, devname, IFNAMSIZ); in tap_if_up()
276 err = ioctl(sk, SIOCGIFHWADDR, &ifr); in tap_if_up()
284 strlcpy(ifr.ifr_name, devname, IFNAMSIZ); in tap_if_up()
285 memcpy(ifr.ifr_hwaddr.sa_data, addr.address, 6); in tap_if_up()
295 if (ifr.ifr_hwaddr.sa_data[0] & 0x01) { in tap_if_up()
297 ifr.ifr_hwaddr.sa_data[0] &= ~0x01; in tap_if_up()
300 err = ioctl(sk, SIOCSIFHWADDR, (caddr_t)&ifr); in tap_if_up()
310 memset(&ifr, 0, sizeof(ifr)); in tap_if_up()
311 strlcpy(ifr.ifr_name, devname, IF_NAMESIZE); in tap_if_up()
313 ifr.ifr_flags |= IFF_UP; in tap_if_up()
314 ifr.ifr_flags |= IFF_MULTICAST; in tap_if_up()
316 err = ioctl(sk, SIOCSIFFLAGS, (caddr_t)&ifr); in tap_if_up()
330 struct ifreq ifr; in tap_if_down() local
336 memset(&ifr, 0, sizeof(ifr)); in tap_if_down()
337 strlcpy(ifr.ifr_name, devname, IF_NAMESIZE); in tap_if_down()
339 ifr.ifr_flags &= ~IFF_UP; in tap_if_down()
341 ioctl(sk, SIOCSIFFLAGS, (caddr_t)&ifr); in tap_if_down()
360 struct ifreq ifr; in btpan_tap_open() local
372 memset(&ifr, 0, sizeof(ifr)); in btpan_tap_open()
373 ifr.ifr_flags = IFF_TAP | IFF_NO_PI; in btpan_tap_open()
375 strlcpy(ifr.ifr_name, TAP_IF_NAME, IFNAMSIZ); in btpan_tap_open()
378 err = ioctl(fd, TUNSETIFF, (void*)&ifr); in btpan_tap_open()