I'm trying to programatically retrieve certain info on my network interfaces and pack it into a string array. I do an ioctl call with the SIOCGIFCONF flag no problem, and when I loop through the result ifreq's I have the correct amount, and I can succesfully retrieve their names. The problem is that I can't seem to retrieve anything else, I'm trying to also get IP address and HW address but they just seem to be blank no matter what I try.
Furthermore, this doesn't seem to return interfaces that have not been designated an Address even though i've turned them on (ifconfig eth1 up).
My code is attached below if anyone could advise I'd be thankful.