mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Simplify periodic ds6 neighbor processing in case NA/NS is disabled. Strips out uip_nd6_ns_output from the binary.
This commit is contained in:
parent
1f38348cf9
commit
0e81b91fa6
@ -204,6 +204,15 @@ uip_ds6_periodic(void)
|
|||||||
locnbr++) {
|
locnbr++) {
|
||||||
if(locnbr->isused) {
|
if(locnbr->isused) {
|
||||||
switch(locnbr->state) {
|
switch(locnbr->state) {
|
||||||
|
case NBR_REACHABLE:
|
||||||
|
if(stimer_expired(&locnbr->reachable)) {
|
||||||
|
PRINTF("REACHABLE: moving to STALE (");
|
||||||
|
PRINT6ADDR(&locnbr->ipaddr);
|
||||||
|
PRINTF(")\n");
|
||||||
|
locnbr->state = NBR_STALE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#if UIP_ND6_SEND_NA
|
||||||
case NBR_INCOMPLETE:
|
case NBR_INCOMPLETE:
|
||||||
if(locnbr->nscount >= UIP_ND6_MAX_MULTICAST_SOLICIT) {
|
if(locnbr->nscount >= UIP_ND6_MAX_MULTICAST_SOLICIT) {
|
||||||
uip_ds6_nbr_rm(locnbr);
|
uip_ds6_nbr_rm(locnbr);
|
||||||
@ -214,14 +223,6 @@ uip_ds6_periodic(void)
|
|||||||
stimer_set(&locnbr->sendns, uip_ds6_if.retrans_timer / 1000);
|
stimer_set(&locnbr->sendns, uip_ds6_if.retrans_timer / 1000);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NBR_REACHABLE:
|
|
||||||
if(stimer_expired(&locnbr->reachable)) {
|
|
||||||
PRINTF("REACHABLE: moving to STALE (");
|
|
||||||
PRINT6ADDR(&locnbr->ipaddr);
|
|
||||||
PRINTF(")\n");
|
|
||||||
locnbr->state = NBR_STALE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case NBR_DELAY:
|
case NBR_DELAY:
|
||||||
if(stimer_expired(&locnbr->reachable)) {
|
if(stimer_expired(&locnbr->reachable)) {
|
||||||
locnbr->state = NBR_PROBE;
|
locnbr->state = NBR_PROBE;
|
||||||
@ -246,6 +247,7 @@ uip_ds6_periodic(void)
|
|||||||
stimer_set(&locnbr->sendns, uip_ds6_if.retrans_timer / 1000);
|
stimer_set(&locnbr->sendns, uip_ds6_if.retrans_timer / 1000);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif /* UIP_ND6_SEND_NA */
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user