Skip to content
Snippets Groups Projects
Commit c367477d authored by Martine Lenders's avatar Martine Lenders
Browse files

gnrc: adapt for gnrc_ndp_host

parent b033ff59
No related branches found
No related tags found
No related merge requests found
...@@ -92,9 +92,11 @@ void gnrc_icmpv6_demux(kernel_pid_t iface, gnrc_pktsnip_t *pkt) ...@@ -92,9 +92,11 @@ void gnrc_icmpv6_demux(kernel_pid_t iface, gnrc_pktsnip_t *pkt)
/* TODO */ /* TODO */
break; break;
#ifdef MODULE_GNRC_NDP
case ICMPV6_RTR_ADV: case ICMPV6_RTR_ADV:
DEBUG("icmpv6: router advertisement received\n"); DEBUG("icmpv6: router advertisement received\n");
/* TODO */ gnrc_ndp_rtr_adv_handle(iface, pkt, ipv6->data, (ndp_rtr_adv_t *)hdr,
icmpv6->size);
break; break;
case ICMPV6_NBR_SOL: case ICMPV6_NBR_SOL:
...@@ -108,6 +110,7 @@ void gnrc_icmpv6_demux(kernel_pid_t iface, gnrc_pktsnip_t *pkt) ...@@ -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, gnrc_ndp_nbr_adv_handle(iface, pkt, ipv6->data, (ndp_nbr_adv_t *)hdr,
icmpv6->size); icmpv6->size);
break; break;
#endif
case ICMPV6_REDIRECT: case ICMPV6_REDIRECT:
DEBUG("icmpv6: redirect message received\n"); DEBUG("icmpv6: redirect message received\n");
......
...@@ -190,6 +190,7 @@ static void *_event_loop(void *args) ...@@ -190,6 +190,7 @@ static void *_event_loop(void *args)
msg_reply(&msg, &reply); msg_reply(&msg, &reply);
break; break;
#ifdef MODULE_GNRC_NDP
case GNRC_NDP_MSG_RTR_TIMEOUT: case GNRC_NDP_MSG_RTR_TIMEOUT:
DEBUG("ipv6: Router timeout received\n"); DEBUG("ipv6: Router timeout received\n");
((gnrc_ipv6_nc_t *)msg.content.ptr)->flags &= ~GNRC_IPV6_NC_IS_ROUTER; ((gnrc_ipv6_nc_t *)msg.content.ptr)->flags &= ~GNRC_IPV6_NC_IS_ROUTER;
...@@ -201,7 +202,6 @@ static void *_event_loop(void *args) ...@@ -201,7 +202,6 @@ static void *_event_loop(void *args)
(ipv6_addr_t *)msg.content.ptr); (ipv6_addr_t *)msg.content.ptr);
break; break;
#ifdef MODULE_GNRC_NDP
case GNRC_NDP_MSG_NBR_SOL_RETRANS: case GNRC_NDP_MSG_NBR_SOL_RETRANS:
DEBUG("ipv6: Neigbor solicitation retransmission timer event received\n"); DEBUG("ipv6: Neigbor solicitation retransmission timer event received\n");
gnrc_ndp_retrans_nbr_sol((gnrc_ipv6_nc_t *)msg.content.ptr); gnrc_ndp_retrans_nbr_sol((gnrc_ipv6_nc_t *)msg.content.ptr);
...@@ -212,6 +212,12 @@ static void *_event_loop(void *args) ...@@ -212,6 +212,12 @@ static void *_event_loop(void *args)
gnrc_ndp_state_timeout((gnrc_ipv6_nc_t *)msg.content.ptr); gnrc_ndp_state_timeout((gnrc_ipv6_nc_t *)msg.content.ptr);
break; break;
#endif #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: default:
break; break;
......
...@@ -763,6 +763,10 @@ void gnrc_ipv6_netif_init_by_dev(void) ...@@ -763,6 +763,10 @@ void gnrc_ipv6_netif_init_by_dev(void)
} }
mutex_unlock(&ipv6_if->mutex); mutex_unlock(&ipv6_if->mutex);
#ifdef MODULE_GNRC_NDP_HOST
/* start periodic router solicitations */
gnrc_ndp_host_init(ipv6_if);
#endif
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment