On Thu, 4 Mar 2004, Juan Rodriguez Hervella wrote: > An James Yonan said: > > Ah, yes, that's a problem. > > > > The --redirect-gateway implementation needs to be able to get the IP address > > of the current default gateway. Unfortunately the standard Berkeley sockets > > API doesn't give us a portable way of doing this. Anyone know how to > > do this on FreeBSD? > > So ? :)
Take a look at the implementation of 'route get default' in src/sbin/route/route.c. Basically, you ask the routing socket for the route to 0.0.0.0/0.0.0.0 (INADDR_ANY). Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Senior Research Scientist, McAfee Research _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"