[riot-notifications] [RIOT] gnrc_ndp_host: Initial import of host behavior of router discovery (#3746)

Oleg Hahm notifications at github.com
Wed Sep 2 16:59:41 CEST 2015


> +    }
> +    /* set router life timer */
> +    if (rtr_adv->ltime.u16 != 0) {
> +        vtimer_remove(&nc_entry->rtr_timeout);
> +        vtimer_set_msg(&nc_entry->rtr_timeout,
> +                       timex_set(byteorder_ntohs(rtr_adv->ltime), 0),
> +                       thread_getpid(), GNRC_NDP_MSG_RTR_TIMEOUT, nc_entry);
> +    }
> +    /* set current hop limit from message if available */
> +    if (rtr_adv->cur_hl != 0) {
> +        if_entry->cur_hl = rtr_adv->cur_hl;
> +    }
> +    /* set flags from message */
> +    if_entry->flags &= ~GNRC_IPV6_NETIF_FLAGS_RTR_ADV_MASK;
> +    if_entry->flags |= ((rtr_adv->flags << GNRC_IPV6_NETIF_FLAGS_RTR_ADV_POS) &
> +                        (GNRC_IPV6_NETIF_FLAGS_RTR_ADV_MASK));

nitpicking, but I think you overdid with parens here. ;)

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


More information about the notifications mailing list