Hi all,

I've been looking for a method of retrieving a list of all network interfaces in C.

I have found basically two methods.
1) using ioctl
2) using getifaddrs

The problem of ioctl is that it lists only the available interfaces (i.e. those which are up and connected), while I want a list of all interfaces, even those which are down.

The problem of getifaddrs is that I need also the MAC address, and it seems to not provide it.

Can you help me?
I would prefer to use ioctl, if there is a method of listing also interfaces which are down.