From 616b65c9621c8d89533d7d4cac9b2541092b7d4f Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Sat, 27 Aug 2016 22:30:32 +0200 Subject: [PATCH 1/2] added support for 6-bytes link-layer address --- core/net/linkaddr.c | 3 +++ platform/minimal-net/contiki-conf.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/net/linkaddr.c b/core/net/linkaddr.c index 51b8b19ef..a5340ab61 100644 --- a/core/net/linkaddr.c +++ b/core/net/linkaddr.c @@ -52,6 +52,9 @@ const linkaddr_t linkaddr_null = { { 0, 0 } }; #if LINKADDR_SIZE == 8 const linkaddr_t linkaddr_null = { { 0, 0, 0, 0, 0, 0, 0, 0 } }; #endif /*LINKADDR_SIZE == 8*/ +#if LINKADDR_SIZE == 6 +const linkaddr_t linkaddr_null = { { 0, 0, 0, 0, 0, 0 } }; +#endif /*LINKADDR_SIZE == 8*/ #endif /*LINKADDR_SIZE == 2*/ diff --git a/platform/minimal-net/contiki-conf.h b/platform/minimal-net/contiki-conf.h index 9fa2e225f..666fccb08 100644 --- a/platform/minimal-net/contiki-conf.h +++ b/platform/minimal-net/contiki-conf.h @@ -64,7 +64,6 @@ typedef int32_t s32_t; typedef unsigned short uip_stats_t; - #if NETSTACK_CONF_WITH_IPV6 /* The Windows build uses wpcap to connect to a host interface. It finds the interface by scanning for * an address, which can be specified here and overridden with the command line. @@ -148,6 +147,7 @@ typedef unsigned short uip_stats_t; #endif #define UIP_CONF_LLH_LEN 14 +#define LINKADDR_CONF_SIZE 6 #define UIP_CONF_MAX_LISTENPORTS 40 #define UIP_CONF_MAX_CONNECTIONS 40 #define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN From cbf4a843e22feff2df8eab2adf4a1175ffcddfee Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Thu, 29 Dec 2016 22:49:01 +0100 Subject: [PATCH 2/2] fixed comment. --- core/net/linkaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/net/linkaddr.c b/core/net/linkaddr.c index a5340ab61..1f08b0824 100644 --- a/core/net/linkaddr.c +++ b/core/net/linkaddr.c @@ -54,7 +54,7 @@ const linkaddr_t linkaddr_null = { { 0, 0, 0, 0, 0, 0, 0, 0 } }; #endif /*LINKADDR_SIZE == 8*/ #if LINKADDR_SIZE == 6 const linkaddr_t linkaddr_null = { { 0, 0, 0, 0, 0, 0 } }; -#endif /*LINKADDR_SIZE == 8*/ +#endif /*LINKADDR_SIZE == 6*/ #endif /*LINKADDR_SIZE == 2*/