help with code to determine external IP address on FreeBSD gateway machine

Debarshi Ray debarshi.ray at gmail.com
Tue Sep 16 18:39:39 UTC 2008


Here is the code: http://rishi.fedorapeople.org/gnu/inetutils-1.5.tar.gz

You will be interested in route/bsd_show.c and the function in that
file named bsd_show. It uses a combination of sysctl and PF_ROUTE to
retrieve the information.

Please ask if you encounter any problem. :-)

Happy hacking,
Debarshi


More information about the freebsd-net mailing list