-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] add oonf_api to pkg #630
Conversation
@Lotterleben is this working for you? please check carefully for your use case. |
I think it makes sense to wait for the outcome of #576 before merging this. |
@mehlis seems to be working fine |
👍 to wait until #576 is discussed and merged |
rebased against #576 |
perhaps this is unrelated but: would it make sense to have a rfc5444 "service" running in its own thread. seems to me that olsr/aodv and nhdp need this parser. Is this library thread safe? What is its footprint in terms of stack usage? Does it use malloc/free? |
I wasn't able to build this. Can you provide an example application? master of https://github.com/benpicco/tiny_olsr2 seems to be not up-to-date. |
I will move tiny_olsr2 to |
The rfc5444 reader/writer is based on callback functions for each action, so it might be possible to switch this over to message passing, but then again the library is not thread safe (however the portions used don't keep any state on their own) so additional efforts would be required. And I don't think the overhead of having another thread would be justified, in the most common case you won't run olsr2 and aodv2 in parallel.
but calloc is used. After startup about 4k of |
The Makefile in
|
After correcting the RIOTBASE to
|
oops, missed that one - should work now. |
When I tried to compile des-testbed/RIOT-projects#98, I ran into the following errors: make complained that it couldn't find the oonf api:
After I copied all oonf files from
|
des-testbed/RIOT-projects#98 depends on #765 |
I know, that's why I made sure I checked it out in my RIOT folder before I tried to compile des-testbed/RIOT-projects#98. But you're right, this is not the right place for that comment (even though the double nesting of oonf_api/oonf_api struck me as odd). |
When I do
and
projects/olsr2 does build (the example project only calls USEMODULE for olsr2, |
Yup, when I do that, it builds on my computer as well. What I did was:
in
|
@benpicco Ping? I'm really interested in resolving this one... |
Umm, are you sure that If I use the current upstream master and do
and
it builds just fine. |
I'm pretty sure I did, but yup, with a clean slate it works for me too. Sorry about the fuss. |
Seems to be working fine, if anyone wants to review & merge ;) |
Added @benpicco to the Github RIOT developer team and assigned the issue to him. |
This adds OLSRs oonf_api as a RIOT package. oonf_api provides a rfc5444 reader/writer as well as utilities such as an avl tree, a flexible buffer, a double linked list as well as address abstraction (IPv4/Ipv6/MAC - not very necessary on RIOT) and string functions.
The package provides three modules, oonf_common, oonf_rfc5444 (depends on oonf_common) and cunit for unit tests.
This package pulls in the whole of oonf_api from git, but the majority of the code (OS abstraction, config framework, telnet and webserver, …) is neither required nor functional on RIOT, so it's ignored by the build system.
The only folders of interest are:
generate_makefiles.sh
)generate_makefiles.sh
)Usage is a bit cumbersome because of the include paths, as seen in https://github.com/benpicco/tiny_olsr2/blob/master/Makefile
Also, build order is important, modules that depend on this won't find includes unless the pkg is build, aka checked out and patched.
I'm welcome for suggestions on how to improve this.