tcp mods From: Jon Smirl --- .gitignore | 7 +++ apps/ping6/ping6.c | 3 + apps/webserver/httpd-cgi.c | 2 + core/net/sicslowpan.c | 2 + core/net/uip-fw-drv.c | 2 - core/net/uip-nd6-io.c | 16 +++++- core/net/uip-nd6.c | 2 - core/net/uip-netif.c | 7 +-- core/net/uip.h | 39 +++++++++----- core/net/uip6.c | 2 - cpu/mc1322x/Makefile.mc1322x | 17 ++++-- cpu/mc1322x/clock.c | 15 +++++ cpu/mc1322x/dbg-io.c | 5 -- examples/ping-ipv6/example-ping6.c | 2 - examples/rime/Makefile | 6 +- examples/udp-receiver-ipv6/Makefile.target | 2 - examples/udp-sender-ipv6/Makefile.target | 2 - examples/webserver-ipv6/webserver6.c | 2 - platform/mc1322x/contiki-conf.h | 41 +++++++++++++++ platform/mc1322x/contiki-mc1322x-main.c | 78 +++++++++++++++++++++++++++- 20 files changed, 208 insertions(+), 44 deletions(-) diff --git a/.gitignore b/.gitignore index 65a6460..fffad20 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,14 @@ *.map *.png *.log +*.bin +*.map +*.png +*.log +*.elf +*.ihex obj_mc1322x symbols.* Makefile.target +doc/html diff --git a/apps/ping6/ping6.c b/apps/ping6/ping6.c index 4fdc16a..b76aed3 100644 --- a/apps/ping6/ping6.c +++ b/apps/ping6/ping6.c @@ -63,7 +63,8 @@ uip_ipaddr_t dest_addr; PROCESS(ping6_process, "PING6 process"); AUTOSTART_PROCESSES(&ping6_process); - + +#define scanf(a, b, ...) 0 /*---------------------------------------------------------------------------*/ static u8_t diff --git a/apps/webserver/httpd-cgi.c b/apps/webserver/httpd-cgi.c index d5acebf..096b991 100644 --- a/apps/webserver/httpd-cgi.c +++ b/apps/webserver/httpd-cgi.c @@ -52,6 +52,8 @@ #include "lib/petsciiconv.h" +//#define snprintf(format, args...) 0 + static struct httpd_cgi_call *calls = NULL; static const char closed[] = /* "CLOSED",*/ diff --git a/core/net/sicslowpan.c b/core/net/sicslowpan.c index 8f71a7a..c7d4b99 100644 --- a/core/net/sicslowpan.c +++ b/core/net/sicslowpan.c @@ -1132,6 +1132,7 @@ output(uip_lladdr_t *localdest) rimeaddr_t dest; +printf("output;\n"); /* init */ uncomp_hdr_len = 0; rime_hdr_len = 0; @@ -1230,6 +1231,7 @@ output(uip_lladdr_t *localdest) memcpy(rime_ptr + rime_hdr_len, (void *)UIP_IP_BUF + processed_ip_len, rime_payload_len); packetbuf_set_datalen(rime_payload_len + rime_hdr_len); +printf("output(&dest);\n"); send_packet(&dest); processed_ip_len += rime_payload_len; } diff --git a/core/net/uip-fw-drv.c b/core/net/uip-fw-drv.c index f51ecac..0265709 100644 --- a/core/net/uip-fw-drv.c +++ b/core/net/uip-fw-drv.c @@ -42,7 +42,7 @@ PROCESS_THREAD(uip_fw_process, ev, data) { PROCESS_BEGIN(); - tcpip_set_outputfunc(uip_fw_output); + //tcpip_set_outputfunc(uip_fw_output); PROCESS_WAIT_UNTIL(ev == PROCESS_EVENT_EXIT); diff --git a/core/net/uip-nd6-io.c b/core/net/uip-nd6-io.c index 16c1447..03ec916 100644 --- a/core/net/uip-nd6-io.c +++ b/core/net/uip-nd6-io.c @@ -75,7 +75,7 @@ /*------------------------------------------------------------------*/ -#define DEBUG 0 +#define DEBUG 1 #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) @@ -610,11 +610,17 @@ uip_nd6_io_rs_output(void) { UIP_IP_BUF->flow = 0; UIP_IP_BUF->proto = UIP_PROTO_ICMP6; UIP_IP_BUF->ttl = UIP_ND6_HOP_LIMIT; +printf("ttl 1 %d\n", UIP_IP_BUF->ttl); uip_create_linklocal_allrouters_mcast(&UIP_IP_BUF->destipaddr); +printf("ttl 2 %d %p %p\n", UIP_IP_BUF->ttl, &UIP_IP_BUF->ttl, &UIP_IP_BUF->srcipaddr); uip_netif_select_src(&UIP_IP_BUF->srcipaddr, &UIP_IP_BUF->destipaddr); +printf("ttl 3 %d\n", UIP_IP_BUF->ttl); UIP_ICMP_BUF->type = ICMP6_RS; +printf("ttl 4 %d\n", UIP_IP_BUF->ttl); UIP_ICMP_BUF->icode = 0; +printf("ttl 5 %d\n", UIP_IP_BUF->ttl); UIP_ND6_RS_BUF->reserved = 0; +printf("ttl 6 %d\n", UIP_IP_BUF->ttl); UIP_IP_BUF->len[0] = 0; /* length will not be more than 255 */ @@ -645,6 +651,14 @@ uip_nd6_io_rs_output(void) { PRINTF("from"); PRINT6ADDR(&UIP_IP_BUF->srcipaddr); PRINTF("\n"); +printf("ttl 7 %d\n", UIP_IP_BUF->ttl); + +{ +int i; +for (i = 0; i < 0x50; i++) + printf("%02x ", ((char *)UIP_IP_BUF)[i]); +printf("\n"); +} return; } diff --git a/core/net/uip-nd6.c b/core/net/uip-nd6.c index 001e931..32b8560 100644 --- a/core/net/uip-nd6.c +++ b/core/net/uip-nd6.c @@ -74,7 +74,7 @@ #include -#define DEBUG 0 +#define DEBUG 1 #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) diff --git a/core/net/uip-netif.c b/core/net/uip-netif.c index bf3106b..50a5aec 100644 --- a/core/net/uip-netif.c +++ b/core/net/uip-netif.c @@ -48,7 +48,7 @@ #include -#define DEBUG 0 +#define DEBUG 1 #if DEBUG #include #define PRINTF(...) printf(__VA_ARGS__) @@ -98,6 +98,7 @@ struct etimer uip_netif_timer_periodic; void uip_netif_init(void) { +printf("uip_netif_init\n"); /* INITIALIZE INTERFACE (default values for now) */ uip_netif_physical_if.link_mtu = UIP_LINK_MTU; uip_netif_physical_if.cur_hop_limit = UIP_TTL; @@ -252,7 +253,7 @@ uip_netif_addr_autoconf_set(uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr) UIP_LOG("CAN NOT BUIL INTERFACE IDENTIFIER"); UIP_LOG("THE STACK IS GOING TO SHUT DOWN"); UIP_LOG("THE HOST WILL BE UNREACHABLE"); - exit(-1); + //exit(-1); #endif } @@ -408,7 +409,7 @@ uip_netif_dad_failed(uip_ipaddr_t *ipaddr) dad_ns = 0; } - exit(-1); + //exit(-1); } diff --git a/core/net/uip.h b/core/net/uip.h index 2b22f76..4c631e9 100644 --- a/core/net/uip.h +++ b/core/net/uip.h @@ -980,7 +980,14 @@ struct uip_udp_conn *uip_udp_new(const uip_ipaddr_t *ripaddr, u16_t rport); * \hideinitializer */ #ifndef uip_ipaddr_copy -#define uip_ipaddr_copy(dest, src) (*(dest) = *(src)) +//#define uip_ipaddr_copy(dest, src) (*(dest) = *(src)) +#define uip_ipaddr_copy(dest, src) \ +{ \ +int i; \ +for (i = 0; i < sizeof *(dest); i++) { \ + *(((char *)(dest)) + i) = *(( (char *)(src)) + i); \ +} \ +} #endif /** @@ -1566,6 +1573,8 @@ void uip_process(u8_t flag); #define UIP_STOPPED 16 +#define PACKED __attribute__ ((__packed__)) + /* The TCP and IP headers. */ struct uip_tcpip_hdr { #if UIP_CONF_IPV6 @@ -1600,7 +1609,7 @@ struct uip_tcpip_hdr { u16_t tcpchksum; u8_t urgp[2]; u8_t optdata[4]; -}; +} PACKED; /* The ICMP and IP headers. */ struct uip_icmpip_hdr { @@ -1632,7 +1641,7 @@ struct uip_icmpip_hdr { u16_t id, seqno; u8_t payload[1]; #endif /* !UIP_CONF_IPV6 */ -}; +} PACKED; /* The UDP and IP headers. */ @@ -1663,7 +1672,7 @@ struct uip_udpip_hdr { destport; u16_t udplen; u16_t udpchksum; -}; +} PACKED; /* * In IPv6 the length of the L3 headers before the transport header is @@ -1692,7 +1701,7 @@ struct uip_ip_hdr { u16_t ipchksum; uip_ipaddr_t srcipaddr, destipaddr; #endif /* UIP_CONF_IPV6 */ -}; +} PACKED; /* @@ -1719,19 +1728,19 @@ struct uip_ip_hdr { struct uip_ext_hdr { u8_t next; u8_t len; -}; +} PACKED; /* Hop by Hop option header */ struct uip_hbho_hdr { u8_t next; u8_t len; -}; +} PACKED; /* destination option header */ struct uip_desto_hdr { u8_t next; u8_t len; -}; +} PACKED; /* We do not define structures for PAD1 and PADN options */ @@ -1748,7 +1757,7 @@ struct uip_routing_hdr { u8_t len; u8_t routing_type; u8_t seg_left; -}; +} PACKED; /* fragmentation header */ struct uip_frag_hdr { @@ -1756,7 +1765,7 @@ struct uip_frag_hdr { u8_t res; u16_t offsetresmore; u32_t id; -}; +} PACKED; /* * an option within the destination or hop by hop option headers @@ -1765,13 +1774,13 @@ struct uip_frag_hdr { struct uip_ext_hdr_opt { u8_t type; u8_t len; -}; +} PACKED; /* PADN option */ struct uip_ext_hdr_opt_padn { u8_t opt_type; u8_t opt_len; -}; +} PACKED; /* TCP header */ struct uip_tcp_hdr { @@ -1785,7 +1794,7 @@ struct uip_tcp_hdr { u16_t tcpchksum; u8_t urgp[2]; u8_t optdata[4]; -}; +} PACKED; /* The ICMP headers. */ struct uip_icmp_hdr { @@ -1794,7 +1803,7 @@ struct uip_icmp_hdr { #if !UIP_CONF_IPV6 u16_t id, seqno; #endif /* !UIP_CONF_IPV6 */ -}; +} PACKED; /* The UDP headers. */ @@ -1803,7 +1812,7 @@ struct uip_udp_hdr { u16_t destport; u16_t udplen; u16_t udpchksum; -}; +} PACKED; /** diff --git a/core/net/uip6.c b/core/net/uip6.c index a40fd9a..e72caa0 100644 --- a/core/net/uip6.c +++ b/core/net/uip6.c @@ -404,7 +404,7 @@ uip_udpchksum(void) void uip_init(void) { - + printf("uip_init\n"); uip_netif_init(); uip_nd6_init(); diff --git a/cpu/mc1322x/Makefile.mc1322x b/cpu/mc1322x/Makefile.mc1322x index 1014ca2..320b23b 100644 --- a/cpu/mc1322x/Makefile.mc1322x +++ b/cpu/mc1322x/Makefile.mc1322x @@ -37,7 +37,7 @@ LINKERSCRIPT = $(CONTIKI_CPU)/mc1322x.lds STARTUP=${addprefix $(OBJECTDIR)/,startup.o} -ARCH_FLAGS= -mcpu=arm7tdmi-s -mthumb-interwork -march=armv4t -mtune=arm7tdmi-s -DCONFIG_ARM -D__ARM__ +ARCH_FLAGS= -mcpu=arm7tdmi-s -mthumb-interwork -march=armv4t -mtune=arm7tdmi-s -DCONFIG_ARM -D__ARM__ -Wcast-align -Wpadded -Wpacked THUMB_FLAGS=-mthumb -mcallee-super-interworking ARM_FLAGS= @@ -50,7 +50,7 @@ CFLAGSNO = -I. -I$(CONTIKI)/core -I$(CONTIKI_CPU) -I$(CONTIKI_CPU)/loader \ -Werror $(ARCH_FLAGS) -g CFLAGS += $(CFLAGSNO) -Os -DRUN_AS_SYSTEM -DROM_RUN -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -DTEXT_BASE=$(TEXT_BASE) -fno-builtin-printf -fno-builtin-sprintf -LDFLAGS += -T $(LINKERSCRIPT) -nostartfiles -static +LDFLAGS += -T $(LINKERSCRIPT) -nostartfiles -static -Wl,-Map=contiki-$(TARGET).map,-export-dynamic AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS) -gstabs CDEPFLAGS = $(CFLAGS) -D __MAKING_DEPS__ @@ -81,17 +81,20 @@ CUSTOM_RULE_C_TO_CO=yes %.co: %.c $(CC) $(CFLAGS) $(THUMB_FLAGS) $< -c -o $@ +.PRECIOUS: %.bin +.PRECIOUS: %.ihex -%.ihex: %.$(TARGET) +%.ihex: %.elf $(OBJCOPY) $^ -O ihex $@ -%.bin: %.$(TARGET) +%.bin: %.elf $(OBJCOPY) -O binary $< $@ symbols.c: @${CONTIKI}/tools/make-empty-symbols -%.$(TARGET): %.co $(PROJECT_OBJECTFILES) contiki-$(TARGET).a $(STARTUP) $(OBJECTDIR)/symbols.o - $(CC) $(LDFLAGS) $(CFLAGS) -nostartfiles -o $@ $(filter-out %.a,$^) $(filter %.a,$^) $(filter %.a,$^) - +%.elf: %.co $(PROJECT_OBJECTFILES) contiki-$(TARGET).a $(STARTUP) $(OBJECTDIR)/symbols.o + $(CC) $(LDFLAGS) $(CFLAGS) -nostartfiles -o $@ $(filter-out %.a,$^) $(filter %.a,$^) $(filter %.a,$^) +%.$(TARGET): %.elf %.bin %.ihex + @ diff --git a/cpu/mc1322x/clock.c b/cpu/mc1322x/clock.c index dabbbe0..8001a45 100644 --- a/cpu/mc1322x/clock.c +++ b/cpu/mc1322x/clock.c @@ -89,3 +89,18 @@ clock_time(void) return current_clock; } +unsigned long +clock_seconds(void) +{ + return 0; +} + +int raise(void) +{ + return 0; +} + +void uip_log(char *msg) +{ + printf("uip: %s\n", msg); +} diff --git a/cpu/mc1322x/dbg-io.c b/cpu/mc1322x/dbg-io.c index 1fd90cb..ce91713 100644 --- a/cpu/mc1322x/dbg-io.c +++ b/cpu/mc1322x/dbg-io.c @@ -32,8 +32,3 @@ puts(const char *s) return i; } -int -__sp(struct _reent *_ptr, int c, FILE *_p) { - dbg_putchar(c); - return c; -} diff --git a/examples/ping-ipv6/example-ping6.c b/examples/ping-ipv6/example-ping6.c index a5dc227..1772926 100644 --- a/examples/ping-ipv6/example-ping6.c +++ b/examples/ping-ipv6/example-ping6.c @@ -29,5 +29,5 @@ #include "ping6.h" /*---------------------------------------------------------------------------*/ -AUTOSTART_PROCESSES(&ping6_process); +//AUTOSTART_PROCESSES(&ping6_process); /*---------------------------------------------------------------------------*/ diff --git a/examples/rime/Makefile b/examples/rime/Makefile index 6299334..efe75a6 100644 --- a/examples/rime/Makefile +++ b/examples/rime/Makefile @@ -1,7 +1,7 @@ CONTIKI = ../.. -ifndef TARGET -TARGET=netsim -endif + +DEFAULT_TARGET=netsim + all: example-abc example-mesh example-collect example-trickle example-polite \ example-rudolph0 example-rudolph1 example-rudolph2 example-rucb \ example-runicast example-unicast diff --git a/examples/udp-receiver-ipv6/Makefile.target b/examples/udp-receiver-ipv6/Makefile.target index 0d5d95e..6a38520 100644 --- a/examples/udp-receiver-ipv6/Makefile.target +++ b/examples/udp-receiver-ipv6/Makefile.target @@ -1 +1 @@ -TARGET = minimal-net +TARGET = mc1322x diff --git a/examples/udp-sender-ipv6/Makefile.target b/examples/udp-sender-ipv6/Makefile.target index 0d5d95e..6a38520 100644 --- a/examples/udp-sender-ipv6/Makefile.target +++ b/examples/udp-sender-ipv6/Makefile.target @@ -1 +1 @@ -TARGET = minimal-net +TARGET = mc1322x diff --git a/examples/webserver-ipv6/webserver6.c b/examples/webserver-ipv6/webserver6.c index 240a1fb..cdd87e3 100644 --- a/examples/webserver-ipv6/webserver6.c +++ b/examples/webserver-ipv6/webserver6.c @@ -34,5 +34,5 @@ #include "webserver-nogui.h" /*---------------------------------------------------------------------------*/ -AUTOSTART_PROCESSES(&webserver_nogui_process); +//AUTOSTART_PROCESSES(&webserver_nogui_process); /*---------------------------------------------------------------------------*/ diff --git a/platform/mc1322x/contiki-conf.h b/platform/mc1322x/contiki-conf.h index 85f6d34..8bd0ec6 100644 --- a/platform/mc1322x/contiki-conf.h +++ b/platform/mc1322x/contiki-conf.h @@ -82,6 +82,47 @@ typedef int32_t s32_t; #define PACKETBUF_CONF_SIZE 96 #define PACKETBUF_CONF_HDR_SIZE 64 +/* 0 for IPv6, or 1 for HC1, 2 for HC01 */ +#define SICSLOWPAN_CONF_COMPRESSION_IPV6 0 +#define SICSLOWPAN_CONF_COMPRESSION_HC1 1 +#define SICSLOWPAN_CONF_COMPRESSION_HC01 2 + +#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_CONF_COMPRESSION_HC01 +#define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2 +#define SICSLOWPAN_CONF_FRAG 1 + +#define SICSLOWPAN_CONF_MAXAGE 5 + +#define UIP_CONF_LL_802154 1 +#define UIP_CONF_LLH_LEN 0 + +#define UIP_CONF_MAX_CONNECTIONS 2 +#define UIP_CONF_MAX_LISTENPORTS 2 +#define UIP_CONF_UDP_CONNS 2 + +#define UIP_CONF_IP_FORWARD 0 +#define UIP_CONF_FWCACHE_SIZE 0 + +#define UIP_CONF_IPV6 1 +#define UIP_CONF_IPV6_CHECKS 1 +#define UIP_CONF_IPV6_QUEUE_PKT 1 +#define UIP_CONF_IPV6_REASSEMBLY 0 +#define UIP_CONF_NETIF_MAX_ADDRESSES 3 +#define UIP_CONF_ND6_MAX_PREFIXES 3 +#define UIP_CONF_ND6_MAX_NEIGHBORS 4 +#define UIP_CONF_ND6_MAX_DEFROUTERS 2 +#define UIP_CONF_ICMP6 1 + +#define UIP_CONF_UDP 1 +#define UIP_CONF_UDP_CHECKSUMS 1 + +#define UIP_CONF_TCP 1 +#define UIP_CONF_TCP_SPLIT 1 + +#define UIP_CONF_LOGGING 1 + +#define WITH_UIP6 1 + typedef uint32_t clock_time_t; typedef unsigned char u8_t; typedef unsigned short u16_t; diff --git a/platform/mc1322x/contiki-mc1322x-main.c b/platform/mc1322x/contiki-mc1322x-main.c index fa5aabb..2c96915 100644 --- a/platform/mc1322x/contiki-mc1322x-main.c +++ b/platform/mc1322x/contiki-mc1322x-main.c @@ -32,6 +32,7 @@ */ #include +#include #include @@ -58,6 +59,17 @@ #include "nvm.h" #include "kbi.h" +#define DEBUG 1 +#if DEBUG +#include +#define PRINTF(...) printf(__VA_ARGS__) +#define PRINT6ADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((u8_t *)addr)[0], ((u8_t *)addr)[1], ((u8_t *)addr)[2], ((u8_t *)addr)[3], ((u8_t *)addr)[4], ((u8_t *)addr)[5], ((u8_t *)addr)[6], ((u8_t *)addr)[7], ((u8_t *)addr)[8], ((u8_t *)addr)[9], ((u8_t *)addr)[10], ((u8_t *)addr)[11], ((u8_t *)addr)[12], ((u8_t *)addr)[13], ((u8_t *)addr)[14], ((u8_t *)addr)[15]) +#define PRINTLLADDR(lladdr) PRINTF(" %02x:%02x:%02x:%02x:%02x:%02x ",(lladdr)->addr[0], (lladdr)->addr[1], (lladdr)->addr[2], (lladdr)->addr[3],(lladdr)->addr[4], (lladdr)->addr[5]) +#else +#define PRINTF(...) +#define PRINT6ADDR(addr) +#define PRINTLLADDR(addr) +#endif #ifndef RIMEADDR_NVM #define RIMEADDR_NVM 0x1E000 @@ -74,6 +86,8 @@ #define PRINTF(...) #endif +#define RF_CHANNEL 24 + void init_lowlevel(void) { @@ -111,7 +125,7 @@ init_lowlevel(void) set_power(0x0f); /* 0dbm */ // set_power(0x0); - set_channel(0); /* channel 11 */ + set_channel(RF_CHANNEL - 11); /* Zero is channel 11 */ #if USE_32KHZ_XTAL enable_32khz_xtal(); @@ -187,7 +201,7 @@ main(void) // rime_init(nullmac_init(&maca_driver)); // rime_init(xmac_init(&maca_driver)); // rime_init(lpp_init(&maca_driver)); - rime_init(sicslowmac_init(&maca_driver)); +// rime_init(sicslowmac_init(&maca_driver)); #if !(USE_32KHZ_XTAL) PRINTF("setting xmac to use calibrated rtc value\n"); @@ -218,6 +232,66 @@ main(void) printf("\n\r********BOOTING CONTIKI*********\n\r"); +#if WITH_UIP6 + memcpy(&uip_lladdr.addr, &addr.u8, 8); + sicslowpan_init(sicslowmac_init(&maca_driver)); + process_start(&tcpip_process, NULL); + printf(" %s channel %u\n", sicslowmac_driver.name, RF_CHANNEL); +#if UIP_CONF_ROUTER + rime_init(rime_udp_init(NULL)); + uip_router_register(&rimeroute); +#endif /* UIP_CONF_ROUTER */ +#else /* WITH_UIP6 */ +#if WITH_NULLMAC + rime_init(nullmac_init(&maca_driver)); +#else /* WITH_NULLMAC */ + rime_init(xmac_init(&maca_driver)); +#endif /* WITH_NULLMAC */ + printf(" %s channel %u\n", rime_mac->name, RF_CHANNEL); +#endif /* WITH_UIP6 */ + +#if PROFILE_CONF_ON + profile_init(); +#endif /* PROFILE_CONF_ON */ + +#if TIMESYNCH_CONF_ENABLED + timesynch_init(); + timesynch_set_authority_level(rimeaddr_node_addr.u8[0]); +#endif /* TIMESYNCH_CONF_ENABLED */ + +#if WITH_UIP + process_start(&tcpip_process, NULL); + //process_start(&uip_fw_process, NULL); /* Start IP output */ + //process_start(&slip_process, NULL); + + //slip_set_input_callback(set_gateway); + + { + uip_ipaddr_t hostaddr, netmask; + + uip_init(); + +// uip_ipaddr(&hostaddr, 172,16, +// rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1]); +// uip_ipaddr(&netmask, 255,255,0,0); + //uip_ipaddr_copy(&meshif.ipaddr, &hostaddr); + + //uip_sethostaddr(&hostaddr); + //uip_setnetmask(&netmask); + //uip_over_mesh_set_net(&hostaddr, &netmask); + /* uip_fw_register(&slipif);*/ + //uip_over_mesh_set_gateway_netif(&slipif); + //uip_fw_default(&meshif); + //uip_over_mesh_init(UIP_OVER_MESH_CHANNEL); + printf("uIP started with IP address %d.%d.%d.%d\n", + uip_ipaddr_to_quad(&hostaddr)); + } +#endif /* WITH_UIP */ + + PRINTF("Local IPv6 address: "); + PRINT6ADDR(&uip_netif_physical_if.addresses[0].ipaddr); + PRINTF("\n"); + printf("System online.\n\r"); /* Main scheduler loop */