Introduction - If you have any usage issues, please Google them yourself
getnetaddrs This function will return the address of the interface passed in. It does so by calling the ioctl function. It returns a 0 on a successful net address extraction or else it returns a -1.