-
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
ng_rpl: port to the new network stack #3050
Conversation
I advice to use |
(for the router behavior of NDP you need #3049 of course) |
@@ -58,6 +58,9 @@ typedef enum { | |||
#ifdef MODULE_NG_ICMPV6 | |||
NG_NETTYPE_ICMPV6, /**< Protocol is ICMPv6 */ | |||
#endif | |||
#ifdef MODULE_NG_RPL | |||
NG_NETTYPE_RPL_CTRL, /**< Protocol is ICMPv6, RPL sub-type */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would prefer something like NG_NETTYPE_ICMP_RPL
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't need a NG_NETTYPE
at all oO let me review ths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not even used ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Demux is done in https://github.com/RIOT-OS/RIOT/pull/3050/files#diff-a263cf517da28750259527ba0aab62dfR122 so everything is as it should be :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, seems like a left-over from my previous attempt.. will address all your comments soon
/* if the bytes-1 equals we check the bits of the lowest byte */ | ||
uint8_t bitmask = 0x00; | ||
/* get a bitmask for the trailing 0b */ | ||
for( uint8_t j = 0; j < 8; ++j ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again wrong prefix incrementor?
I think we're finally ready to go: ACK and go as soon as Travis is green. |
travis is not happy, because I modified |
I don't like merging this without any Travis-enabled build with |
@gebart good catch. I will add |
ACK, let's wait for Travis |
Spark-Core needs black-listing. |
cppcheck complains:
|
Needs a rebase, too. |
rebased and eliminated cppcheck warnings |
travis approves |
Let me run one final test. |
Test runs fine, ACK holds - wanna hit the button yourself? |
I am sitting in the bus right now. Merge at will. Otherwise I merge when I
|
ng_rpl: port to the new network stack
Congrats @cgundogan ! |
Eureka!
|
✨ \o/ ✨ |
nice! |
bäääm, you did it sir 🎆 |
Depends on: #2783 and #2818This PR introduces RPL for the new network stack. I used the old RPL implementation as a blueprint and copied code blocks, which could be reused.
For a better internal dodag management I made use of
utlist.h
(linked list).Thus, it was quite easy to adopt the code to support multiple dodags and/or instances.
Furthermore, I changed the parsing of control packets. The old implementation did use a mediary data structure to parse all the information and then assign them to the internal dodag structure. I completely removed this mediary step and operate directly on the internal data structures.
While adopting the code, I found small discrepancies betwen the implementation and the RFC. I tried to correct them to the best of my knowledge.
This port is far from being complete, as I only included the
Storing
mode of operationMissing things:
I did all my testing with the
ng_nativenet
implementation by rebasing this to the branch of @kaspar030 #2776 and then use the test application in./tests/driver_netdev_eth/
.There I modifid the
Makefile
to includeng_ipv6_default
andng_rpl
.When starting two to four nodes (tap0..tap3), I first have to add an IPv6 address to the nodes and can then initialize RPL on the given interface.
Please make sure, that you use the same prefix part for all nodes.
On one node I create a DODAG by issuing:
rpl root 1 2001:db8::x
, where1
is the instance id by choice and2001:db8::x
the dodag id. Note that you should not use the prefix notation (*/xx
) like I did forifconfig
here.rpl
shows some basic information about the dodags andrpl help
will display some more commands, like deleting/adding dodags, starting/stoping trickle timers, sending DIS etc.I would like to test this on some iotlab m3s, but I don't know how. Could somebody point me to a test/example application, which I can use as a baseline?
@OlegHahm @BytesGalore @authmillenon @gebart @Lotterleben @haukepetersen @emmanuelsearch and basically everyone else: please help me by reviewing this code of a Kraken...
@authmillenon you should especially look into the communication with the network layer part, because I do not know if I implemented it the right way - it works though.