On Tuesday 24 October 2006 17:14, Girish Venkatachalam wrote: > How to programmatically determine the IP address of an interface? ... > Till now I have got away with a system("/sbin/ifconfig -a | grep.... hack.
A quick browse through ifconfig.c lead to getifaddrs(3) which seems to do exactly what you want. -- Jason Stubbs