From 2c172bfd31420c4dceebff4f578d8814b320228a Mon Sep 17 00:00:00 2001 From: Harald Pichler Date: Mon, 14 Jan 2013 14:33:05 +0100 Subject: [PATCH] update to latest version --- .../osd/rpl-border-router/border-router.c | 60 +++++++++---------- examples/osd/rpl-border-router/httpd-simple.c | 1 - examples/osd/rpl-border-router/project-conf.h | 1 - examples/osd/rpl-border-router/slip-bridge.c | 1 - 4 files changed, 30 insertions(+), 33 deletions(-) diff --git a/examples/osd/rpl-border-router/border-router.c b/examples/osd/rpl-border-router/border-router.c index 3c3a60de5..9a40f84a1 100644 --- a/examples/osd/rpl-border-router/border-router.c +++ b/examples/osd/rpl-border-router/border-router.c @@ -57,7 +57,6 @@ uint16_t dag_id[] = {0x1111, 0x1100, 0, 0, 0, 0, 0, 0x0011}; extern uip_ds6_nbr_t uip_ds6_nbr_cache[]; -extern uip_ds6_route_t uip_ds6_routing_table[]; static uip_ipaddr_t prefix; static uint8_t prefix_set; @@ -149,6 +148,7 @@ static PT_THREAD(generate_routes(struct httpd_state *s)) { static int i; + static uip_ds6_route_t *r; #if BUF_USES_STACK char buf[256]; #endif @@ -220,45 +220,45 @@ PT_THREAD(generate_routes(struct httpd_state *s)) #else blen = 0; #endif - for(i = 0; i < UIP_DS6_ROUTE_NB; i++) { - if(uip_ds6_routing_table[i].isused) { + + for(r = uip_ds6_route_list_head(); r != NULL; r = list_item_next(r)) { + #if BUF_USES_STACK #if WEBSERVER_CONF_ROUTE_LINKS - ADD(""); - ipaddr_add(&uip_ds6_routing_table[i].ipaddr); - ADD(""); + ADD("ipaddr); + ADD("]/status.shtml>"); + ipaddr_add(&r->ipaddr); + ADD(""); #else - ipaddr_add(&uip_ds6_routing_table[i].ipaddr); + ipaddr_add(&r->ipaddr); #endif #else #if WEBSERVER_CONF_ROUTE_LINKS - ADD(""); - SEND_STRING(&s->sout, buf); //TODO: why tunslip6 needs an output here, wpcapslip does not - blen = 0; - ipaddr_add(&uip_ds6_routing_table[i].ipaddr); - ADD(""); + ADD("ipaddr); + ADD("]/status.shtml>"); + SEND_STRING(&s->sout, buf); //TODO: why tunslip6 needs an output here, wpcapslip does not + blen = 0; + ipaddr_add(&r->ipaddr); + ADD(""); #else - ipaddr_add(&uip_ds6_routing_table[i].ipaddr); + ipaddr_add(&r->ipaddr); #endif #endif - ADD("/%u (via ", uip_ds6_routing_table[i].length); - ipaddr_add(&uip_ds6_routing_table[i].nexthop); - if(1 || (uip_ds6_routing_table[i].state.lifetime < 600)) { - ADD(") %lus\n", uip_ds6_routing_table[i].state.lifetime); - } else { - ADD(")\n"); - } - SEND_STRING(&s->sout, buf); -#if BUF_USES_STACK - bufptr = buf; bufend = bufptr + sizeof(buf); -#else - blen = 0; -#endif + ADD("/%u (via ", r->length); + ipaddr_add(&r->nexthop); + if(1 || (r->state.lifetime < 600)) { + ADD(") %lus\n", r->state.lifetime); + } else { + ADD(")\n"); } + SEND_STRING(&s->sout, buf); +#if BUF_USES_STACK + bufptr = buf; bufend = bufptr + sizeof(buf); +#else + blen = 0; +#endif } ADD(""); diff --git a/examples/osd/rpl-border-router/httpd-simple.c b/examples/osd/rpl-border-router/httpd-simple.c index f34d5312a..115e54d45 100644 --- a/examples/osd/rpl-border-router/httpd-simple.c +++ b/examples/osd/rpl-border-router/httpd-simple.c @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: httpd-simple.c,v 1.5 2010/10/19 18:29:04 adamdunkels Exp $ */ /** diff --git a/examples/osd/rpl-border-router/project-conf.h b/examples/osd/rpl-border-router/project-conf.h index 863552544..e928a759f 100644 --- a/examples/osd/rpl-border-router/project-conf.h +++ b/examples/osd/rpl-border-router/project-conf.h @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: project-conf.h,v 1.1 2010/10/21 18:23:44 joxe Exp $ */ #ifndef __PROJECT_ROUTER_CONF_H__ diff --git a/examples/osd/rpl-border-router/slip-bridge.c b/examples/osd/rpl-border-router/slip-bridge.c index 3b4d26af7..c7d718501 100644 --- a/examples/osd/rpl-border-router/slip-bridge.c +++ b/examples/osd/rpl-border-router/slip-bridge.c @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: slip-bridge.c,v 1.6 2011/01/17 20:05:51 joxe Exp $ */ /**