use struct ifreq array
compare ioctl() and getifaddrs()