Add (dangerous) feature : use layer 2 acks instead of NUD in the IPv6 layer.

(Decrease packet numbers but dangerous if neighbors change their ips (not a problem in standard RPL with EUI-64 based addresses))
This commit is contained in:
Vincent Brillault 2011-07-11 14:19:14 +02:00
parent 6ddd0bb190
commit 2ac91d53b5
3 changed files with 46 additions and 0 deletions

View file

@ -369,6 +369,24 @@ uip_ds6_nbr_lookup(uip_ipaddr_t *ipaddr)
return NULL;
}
/*---------------------------------------------------------------------------*/
uip_ds6_nbr_t *
uip_ds6_nbr_ll_lookup(uip_lladdr_t *lladdr)
{
uip_ds6_nbr_t *fin;
for( locnbr=uip_ds6_nbr_cache, fin=locnbr + UIP_DS6_NBR_NB;
locnbr<fin;
++locnbr) {
if(locnbr->isused) {
if(!memcmp(lladdr,&locnbr->lladdr,UIP_LLADDR_LEN)) {
return locnbr;
}
}
}
return NULL;
}
/*---------------------------------------------------------------------------*/
uip_ds6_defrt_t *
uip_ds6_defrt_add(uip_ipaddr_t *ipaddr, unsigned long interval)