Lines Matching defs:ifr
281 struct ifreq ifr;
288 memset(&ifr, 0, sizeof(ifr));
289 strncpy(ifr.ifr_name, devname, IFNAMSIZ - 1);
290 err = ioctl(sk, SIOCGIFHWADDR, &ifr);
299 strncpy(ifr.ifr_name, devname, IFNAMSIZ - 1);
300 memcpy(ifr.ifr_hwaddr.sa_data, addr->address, 6);
310 if (ifr.ifr_hwaddr.sa_data[0] & 0x01) {
313 ifr.ifr_hwaddr.sa_data[0] &= ~0x01;
316 err = ioctl(sk, SIOCSIFHWADDR, (caddr_t)&ifr);
326 memset(&ifr, 0, sizeof(ifr));
327 strncpy(ifr.ifr_name, devname, IF_NAMESIZE - 1);
329 ifr.ifr_flags |= IFF_UP;
330 ifr.ifr_flags |= IFF_MULTICAST;
332 err = ioctl(sk, SIOCSIFFLAGS, (caddr_t)&ifr);
346 struct ifreq ifr;
352 memset(&ifr, 0, sizeof(ifr));
353 strncpy(ifr.ifr_name, devname, IF_NAMESIZE - 1);
355 ifr.ifr_flags &= ~IFF_UP;
357 ioctl(sk, SIOCSIFFLAGS, (caddr_t)&ifr);
375 struct ifreq ifr;
387 memset(&ifr, 0, sizeof(ifr));
388 ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
390 strncpy(ifr.ifr_name, TAP_IF_NAME, IFNAMSIZ);
393 err = ioctl(fd, TUNSETIFF, (void*)&ifr);