diff --git a/examples/osd/rpl-border-router/Makefile b/examples/osd/rpl-border-router/Makefile index f296b0bb3..ce90a4eac 100644 --- a/examples/osd/rpl-border-router/Makefile +++ b/examples/osd/rpl-border-router/Makefile @@ -3,9 +3,6 @@ all: $(CONTIKI_PROJECT) CONTIKI=../../.. -UIP_CONF_IPV6=1 -CFLAGS+= -DUIP_CONF_IPV6_RPL - #linker optimizations SMALL=1 @@ -26,10 +23,12 @@ PROJECT_SOURCEFILES += slip-bridge.c WITH_WEBSERVER=1 ifeq ($(WITH_WEBSERVER),1) +CFLAGS += -DUIP_CONF_TCP=1 CFLAGS += -DWEBSERVER=1 PROJECT_SOURCEFILES += httpd-simple.c else ifneq ($(WITH_WEBSERVER), 0) APPS += $(WITH_WEBSERVER) +CFLAGS += -DUIP_CONF_TCP=1 CFLAGS += -DWEBSERVER=2 endif @@ -37,6 +36,7 @@ ifeq ($(PREFIX),) PREFIX = aaaa::1/64 endif +CONTIKI_WITH_IPV6 = 1 include $(CONTIKI)/Makefile.include $(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c diff --git a/examples/osd/rpl-border-router/border-router.c b/examples/osd/rpl-border-router/border-router.c index a3dcd2a09..5e5717d90 100644 --- a/examples/osd/rpl-border-router/border-router.c +++ b/examples/osd/rpl-border-router/border-router.c @@ -312,7 +312,7 @@ request_prefix(void) uip_buf[1] = 'P'; uip_len = 2; slip_send(); - uip_len = 0; + uip_clear_buf(); } /*---------------------------------------------------------------------------*/ void diff --git a/examples/osd/rpl-border-router/slip-bridge.c b/examples/osd/rpl-border-router/slip-bridge.c index 52b4a4060..62940d5ef 100644 --- a/examples/osd/rpl-border-router/slip-bridge.c +++ b/examples/osd/rpl-border-router/slip-bridge.c @@ -59,7 +59,7 @@ slip_input_callback(void) // PRINTF("SIN: %u\n", uip_len); if(uip_buf[0] == '!') { PRINTF("Got configuration message of type %c\n", uip_buf[1]); - uip_len = 0; + uip_clear_buf(); if(uip_buf[1] == 'P') { uip_ipaddr_t prefix; /* Here we set a prefix !!! */ @@ -85,7 +85,7 @@ slip_input_callback(void) slip_send(); } - uip_len = 0; + uip_clear_buf(); } /* Save the last sender received over SLIP to avoid bouncing the packet back if no route is found */ @@ -100,7 +100,7 @@ init(void) slip_set_input_callback(slip_input_callback); } /*---------------------------------------------------------------------------*/ -static void +static int output(void) { if(uip_ipaddr_cmp(&last_sender, &UIP_IP_BUF->srcipaddr)) { @@ -115,6 +115,7 @@ output(void) // PRINTF("SUT: %u\n", uip_len); slip_send(); } + return 0; } /*---------------------------------------------------------------------------*/