Mapping from rtm_flags back to MIB IANAipRouteProtocol value
Alexander V. Chernikov
melifaro at FreeBSD.org
Wed Jul 25 08:06:44 UTC 2012
On 25.07.2012 02:54, Philip Prindeville wrote:
> Ok, dumb question... How do I map a routing entries rtm_flags back to a IANAipRouteProtocol value?
Well, something like this can probably be used:
~RTF_GATEWAY maps to local (2), -- local interface
RTF_STATIC maps to netmgmt (3), -- static route
RTF_DYNAMIC maps to icmp (4), -- result of ICMP Redirect
other routes? other (1), -- not specified
RTF_PROTO1 tells us thet it is dynamic route, and you have to use
quagga/bird/openbgpd/whatever cli / api to get more precise results.
You can examine `netstat -rn -finet` output with netstat(8) to get good
overview for common route types.
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>
More information about the freebsd-net
mailing list