[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:33:07 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 */

Then how do we get the correct interface PID here? The link-layer addresses are most likely not in the neighbor cache, because that is where RFC 6775 tries to save memory (by not adding anything to the neighbor cache except routers), code complexity (by keeping it as simple as possible) and energy (by not sending multicast/broadcast for every neighbor, just for the routers) for the supposedly weaker hosts.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3748/files#r38915094
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150908/4ddda6a0/attachment.html>


More information about the notifications mailing list