[riot-notifications] [RIOT] gnrc_sixlowpan_nd: initial import of host behavior of 6LoWPAN-ND (#3748)
Martine Lenders
notifications at github.com
Tue Sep 8 13:40:43 CEST 2015
> + }
> +#endif
> + /* next hop determination according to: https://tools.ietf.org/html/rfc6775#section-5.6 */
> + if ((next_hop == NULL) && ipv6_addr_is_link_local(dst)) { /* prefix is "on-link" */
> + /* multicast is not handled here anyway so we don't need to check that */
> + next_hop = dst;
> + }
> + else if (next_hop == NULL) { /* prefix is off-link */
> + next_hop = gnrc_ndp_internal_default_router();
> + }
> +
> + /* address resolution of next_hop: https://tools.ietf.org/html/rfc6775#section-5.7 */
> + if (ipv6_addr_is_link_local(next_hop)) {
> + kernel_pid_t ifs[GNRC_NETIF_NUMOF];
> + size_t ifnum = gnrc_netif_get(ifs);
> + assert(ifnum == 1); /* 6LoWPAN hosts should only have one IEEE 802.15.4 interface */
@OlegHahm:
> Besides, checking a static precondition at runtime is inefficient and it seems also be done here inside a arbitrary function.
You are right, I remove that check and just assume it for the return value.
---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3748/files#r38915574
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150908/0d12490f/attachment-0001.html>
More information about the notifications
mailing list