Use getifaddrs() to get interface addresses