[oclug] [OT] C: get local ip?
james.leigh at ottawa.com
Tue Mar 19 16:54:33 EST 2002
what about if I know the default route is eth0, could I do i then?
On Tue, 2002-03-19 at 15:48, David F. Skoll wrote:
> There is no easy way to do what you want in C. Basically, you
> have to go through the routing table to find out which interface
> is used for the default route, and then use ioctl's to get its IP
> address. There are some complications:
More information about the OCLUG