openstack/03b-IPv6/icmpv6rp: some cleanups #524
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does some changes that isolate RPL concerns and remove some RPL dependencies in other parts of the code base.
If this makes sense I would in a next step abstract RPL so that the MAC layer does not have a hard dependency on it:
DaoSent
to enable sendingEB
, this could be aIsReachable
parameter, orEnableEB
rthat would be triggered by a highe layer, in this caseRPL
.icmpv6rpl_getMyDAGrank()
to an abstractedrank
, I though of maybe keeping this state inidmanager
, this rank is not a MAC concept though, so maybe neighbors would be a good place for it as well.PreferedParent
related functions so that they do not depend on RPL, abstracting it in a way that it point to a time source neighbor instead of a "prefered parent" (at least in the MAC layer). How this time source neighbor is abstracted or selected would be handled by the higher layer (RPL) in this case. This time source neighbor could be kept inneighbors.c
@TimothyClaeys @changtengfei I would be very interested in hearing your opinions on this.
For now the specific changes are:
icmpv6rpl.h
header when those functions are used to make the dependency expliciticmpv6rpl.c
namelydebugPrint_mtDagRank
andicmpv6rpl_getLinkMetric
DaoSent
variable withIsReachable
, I can remove this But my though with this functions was to abstract therequirement to send EB from RPL.