gnrc_ipv6_nib: add prefix list component#7222
Conversation
0118125 to
f66942b
Compare
|
Rebased to current #7212 and no longer WIP |
f66942b to
51f65b9
Compare
51f65b9 to
18b216d
Compare
945f669 to
dd13a6e
Compare
dd13a6e to
46a4282
Compare
cb1fe80 to
7842670
Compare
|
Rebased to current master and current dependencies |
7842670 to
7c19572
Compare
57a08f0 to
eb8a53c
Compare
|
Rebased to current master. |
cgundogan
left a comment
There was a problem hiding this comment.
not much comments from my side here
sys/include/net/gnrc/ipv6/nib/pl.h
Outdated
| */ | ||
| typedef struct { | ||
| ipv6_addr_t pfx; /**< prefix */ | ||
| uint16_t pfx_len; /**< length of gnrc_ipv6_nib_pl_t::pfx in bits */ |
There was a problem hiding this comment.
For alignment reasons mainly, but can make it uint8_t (will result in the same size).
sys/include/net/gnrc/ipv6/nib/pl.h
Outdated
| * multicast address and its first @p pfx_len bits | ||
| * may not be 0. | ||
| * @param[in] pfx_len Length of @p pfx in bits. | ||
| * Condition 0 < @p pfx_len > 0 must hold. |
There was a problem hiding this comment.
that's a very weird condition (:
There was a problem hiding this comment.
Its not weird... it's just a weird way to say pfx_len > 0... Anyway, will remove one of the ends ^^
| uint32_t now; | ||
| _nib_offl_entry_t *dst = _nib_offl_add(NULL, iface, pfx, pfx_len, _PL); | ||
|
|
||
| if (dst == NULL) { |
There was a problem hiding this comment.
Never said I'm strictly against them :P But for gnrc_ndp it was pointed out by @OlegHahm so I kept it in gnrc_ndp2 ;-).
| if (dst == NULL) { | ||
| return NULL; | ||
| } | ||
| assert((valid_ltime >= pref_ltime)); |
There was a problem hiding this comment.
remove one level of parens, please
| pref_ltime += now; | ||
| } | ||
| if (valid_ltime != UINT32_MAX) { | ||
| if (((valid_ltime + now) == UINT32_MAX) && (now != 0)) { |
There was a problem hiding this comment.
no need to check nor now != 0, because it cannot be 0 due to the check above (valid_ltime != UINT32_MAX).
|
Addressed @cgundogan's and @riot-ci's comments. |
|
that was a quick one (: pleas squash! |
20e5e0e to
32746b4
Compare
|
Squashed |
|
GO! |
Another step in the grant NIB journey. Implements the prefix list view of the NIB (see NDP model). This is aiming to remove the ambiguity of assigned addresses to an interface and the prefix list, currently present in the NIB (and also adds the capability to forward based on the prefix list once implemented, see #4730).
Currently WIP. Still missing:Depends on #7212.This PR is part of the network layer remodelling effort:
