net: add full CoRE Resource Directory endpoint implementation#7428
net: add full CoRE Resource Directory endpoint implementation#7428miri64 merged 6 commits intoRIOT-OS:masterfrom
Conversation
PeterKietzmann
left a comment
There was a problem hiding this comment.
I do not intend to provide a full review but rather focus on testing. In a first step I analyzed sent packets via rdcli reg command on native an on a samr21-xpro which looks "good" at first sight, comparing to the RD draft. This applies for both provided applications. With examples/coap_rdcli it appeared that ping6 raises a failed assertion. Not quite sure I got the correct assertion but most likely it is one of these. Is there a GNRC relevant thread without a message queue?
Could you add a description about how to set up an RD server for easier testing of the actual protocol?
examples/coap_rdcli/README.md
Outdated
| redefine `RDCLI_SERVER_ADDR` and `RDCLI_SERVER_PORT`, e.g.: | ||
| ``` | ||
| CFLAGS="-DRDCLI_SERVER_ADDR=IPV6_ADDR_ALL_ROUTERS_LINK_LOCAL" make all | ||
| ``` |
There was a problem hiding this comment.
Currently this README equals that of the other application. Would be great to have a short introduction what the difference is.
There was a problem hiding this comment.
This is because I have not written an readme for this example, yet :-)
sys/shell/commands/sc_rdcli.c
Outdated
| rdcli_dump_status(); | ||
| } | ||
| else { | ||
| printf("usage: %s <reg [addr [port]]|up|rem|info>\n", argv[0]); |
There was a problem hiding this comment.
I would prefer update as command. up reminds me of initiating something.
| sock_udp_ep_t remote; | ||
| } rd_entry_t; | ||
|
|
||
| static rd_entry_t active_rd = { 0 }; |
There was a problem hiding this comment.
I'm using a rather old compiler. arm-none-eabi-gcc 4.9.3 complains error: missing braces around initializer
| /* build CoAP request packet */ | ||
| int res = gcoap_req_init(&pkt, buf, sizeof(buf), COAP_METHOD_POST, "/rd"); | ||
| if (res < 0) { | ||
| goto rdcli_register; |
There was a problem hiding this comment.
Didn't we decide against "goto" some time ago?
There was a problem hiding this comment.
AFAIK not in general, and though I am still not a huge fan of this, I think for certain error handling cases it can make the code more readable, if used with caution...
Yepp, thats the missing message queue (once more)... Will fix.
quick version: compile nanocoap and run the Alternative: You could also use the javscript RD Pekka wrote in Dagstuhl (https://github.com/Ell-i/coap-rd):
|
|
just as update: currently waiting on #8920 |
b46fc94 to
e56292b
Compare
|
finally, no more dependencies to wait for. Heavily rebased, and partly reworked this PR, now it is ready for (final) review and testing. I tested this mainly by registering it with the RD provided by |
e56292b to
e1e1e37
Compare
|
rebased and fixed some issues that Murdock pointed out. |
|
@bergzand @PeterKietzmann anyone available to test and review this PR?! |
|
Unfortunately I won't find time for this soon. @pokgak are you familiar with the idea of "Resource Directory"? Isn't this somewhat interesting for you? |
|
Perfect timing. Currently reading on this topic to use it in my project. Will test it next week and provide feedback. |
|
@pokgak awesome to hear, looking forward to your feedback! |
|
@haukepetersen I hope to have some time for a review next week somewhere. |
|
Tested this using native with PORT=tap0, aiocoap-rd bind to global address of tapbr0 and Wireshark listens on tap0. Here is what I've tested:
Feedback:
|
|
ACK from my side =) |
Go ahead, I didn't have time to look at this yet unfortunately :( |
e36d109 to
55a7936
Compare
|
rebased and squased. |
|
blacklisted boards with insufficient memory |
71b658c to
0bb69df
Compare
|
fixed a parenthesis issues that clang did not like... |
0bb69df to
cba288b
Compare
|
more blacklisting... |
|
as far as I see this PR has chances to be merged for the Release, right? |
miri64
left a comment
There was a problem hiding this comment.
I scanned through the code and didn't find anything obviously wrong with it and moreover @pokgak gave this a review as well. Regarding testing I know (and @chrysn probably can confirm) that this implementation already went through 2 plugtests against other implementations (also @haukepetersen gave me a little demo offline as well).
Let's get this into the release!
ACK.
|
Codacy has a problem, but I don't see what it is (it just tells "1 warning" but not showing the actual warning). To my knowledge however, Murdock is still the canonical check (and also the only required one). |
|
So go! |
|
Finally :-) Thanks everyone! |
|
Nice, Hauke! I just updated the Standards Based Application Development wiki page so hopefully the implementation and apps will be easy to find. |
|
But we still should work on aligning naming with the RFC. |
|
awesome! Thanks to everyone involved! 🎉 |
done: #10163 |
Waiting on and rebased on a couple of PRs, e.g.
#7402,#7406,#7407,#7408This PR adds complete CoRE Resource Directory (RD) functionality for RIOT. The code should be fully functional and is basically done, though it needs some more documentation and some cleanups (and proper squashing of course). Will take that on once all the dependencies are merged...