35 #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);
103 main(
int argc,
char **argv)
105 _set_fmode(O_BINARY);
114 #ifdef UIP_FALLBACK_INTERFACE
123 #ifdef PLATFORM_BUILD
128 autostart_start(autostart_processes);
130 #if !NETSTACK_CONF_WITH_IPV6
135 log_message(
"IP Address: ", inet_ntoa(*(
struct in_addr*)&addr));
139 log_message(
"Subnet Mask: ", inet_ntoa(*(
struct in_addr*)&addr));
143 log_message(
"Def. Router: ", inet_ntoa(*(
struct in_addr*)&addr));
147 log_message(
"DNS Server: ", inet_ntoa(*(
struct in_addr*)&addr));
152 #if !UIP_CONF_IPV6_RPL
153 #ifdef HARD_CODED_ADDRESS
156 if ((ipaddr.u16[0]!=0) || (ipaddr.u16[1]!=0) || (ipaddr.u16[2]!=0) || (ipaddr.u16[3]!=0)) {
158 uip_ds6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0, 0, 0, 0);
160 uip_ds6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0);
162 #if !UIP_CONF_IPV6_RPL
180 #ifdef PLATFORM_BUILD
181 if(console_resize()) {
void uip_log(char *m)
Print out a uIP log message.
#define TRUE
An alias for one, used for clarity.
#define uip_sethostaddr(addr)
Set the IP address of this host.
static uip_ipaddr_t ipaddr
Pointer to prefix information option in uip_buf.
#define uip_setdraddr(addr)
Set the default router's IP address.
#define uip_ipaddr(addr, addr0, addr1, addr2, addr3)
Construct an IP address from four bytes.
static uip_ds6_addr_t * addr
Pointer to a router list entry.
void etimer_request_poll(void)
Make the event timer aware that the clock has changed.
void program_handler_add(struct dsc *dsc, char *menuname, unsigned char desktop)
Add a program to the program handler.
void uip_nameserver_update(const uip_ipaddr_t *nameserver, uint32_t lifetime)
Initialize the module variables.
int process_run(void)
Run the system once - call poll handlers and process one event.
#define uip_setnetmask(addr)
Set the netmask.
#define uiplib_ipaddrconv
Convert a textual representation of an IP address to a numerical representation.
int main(void)
This is main...
uip_ds6_addr_t * uip_ds6_addr_add(uip_ipaddr_t *ipaddr, unsigned long vlifetime, uint8_t type)
Add a unicast address to the interface.
#define UIP_NAMESERVER_INFINITE_LIFETIME
Infinite Lifetime indicator.
CCIF uip_lladdr_t uip_lladdr
Host L2 address.
void process_init(void)
Initialize the process module.
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