I m trying to port some code from Windows platform to linux. I have
some code which uses IP Helper API on windows, but i couldn't find
anything similar to linux. The only thing i did find is that i can use
ioctl() function to enumerate network interfaces. But i need to do
couple more things:

1) In Windows, there are functions GetBestInterface() and
GetBestRoute() which allow me to get the interface which would be used
to connect to a specific host. How can i do this on linux/unix?

2) In Windows, i can register for network change notifications using
functions like
NotifyAddrChange() and NotifyRouteChange(). How can i do this on

3) Windows also has RAS API which is used to enumerate phonebook
entries, dial/hangup a particular connection and query connection
properties. Is there anything similar to RAS API on linux/unix?

Thanks a lot,