reading routing table

Debarshi Ray debarshi.ray at gmail.com
Mon Sep 1 13:19:04 UTC 2008


> You want 'netstat -rn' to dump them, this is a very common command which
> should be present in a number of online resources on using and administering
> FreeBSD so I am somewhat surprised that you didn't find it.

I know about netstat. I did mention having gone through its
implementation. :-) What I am asking about is related to the
implementation of the 'netstat -rn' functionality, which on some
non-FreeBSD systems is also provided by 'route [show] -n'.

> P.S. Look in the sysctl tree if you need to snapshot the kernel IP
> forwarding tables. You can use kmem, but it is generally frowned upon unless
> you're working from core dumps -- kernels can be built without kmem support,
> or kmem locked down, etc.

Ok, I will have a look. Thanks.

Happy hacking,
Debarshi


More information about the freebsd-net mailing list