[quagga-dev 10623] Re: Get Routing Table that Zebra save in kernel

Bin Zhou binzhou at ruggedcom.com
Tue Jul 23 14:38:01 BST 2013


Mohammad Hosein Zarei <hosein.zarei <at> gmail.com> writes:

> 
> 
> Hi 
> 
> I want to get routing table that Zebra send to kernel and pass to my 
program or write to a file.
> 
> How I can do this? What source file and function in Zebra have routing 
tables and convert to netlink structure?
> 
> 
> 
> 
> Thanks.
> 
> 
> -- 
> 
> Mohammad Hosein      Zarei      
> 

You can create a netlink socket listening on RTM_NEWROUTE and RTM_DELROUTE. 
When the application start, it should also read the full content of FIB. You 
should be able to find code reference in zebra/rt_netlink.c







More information about the Quagga-dev mailing list