Lines Matching defs:ifr
68 struct ifreq ifr;
72 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
74 err = ioctl(fd, SIOCGIFINDEX, &ifr);
80 return ifr.ifr_ifindex;
85 struct ifreq ifr;
89 strncpy(ifr.ifr_name, dev, IFNAMSIZ);
91 err = ioctl(fd, SIOCGIFHWADDR, &ifr);
97 return ifr.ifr_addr.sa_family;
103 static struct ifreq ifr;
107 ifr.ifr_ifindex = idx;
109 err = ioctl(fd, SIOCGIFNAME, &ifr);
115 return ifr.ifr_name;
120 struct ifreq ifr;
124 strncpy(ifr.ifr_name, basedev, IFNAMSIZ);
125 ifr.ifr_ifru.ifru_data = (void*)p;
127 err = ioctl(fd, SIOCGETTUNNEL, &ifr);
136 struct ifreq ifr;
141 strncpy(ifr.ifr_name, name, IFNAMSIZ);
143 strncpy(ifr.ifr_name, basedev, IFNAMSIZ);
144 ifr.ifr_ifru.ifru_data = p;
146 err = ioctl(fd, cmd, &ifr);
155 struct ifreq ifr;
160 strncpy(ifr.ifr_name, name, IFNAMSIZ);
162 strncpy(ifr.ifr_name, basedev, IFNAMSIZ);
163 ifr.ifr_ifru.ifru_data = p;
165 err = ioctl(fd, SIOCDELTUNNEL, &ifr);
174 struct ifreq ifr;
178 strncpy(ifr.ifr_name, name, IFNAMSIZ);
179 ifr.ifr_ifru.ifru_data = p;
181 err = ioctl(fd, cmd, &ifr);