Lines Matching refs:ifc
54 print_ifconf(struct ifconf *ifc, int in_len, char *in_buf, long rc)
60 if (in_len != ifc->ifc_len) {
62 print_ifc_len(ifc->ifc_len);
66 print_ifc_len(ifc->ifc_len);
80 for (i = 0; i < (ifc->ifc_len) &&
83 struct ifreq *ifr = (struct ifreq *) (ifc->ifc_buf + i);
95 if ((size_t) (ifc->ifc_len - i) >= sizeof(struct ifreq))
105 gifconf_ioctl(int fd, struct ifconf *ifc, bool ifc_valid)
113 in_len = ifc->ifc_len;
114 in_buf = ifc->ifc_buf;
117 rc = ioctl(fd, SIOCGIFCONF, ifc);
122 print_ifconf(ifc, in_len, in_buf, rc);
124 if (ifc)
125 printf("%p", ifc);
137 TAIL_ALLOC_OBJECT_CONST_PTR(struct ifconf, ifc);
150 gifconf_ioctl(fd, ifc + 1, false);
152 ifc->ifc_len = 3141592653U;
153 ifc->ifc_buf = NULL;
154 gifconf_ioctl(fd, ifc, true);
156 ifc->ifc_len = 0;
157 ifc->ifc_buf = (char *) (ifr + 2);
158 gifconf_ioctl(fd, ifc, true);
160 ifc->ifc_len = 1;
161 ifc->ifc_buf = (char *) (ifr + 1);
162 gifconf_ioctl(fd, ifc, true);
164 ifc->ifc_len = 1 * sizeof(*ifr);
165 ifc->ifc_buf = (char *) (ifr + 1);
166 gifconf_ioctl(fd, ifc, true);
168 ifc->ifc_len = 2 * sizeof(*ifr);
169 ifc->ifc_buf = (char *) (ifr + 1);
170 gifconf_ioctl(fd, ifc, true);
172 ifc->ifc_len = 2 * sizeof(*ifr) + 2;
173 ifc->ifc_buf = (char *) ifr;
174 gifconf_ioctl(fd, ifc, true);
176 ifc->ifc_len = 3 * sizeof(*ifr) + 4;
177 ifc->ifc_buf = (char *) ifr;
178 gifconf_ioctl(fd, ifc, true);