update to new version

This commit is contained in:
harald42 2016-02-25 13:25:24 +01:00
parent 7d8254bd81
commit 9bb1f01905
3 changed files with 8 additions and 7 deletions

View file

@ -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

View file

@ -312,7 +312,7 @@ request_prefix(void)
uip_buf[1] = 'P';
uip_len = 2;
slip_send();
uip_len = 0;
uip_clear_buf();
}
/*---------------------------------------------------------------------------*/
void

View file

@ -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;
}
/*---------------------------------------------------------------------------*/