update to new version
This commit is contained in:
parent
7d8254bd81
commit
9bb1f01905
|
@ -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
|
||||
|
|
|
@ -312,7 +312,7 @@ request_prefix(void)
|
|||
uip_buf[1] = 'P';
|
||||
uip_len = 2;
|
||||
slip_send();
|
||||
uip_len = 0;
|
||||
uip_clear_buf();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue