Thank you all guys :) In fact, i just need to do something when the routing table is updated by ospfd. so finally i add some codes to ospf_spf.c(quagga-0.99.22.4/ospfd/ospf_spf.c, after the line "ospf_route_install(ospf, new_table)" in Line 1311) and it works. Whats more, the codes that refer to updating routing table (searched by grep command in Linux) are as following: ./rt_netlink.c:1:/* Kernel routing table updates using netlink over GNU/Linux system. ./rt_socket.c:2: * Kernel routing table updates by routing socket. ./kernel_socket.c:993:/* Interface function for the kernel routing table updates. Support ./kernel_socket.c:1153:/* Kernel routing table and interface updates via routing socket. */ ./rt.h:2: * kernel routing table update prototype. ./rt_ioctl.c:2: * kernel routing table update by ioctl().
./ospf_spf.c:1310: /* Update routing table. */ ./ospf_spf.c:1313: /* Update ABR/ASBR routing table */ 2015-04-23 20:31 GMT+08:00 Federico Sauter <[email protected]>: > Greetings, > > I think for quite a few operations it would be sufficient to implement an > fpm daemon (see > http://www.nongnu.org/quagga/docs/docs-info.html#zebra-FIB-push-interface) > in order to learn what routing modifications are being done and act > accordingly. > > If you need to modify the code within quagga itself, look for the source > code of the zebra daemon. The lowest-level system callsa are done in > kernel_netlink.c. > > I hope that helps! > > Kind regards, > > > Federico Sauter > Senior Firmware Programmer > -- > Innominate Security Technologies AG > Rudower Chaussee 13 | 12489 Berlin | Germany > tel: +49 30 921028-210 | fax: +49 30 921028-020 > www.innominate.com | www.twitter.com/mGuardcom > > Register Court: AG Charlottenburg, HR B 81603 > Management Board: Dirk Seewald | Chairman of the Supervisory Board: > Christoph Leifer > > > On 04/23/2015 10:26 AM, ocean shi wrote: > >> Hi~ >> Everytime when Quagga modifies the route table, i hope to do something >> with my own codes. So i want to know where the codes that modify the >> route talble are so that i could add some codes into that code file. >> Anyone could help me? Or is there any document that explains this? >> Thx~ >> >> >> _______________________________________________ >> Quagga-dev mailing list >> [email protected] >> https://lists.quagga.net/mailman/listinfo/quagga-dev >> >> > _______________________________________________ > Quagga-dev mailing list > [email protected] > https://lists.quagga.net/mailman/listinfo/quagga-dev >
_______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
