* Make uaodv_rt_add return meaningful value.

* uaodv_rt_lru() moves route to head of list.

* Hop count is only 8 bits.
This commit is contained in:
bg- 2007-04-04 11:52:29 +00:00
parent 1d7932c6b3
commit 8994d8e0b5

View File

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: uaodv-rt.h,v 1.1 2006/06/17 22:41:19 adamdunkels Exp $
* $Id: uaodv-rt.h,v 1.2 2007/04/04 11:52:29 bg- Exp $
*/
/**
@ -48,13 +48,16 @@ struct uaodv_rt_entry {
uip_ipaddr_t dest;
uip_ipaddr_t nexthop;
u32_t seqno;
u16_t hop_count;
u8_t hop_count;
u8_t unused;
};
int uaodv_rt_add(uip_ipaddr_t *dest, uip_ipaddr_t *nexthop,
u16_t hop_count, u32_t seqno);
struct uaodv_rt_entry *
uaodv_rt_add(uip_ipaddr_t *dest, uip_ipaddr_t *nexthop,
unsigned hop_count, u32_t seqno);
struct uaodv_rt_entry *uaodv_rt_lookup(uip_ipaddr_t *dest);
void uaodv_rt_remove(struct uaodv_rt_entry *e);
void uaodv_rt_lru(struct uaodv_rt_entry *e);
void uaodv_rt_flush_all(void);
#endif /* __UAODV_RT_H__ */