UPdated to latest hc.c API
This commit is contained in:
parent
5e98ede3a3
commit
5a5b964b2e
2 changed files with 14 additions and 7 deletions
|
@ -9,10 +9,10 @@ CONTIKI_TARGET_DIRS = . dev apps net
|
||||||
SENSORS = sensors.c beep.c button-sensor.c pir-sensor.c vib-sensor.c \
|
SENSORS = sensors.c beep.c button-sensor.c pir-sensor.c vib-sensor.c \
|
||||||
radio-sensor.c irq.c eeprom.c \
|
radio-sensor.c irq.c eeprom.c \
|
||||||
dummy-sensors.c leds.c leds-arch.c esb-sensors.c
|
dummy-sensors.c leds.c leds-arch.c esb-sensors.c
|
||||||
NETSIM = ether.c ethernode.c ethernode-drv.c tr1001.c tr1001-drv.c lpm.c \
|
NETSIM = ether.c ethernode.c ethernode-drv.c lpm.c \
|
||||||
tapdev-drv.c tapdev-service.c tapdev.c rs232.c flash.c \
|
tapdev-drv.c tapdev-service.c tapdev.c rs232.c flash.c \
|
||||||
node.c nodes.c sensor.c display.c random.c radio.c \
|
node.c nodes.c sensor.c display.c random.c radio.c \
|
||||||
dlloader.c main.c init.c contiki-main.c symtab.c symbols.c
|
dlloader.c main.c init.c contiki-main.c symtab.c symbols.c #tr1001.c tr1001-drv.c
|
||||||
|
|
||||||
CONTIKI_TARGET_SOURCEFILES = $(NETSIM) $(SENSORS)
|
CONTIKI_TARGET_SOURCEFILES = $(NETSIM) $(SENSORS)
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $Id: ethernode-drv.c,v 1.2 2006/10/06 08:25:31 adamdunkels Exp $
|
* $Id: ethernode-drv.c,v 1.3 2006/10/09 11:56:49 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "contiki.h"
|
#include "contiki.h"
|
||||||
|
@ -50,7 +50,7 @@ enum { NULLEVENT };
|
||||||
u8_t
|
u8_t
|
||||||
ethernode_drv_send(void)
|
ethernode_drv_send(void)
|
||||||
{
|
{
|
||||||
uip_len = hc_compress();
|
uip_len = hc_compress(&uip_buf[UIP_LLH_LEN], uip_len);
|
||||||
|
|
||||||
return ethernode_send();
|
return ethernode_send();
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,14 @@ PROCESS_THREAD(ethernode_drv_process, ev, data)
|
||||||
printf("Bropp\n");
|
printf("Bropp\n");
|
||||||
} else*/ {
|
} else*/ {
|
||||||
|
|
||||||
uip_len = hc_inflate();
|
uip_len = hc_inflate(&uip_buf[UIP_LLH_LEN], uip_len);
|
||||||
|
|
||||||
|
{
|
||||||
|
char buf[40];
|
||||||
|
tcpdump_format(&uip_buf[UIP_LLH_LEN], uip_len, buf, sizeof(buf));
|
||||||
|
printf("radio_sniffer: packet length %d, %s\n", uip_len, buf);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
tapdev_send_raw();
|
tapdev_send_raw();
|
||||||
/* if(uip_fw_forward() == UIP_FW_LOCAL)*/ {
|
/* if(uip_fw_forward() == UIP_FW_LOCAL)*/ {
|
||||||
|
|
Loading…
Reference in a new issue