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:
Simon Duquennoy 2013-07-02 15:20:21 +02:00
parent 1f38348cf9
commit 0e81b91fa6

View file

@ -204,6 +204,15 @@ uip_ds6_periodic(void)
locnbr++) {
if(locnbr->isused) {
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:
if(locnbr->nscount >= UIP_ND6_MAX_MULTICAST_SOLICIT) {
uip_ds6_nbr_rm(locnbr);
@ -214,14 +223,6 @@ uip_ds6_periodic(void)
stimer_set(&locnbr->sendns, uip_ds6_if.retrans_timer / 1000);
}
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:
if(stimer_expired(&locnbr->reachable)) {
locnbr->state = NBR_PROBE;
@ -246,6 +247,7 @@ uip_ds6_periodic(void)
stimer_set(&locnbr->sendns, uip_ds6_if.retrans_timer / 1000);
}
break;
#endif /* UIP_ND6_SEND_NA */
default:
break;
}