-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gnrc_ipv6_nib: add neighbor cache component #6988
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
gnrc_ipv6_nib: add neighbor cache component #6988
Conversation
7080fa2
to
9148d06
Compare
5ba050a
to
84535e5
Compare
Rebased to current master and depending PRs. |
607e21f
to
b614563
Compare
Rebased and adapted to changes in #6325. Since this was a little bit fiddly I also squashed |
b614563
to
65ad5b5
Compare
Rebased to current master and #6767. |
memcpy(entry->l2addr, nib->l2addr, nib->l2addr_len); | ||
entry->l2addr_len = nib->l2addr_len; | ||
#endif | ||
*state = nib; |
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.
This can use _nib_nc_get()
, I know. Will port ASAP.
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.
Done.
* | ||
* @param[in] node On-link entry. | ||
* @param[out] nce External representation of the neighbor cache | ||
* representation. |
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.
Note to self: representation representation
Looks good since my last review. Please squash. |
976b835
to
40be23b
Compare
Squashed. |
GO! |
\o/ |
1 similar comment
\o/ |
|
||
DEBUG("nib: lookup ctx = %p, type = %u\n", (void *)ctx, type); | ||
while (event != NULL) { | ||
offset += event->event.offset; |
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.
Why is this adding up the offsets of all events up until the matching one?
What is this function doing?
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.
Because the offset of an event is referring to the event before, not the absolute offset.
offset += event->event.offset; | ||
if ((event->msg.type == type) && | ||
((ctx == NULL) || (event->msg.content.ptr == ctx))) { | ||
return offset; |
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.
From my naive understanding I would expect
return event->event.offset;
here
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.
That would just give an arbritrary offset to the event of the event that fires before event
.
Implements the neighbor cache component of the NIB (see NDP model), aimed to replace
gnrc_ipv6_nc
.Depends on
#6325(merged) and#6767(merged).This PR is part of the network layer remodelling effort:
