936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
|
memset(&ifc, 0, sizeof(ifc));
ifc.ifc_buf = (void *)ifrs;
ifc.ifc_len = 128 * sizeof(struct ifreq);
if (ioctl(sock, SIOCGIFCONF, &ifc) < 0)
return false;
buffer = ifc.ifc_buf;
while (buffer < ifc.ifc_buf + ifc.ifc_len) {
struct ifreq *current = (struct ifreq *)(void *)buffer;
OFString *name;
OFMutableData *addresses;
OFSocketAddress address;
if (current->ifr_addr.sa_family != family)
goto next;
|
|
|
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
|
memset(&ifc, 0, sizeof(ifc));
ifc.ifc_buf = (void *)ifrs;
ifc.ifc_len = 128 * sizeof(struct ifreq);
if (ioctl(sock, SIOCGIFCONF, &ifc) < 0)
return false;
buffer = ifc.ifc_buf;
while (buffer < (char *)ifc.ifc_buf + ifc.ifc_len) {
struct ifreq *current = (struct ifreq *)(void *)buffer;
OFString *name;
OFMutableData *addresses;
OFSocketAddress address;
if (current->ifr_addr.sa_family != family)
goto next;
|