Skip to content

gnrc_ipv6_nib: provide component to handle ABRO#7270

Merged
cgundogan merged 2 commits intoRIOT-OS:masterfrom
miri64:gnrc_ipv6_nib/feat/abr-component
Oct 6, 2017
Merged

gnrc_ipv6_nib: provide component to handle ABRO#7270
cgundogan merged 2 commits intoRIOT-OS:masterfrom
miri64:gnrc_ipv6_nib/feat/abr-component

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Jun 29, 2017

This adds a functionality to handle border router information for multihop prefix and 6LoWPAN context dissemination.

Depends on #7212.

This PR is part of the network layer remodelling effort:
PR dependencies

@miri64 miri64 added GNRC Area: network Area: Networking State: waiting for other PR State: The PR requires another PR to be merged first labels Jun 29, 2017
@miri64 miri64 requested a review from cgundogan June 29, 2017 10:21
miri64 added a commit to miri64/RIOT that referenced this pull request Jun 29, 2017
@aabadie aabadie modified the milestone: Release 2017.10 Jun 30, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request Jun 30, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request Jun 30, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request Jul 4, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request Jul 5, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request Aug 11, 2017
@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/abr-component branch from d6d65ac to dc6517e Compare August 21, 2017 10:32
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 21, 2017

Rebased to current master and current dependencies

@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/abr-component branch from dc6517e to b5a621c Compare August 21, 2017 10:39
@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/abr-component branch from b5a621c to c4b3d7e Compare October 6, 2017 10:31
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 6, 2017

Rebased to current master

@miri64 miri64 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed State: waiting for other PR State: The PR requires another PR to be merged first labels Oct 6, 2017
Copy link
Copy Markdown
Member

@cgundogan cgundogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not much to say here, also

extern "C" {
#endif

#if (GNRC_IPV6_NIB_CONF_6LBR && GNRC_IPV6_NIB_CONF_MULTIHOP_P6C) || defined(DOXYGEN)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many white spaces for my taste :P

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#if(GNRC_IPV6_NIB_CONF_6LBR&&GNRC_IPV6_NIB_CONF_MULTIHOP_P6C)||defined(DOXYGEN)

better?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(just joking, will fix)

unsigned idx = nib_offl - _dsts;
if (idx < GNRC_IPV6_NIB_CONF_MULTIHOP_P6C) {
for (_nib_abr_entry_t *abr = _abrs;
abr < (_abrs + GNRC_IPV6_NIB_ABR_NUMOF);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar to _in_dsts() you could use _in_abrs() here.

DEBUG("nib: Removing border router %s\n", ipv6_addr_to_str(addr_str, addr,
sizeof(addr_str)));
for (_nib_abr_entry_t *abr = _abrs;
abr < (_abrs + GNRC_IPV6_NIB_ABR_NUMOF);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_in_abrs()?

}
}

void _nib_abr_add_pfx(_nib_abr_entry_t *abr, _nib_offl_entry_t *offl)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

offl param can be const

_nib_abr_entry_t *_nib_abr_iter(const _nib_abr_entry_t *last)
{
for (const _nib_abr_entry_t *abr = (last) ? (last + 1) : _abrs;
abr < (_abrs + GNRC_IPV6_NIB_ABR_NUMOF);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in_abrs()?

* @param[in] abr The border router.
* @param[in] offl The prefix to add.
*/
void _nib_abr_add_pfx(_nib_abr_entry_t *abr, _nib_offl_entry_t *offl);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const for offl, maybe for abr also?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abr is manipulated by this function, offl can do.

* @return NULL, if @p last is the last prefix of @p abr or if @p last
* wasn't in NIB (and != NULL).
*/
_nib_offl_entry_t *_nib_abr_iter_pfx(_nib_abr_entry_t *abr,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const for last ?

#include "_nib-internal.h"

#if GNRC_IPV6_NIB_CONF_6LBR && GNRC_IPV6_NIB_CONF_MULTIHOP_P6C
int gnrc_ipv6_nib_abr_add(ipv6_addr_t *addr)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/abr-component branch from c4b3d7e to 5d1dca9 Compare October 6, 2017 14:46
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 6, 2017

First of all: rebased to current master, now addressing your comments

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 6, 2017

Addressed comments and also added doc and tests for public functions ;-)

@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/abr-component branch from fc619d4 to 9280658 Compare October 6, 2017 15:24
@miri64 miri64 requested a review from cgundogan October 6, 2017 15:29
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 6, 2017

Oops, forgot the _in_abrs() stuff.

@cgundogan
Copy link
Copy Markdown
Member

@miri64 thanks for addressing my comments. It's safe to squash now!

@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/abr-component branch from bab590f to 74a87a4 Compare October 6, 2017 20:03
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 6, 2017

Squashed.

@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/abr-component branch from 74a87a4 to 361dc14 Compare October 6, 2017 20:09
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Oct 6, 2017

Fixed and squashed immediately errors reported by Murdock.

@cgundogan
Copy link
Copy Markdown
Member

all lights are on green!

@cgundogan cgundogan merged commit 7af0f91 into RIOT-OS:master Oct 6, 2017
@miri64 miri64 deleted the gnrc_ipv6_nib/feat/abr-component branch October 6, 2017 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants