mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Added optional address filtering
This commit is contained in:
parent
e8a96dc202
commit
28b0479c06
@ -52,6 +52,12 @@
|
||||
#define PRINTF(...)
|
||||
#endif
|
||||
|
||||
#ifdef NULLRDC_CONF_ADDRESS_FILTER
|
||||
#define NULLRDC_ADDRESS_FILTER NULLRDC_CONF_ADDRESS_FILTER
|
||||
#else
|
||||
#define NULLRDC_ADDRESS_FILTER 1
|
||||
#endif /* NULLRDC_CONF_ADDRESS_FILTER */
|
||||
|
||||
#ifndef NULLRDC_802154_AUTOACK
|
||||
#ifdef NULLRDC_CONF_802154_AUTOACK
|
||||
#define NULLRDC_802154_AUTOACK NULLRDC_CONF_802154_AUTOACK
|
||||
@ -206,6 +212,13 @@ packet_input(void)
|
||||
#endif /* NULLRDC_802154_AUTOACK */
|
||||
if(NETSTACK_FRAMER.parse() == 0) {
|
||||
PRINTF("nullrdc: failed to parse %u\n", packetbuf_datalen());
|
||||
#if NULLRDC_ADDRESS_FILTER
|
||||
} else if(!rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER),
|
||||
&rimeaddr_node_addr) &&
|
||||
!rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER),
|
||||
&rimeaddr_null)) {
|
||||
PRINTF("nullrdc: not for us\n");
|
||||
#endif /* NULLRDC_ADDRESS_FILTER */
|
||||
} else {
|
||||
#if NULLRDC_802154_AUTOACK || NULLRDC_802154_AUTOACK_HW
|
||||
/* Check for duplicate packet by comparing the sequence number
|
||||
|
Loading…
Reference in New Issue
Block a user