From 8994d8e0b53b57e10e3c2125d15c2426132ecbf5 Mon Sep 17 00:00:00 2001 From: bg- Date: Wed, 4 Apr 2007 11:52:29 +0000 Subject: [PATCH] * Make uaodv_rt_add return meaningful value. * uaodv_rt_lru() moves route to head of list. * Hop count is only 8 bits. --- core/net/uaodv-rt.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/net/uaodv-rt.h b/core/net/uaodv-rt.h index c1729874f..8e2bf94c6 100644 --- a/core/net/uaodv-rt.h +++ b/core/net/uaodv-rt.h @@ -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__ */