Subject: Re: route(4) interface
To: None <tech-net@netbsd.org>
From: None <joerg@britannica.bec.de>
List: tech-net
Date: 02/26/2006 14:41:52
On Sun, Feb 26, 2006 at 12:03:51AM +0200, Mihai CHELARU wrote:
> 1) I'm trying to capture all routing changes that appear in a system.
> Right now I'm selecting a PF_ROUTE socket and get data from there. But I
> observed that directly connected routes changes are not reported via
> this interface. How can I see these changes ?
What do you mean with "directly connected route"? ARP packets? I don't
think they trigger routing messages and I wouldn't like them to trigger
them either.
> 3) I need a portable (POSIX ?) interface to dump all the routing table.
> I saw that route(8) does that by triggering a sysctl but I don't think
> that's very portable. Any other methods ?
The only semi-portable interfaces I can think of are "netstat -rn",
"route -n show" and SNMP :-)
Joerg