1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc: adapt for gnrc_ndp_host

This commit is contained in:
Martine Lenders 2015-08-31 14:31:36 +02:00 committed by Martine Lenders
parent b033ff590b
commit c367477d44
3 changed files with 15 additions and 2 deletions

View File

@ -92,9 +92,11 @@ void gnrc_icmpv6_demux(kernel_pid_t iface, gnrc_pktsnip_t *pkt)
/* TODO */
break;
#ifdef MODULE_GNRC_NDP
case ICMPV6_RTR_ADV:
DEBUG("icmpv6: router advertisement received\n");
/* TODO */
gnrc_ndp_rtr_adv_handle(iface, pkt, ipv6->data, (ndp_rtr_adv_t *)hdr,
icmpv6->size);
break;
case ICMPV6_NBR_SOL:
@ -108,6 +110,7 @@ void gnrc_icmpv6_demux(kernel_pid_t iface, gnrc_pktsnip_t *pkt)
gnrc_ndp_nbr_adv_handle(iface, pkt, ipv6->data, (ndp_nbr_adv_t *)hdr,
icmpv6->size);
break;
#endif
case ICMPV6_REDIRECT:
DEBUG("icmpv6: redirect message received\n");

View File

@ -190,6 +190,7 @@ static void *_event_loop(void *args)
msg_reply(&msg, &reply);
break;
#ifdef MODULE_GNRC_NDP
case GNRC_NDP_MSG_RTR_TIMEOUT:
DEBUG("ipv6: Router timeout received\n");
((gnrc_ipv6_nc_t *)msg.content.ptr)->flags &= ~GNRC_IPV6_NC_IS_ROUTER;
@ -201,7 +202,6 @@ static void *_event_loop(void *args)
(ipv6_addr_t *)msg.content.ptr);
break;
#ifdef MODULE_GNRC_NDP
case GNRC_NDP_MSG_NBR_SOL_RETRANS:
DEBUG("ipv6: Neigbor solicitation retransmission timer event received\n");
gnrc_ndp_retrans_nbr_sol((gnrc_ipv6_nc_t *)msg.content.ptr);
@ -212,6 +212,12 @@ static void *_event_loop(void *args)
gnrc_ndp_state_timeout((gnrc_ipv6_nc_t *)msg.content.ptr);
break;
#endif
#ifdef MODULE_GNRC_NDP_HOST
case GNRC_NDP_MSG_RTR_SOL_RETRANS:
DEBUG("ipv6: Router solicitation retransmission event received\n");
gnrc_ndp_host_retrans_rtr_sol((gnrc_ipv6_netif_t *)msg.content.ptr);
break;
#endif
default:
break;

View File

@ -763,6 +763,10 @@ void gnrc_ipv6_netif_init_by_dev(void)
}
mutex_unlock(&ipv6_if->mutex);
#ifdef MODULE_GNRC_NDP_HOST
/* start periodic router solicitations */
gnrc_ndp_host_init(ipv6_if);
#endif
}
}