fixed nullnet to work with new network interface

This commit is contained in:
Joakim Eriksson 2017-10-06 23:44:34 +02:00
parent 8cf65ed01a
commit 761d19dafc
5 changed files with 9 additions and 8 deletions

View File

@ -17,7 +17,6 @@ ifeq ($(TARGET),nooliberry)
endif
# custom net layer, but with IPv6 enabled
MAKE_NET = MAKE_NET_IPv6
MAKE_NET = MAKE_NET_IPV6
CONTIKI_WITH_RPL = 0
MODULES += os/net/ipv6
include $(CONTIKI)/Makefile.include

View File

@ -57,7 +57,8 @@
static linkaddr_t coordinator_addr = {{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }};
#endif /* MAC_CONF_WITH_TSCH */
uint8_t nullnet_buf[128];
static uint32_t buffer[128];
uint8_t *nullnet_buf = (uint8_t *)buffer;
uint16_t nullnet_len;
@ -93,7 +94,7 @@ PROCESS_THREAD(nullnet_example_process, ev, data)
LOG_INFO("Sending %u to ", count);
LOG_INFO_LLADDR(NULL);
LOG_INFO_("\n");
memcpy(nullnet_buf, &count, sizeof(count));
nullnet_len = sizeof(count);

View File

@ -59,7 +59,8 @@ static linkaddr_t dest_addr = {{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0
static linkaddr_t coordinator_addr = {{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }};
#endif /* MAC_CONF_WITH_TSCH */
uint8_t nullnet_buf[128];
static uint32_t buffer[128];
uint8_t *nullnet_buf = (uint8_t *)buffer;
uint16_t nullnet_len;
/*---------------------------------------------------------------------------*/

View File

@ -53,9 +53,6 @@
#define LOG_MODULE "NullNet"
#define LOG_LEVEL LOG_LEVEL_NULLNET
extern uint8_t *nullnet_buf;
extern uint16_t nullnet_len;
static nullnet_input_callback current_callback = NULL;
/*--------------------------------------------------------------------*/
static void

View File

@ -52,6 +52,9 @@ for non-IPv6 scenarios.
#include "contiki.h"
#include "net/linkaddr.h"
extern uint8_t *nullnet_buf;
extern uint16_t nullnet_len;
/**
* Function prototype for NullNet input callback
*/