35 #define WIN32_LEAN_AND_MEAN
40 #include "contiki-net.h"
42 #include "sys/clock.h"
44 #include "ctk/ctk-console.h"
46 #include "../../apps/directory/directory-dsc.h"
47 #include "../../apps/webbrowser/www-dsc.h"
50 #include "net/wpcap-drv.h"
53 #include "program-handler.h"
57 #define CTK_PROCESS &ctk_process,
62 PROCINIT(&etimer_process,
70 debug_printf(
char *format, ...)
75 va_start(argptr, format);
76 vsprintf(buffer, format, argptr);
80 OutputDebugString(buffer);
82 fputs(buffer, stderr);
89 debug_printf(
"%s\n", message);
93 log_message(
const char *part1,
const char *part2)
95 debug_printf(
"%s%s\n", part1, part2);
102 main(
int argc,
char **argv)
111 #ifdef UIP_FALLBACK_INTERFACE
120 #ifdef PLATFORM_BUILD
125 autostart_start(autostart_processes);
132 log_message(
"IP Address: ", inet_ntoa(*(
struct in_addr*)&addr));
136 log_message(
"Subnet Mask: ", inet_ntoa(*(
struct in_addr*)&addr));
140 log_message(
"Def. Router: ", inet_ntoa(*(
struct in_addr*)&addr));
144 log_message(
"DNS Server: ", inet_ntoa(*(
struct in_addr*)&addr));
149 #if !UIP_CONF_IPV6_RPL
150 #ifdef HARD_CODED_ADDRESS
153 if ((ipaddr.u16[0]!=0) || (ipaddr.u16[1]!=0) || (ipaddr.u16[2]!=0) || (ipaddr.u16[3]!=0)) {
155 uip_ds6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0, 0, 0, 0);
157 uip_ds6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0);
159 #if !UIP_CONF_IPV6_RPL
161 uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
177 #ifdef PLATFORM_BUILD
178 if(console_resize()) {
#define uip_sethostaddr(addr)
Set the IP address of this host.
CCIF uip_lladdr_t uip_lladdr
Host L2 address.
void uip_ds6_set_addr_iid(uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr)
set the last 64 bits of an IP address based on the MAC address
void uip_log(char *msg)
Print out a uIP log message.
int main(void)
This is main...
#define uiplib_ipaddrconv
Convert a textual representation of an IP address to a numerical representation.
void process_init(void)
Initialize the process module.
#define uip_setdraddr(addr)
Set the default router's IP address.
void program_handler_add(struct dsc *dsc, char *menuname, unsigned char desktop)
Add a program to the program handler.
#define TRUE
An alias for one, used for clarity.
void etimer_request_poll(void)
Make the event timer aware that the clock has changed.
int process_run(void)
Run the system once - call poll handlers and process one event.
#define uip_ipaddr(addr, addr0, addr1, addr2, addr3)
Construct an IP address from four bytes.
#define uip_setnetmask(addr)
Set the netmask.