36 #define WIN32_LEAN_AND_MEAN
41 #include "contiki-net.h"
43 #include "sys/clock.h"
45 #include "ctk/ctk-console.h"
47 #include "../../apps/directory/directory-dsc.h"
48 #include "../../apps/webbrowser/www-dsc.h"
51 #include "net/wpcap-drv.h"
54 #include "program-handler.h"
58 #define CTK_PROCESS &ctk_process,
63 PROCINIT(&etimer_process,
71 debug_printf(
char *format, ...)
76 va_start(argptr, format);
77 vsprintf(buffer, format, argptr);
81 OutputDebugString(buffer);
83 fputs(buffer, stderr);
90 debug_printf(
"%s\n", message);
94 log_message(
const char *part1,
const char *part2)
96 debug_printf(
"%s%s\n", part1, part2);
106 #ifdef PLATFORM_BUILD
107 program_handler_add(&directory_dsc,
"Directory", 1);
108 program_handler_add(&www_dsc,
"Web browser", 1);
111 autostart_start(autostart_processes);
118 log_message(
"IP Address: ", inet_ntoa(*(
struct in_addr*)&addr));
122 log_message(
"Subnet Mask: ", inet_ntoa(*(
struct in_addr*)&addr));
126 log_message(
"Def. Router: ", inet_ntoa(*(
struct in_addr*)&addr));
130 log_message(
"DNS Server: ", inet_ntoa(*(
struct in_addr*)&addr));
135 #if !UIP_CONF_IPV6_RPL
136 #ifdef HARD_CODED_ADDRESS
139 if ((ipaddr.u16[0]!=0) || (ipaddr.u16[1]!=0) || (ipaddr.u16[2]!=0) || (ipaddr.u16[3]!=0)) {
141 uip_ds6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0, 0, 0, 0);
143 uip_ds6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0);
145 #if !UIP_CONF_IPV6_RPL
147 uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
164 if(console_resize()) {