Lines Matching refs:fd
156 int fd, minunit, n;
164 fd = socket(AF_INET, SOCK_DGRAM, 0);
165 if (fd == -1) {
174 if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) == -1 ||
178 (void)close(fd);
206 if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifr) == -1) {
213 (void)close(fd);
232 (void)close(fd);
248 int fd;
252 fd = socket(AF_INET, SOCK_DGRAM, 0);
253 if (fd == -1) {
264 if (ioctl(fd, SIOCGIFADDR, (char *)&ifr) == -1) {
273 (void)close(fd);
278 if (ioctl(fd, SIOCGIFNETMASK, (char *)&ifr) == -1) {
281 (void)close(fd);
284 (void)close(fd);