[Olsr-dev] a question about the 2 ways to get system interface information in the subsystems

work_xl (spam-protected)
Sun Sep 13 09:29:32 CEST 2015


when I read about the introduces to oonf_interface and os_interface subsystems,I thought that the os_intf would connect to the os,and the oonf_intf would get information about interface  only though os_intf.Then I read the code and find sth puzzled.
The os_interface_linux.c ,that is the code file of os_interface,has two os_interface_listener_add() and os_interface_listener_remove() functions which use the rtnetlink way to subscribe the interface-change event.But no plugins or subsystems use these two api.On the other hand,the oonf_interface.c uses its own way ,the oonf_interface_add_listener() and oonf_interface_remove_listener() functions which check the interface information periodicly with os_interface_update().Many upper-layer plugins use oonf 's api.
This make me puzzled.I thought one api for one function would be more graceful. Is anyone kind enough to explain this for me plz? Thanks very much.^^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20150913/a164841e/attachment.html>


More information about the Olsr-dev mailing list