Lines Matching defs:ifc
185 struct ifconf ifc;
206 memset(&ifc, 0, sizeof(ifc));
208 ifc.ifc_len = len;
209 ifc.ifc_buf = xmalloc((size_t)len);
210 if (ioctl(s, SIOCGIFCONF, &ifc) == -1) {
213 free(ifc.ifc_buf);
217 if (ifc.ifc_len == lastlen)
219 lastlen = ifc.ifc_len;
222 free(ifc.ifc_buf);
223 ifc.ifc_buf = NULL;
227 for (p = (char *)ifc.ifc_buf; p < (char *)ifc.ifc_buf + ifc.ifc_len;) {
228 /* Cast the ifc buffer to an ifreq cleanly */
283 free(ifc.ifc_buf);