37 #include "contiki-net.h"
38 #include "contiki-lib.h"
44 #include "net/wpcap-drv.h"
46 #include "net/tapdev-drv.h"
48 #include "net/ethernode-uip.h"
50 #include "net/ethernode.h"
60 int snprintf(
char *str,
size_t size,
const char *format, ...);
64 #include <sys/select.h>
67 #include "dev/button-sensor.h"
68 #include "dev/pir-sensor.h"
69 #include "dev/vib-sensor.h"
70 #include "dev/radio-sensor.h"
81 {
UIP_FW_NETIF(172,16,0,0, 255,255,0,0, uip_over_mesh_send)};
85 static const struct uip_eth_addr ethaddr = {{0x00,0x06,0x98,0x01,0x02,0x12}};
87 SENSORS(&button_sensor, &pir_sensor, &vib_sensor, &radio_sensor);
89 PROCINIT(&sensors_process, &etimer_process, &tcpip_process);
98 snprintf(buf,
sizeof(buf),
"route delete %d.%d.%d.%d",
107 contiki_main(
int flag)
109 random_init(getpid());
127 uip_over_mesh_init(2);
140 snprintf(buf,
sizeof(buf),
"route add %d.%d.%d.%d mask %d.%d.%d.%d %d.%d.%d.%d",
146 signal(SIGTERM, remove_route);
156 uip_over_mesh_make_announced_gateway();
166 autostart_start(autostart_processes);
183 process_event_t codeprop_event_quit;