mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #4123 from cgundogan/pr/nc/xtimer_rtr_timeout
nc: user xtimer for gnrc_ipv6_nc_t::rtr_timeout
This commit is contained in:
commit
2065537368
@ -128,7 +128,8 @@ typedef struct {
|
||||
uint8_t l2_addr_len; /**< Length of gnrc_ipv6_nc_t::l2_addr */
|
||||
uint8_t flags; /**< Flags as defined above */
|
||||
kernel_pid_t iface; /**< PID to the interface where the neighbor is */
|
||||
vtimer_t rtr_timeout; /**< timeout timer for router flag */
|
||||
xtimer_t rtr_timeout; /**< timeout timer for router flag */
|
||||
msg_t rtr_timeout_msg; /**< msg_t for gnrc_ipv6_nc_t::rtr_timeout */
|
||||
|
||||
/**
|
||||
* @brief (Re)Transmission timer for neighbor solicitations of this entry and
|
||||
|
@ -133,6 +133,9 @@ gnrc_ipv6_nc_t *gnrc_ipv6_nc_add(kernel_pid_t iface, const ipv6_addr_t *ipv6_add
|
||||
free_entry->type_timeout_msg.content.ptr = (char *) free_entry;
|
||||
#endif
|
||||
|
||||
free_entry->rtr_timeout_msg.type = GNRC_NDP_MSG_RTR_TIMEOUT;
|
||||
free_entry->rtr_timeout_msg.content.ptr = (char *) free_entry;
|
||||
|
||||
return free_entry;
|
||||
}
|
||||
|
||||
|
@ -518,9 +518,8 @@ void gnrc_ndp_rtr_adv_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt, ipv6_hdr_t
|
||||
#ifdef MODULE_GNRC_SIXLOWPAN_ND
|
||||
next_rtr_sol = ltime;
|
||||
#endif
|
||||
vtimer_remove(&nc_entry->rtr_timeout);
|
||||
vtimer_set_msg(&nc_entry->rtr_timeout, timex_set(ltime, 0),
|
||||
thread_getpid(), GNRC_NDP_MSG_RTR_TIMEOUT, nc_entry);
|
||||
xtimer_set_msg(&nc_entry->rtr_timeout, (ltime * SEC_IN_USEC),
|
||||
&nc_entry->rtr_timeout_msg, thread_getpid());
|
||||
}
|
||||
/* set current hop limit from message if available */
|
||||
if (rtr_adv->cur_hl != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user