From 70c1d8bd7a938b11ad27c0b5c440985aa60bea7a Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Fri, 23 Apr 2021 13:45:57 -0500 Subject: [PATCH] IPv6 MAC length is 3 after public review. (#169) Co-authored-by: Steve Karg --- src/bacnet/bacdef.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bacnet/bacdef.h b/src/bacnet/bacdef.h index e461a5bd..358830b0 100644 --- a/src/bacnet/bacdef.h +++ b/src/bacnet/bacdef.h @@ -134,16 +134,16 @@ typedef uint32_t BACNET_ARRAY_INDEX; #define BACNET_MAX_PRIORITY 16 #define BACNET_BROADCAST_NETWORK (0xFFFF) -/* Any size MAC address should be allowed which is less than or - equal to 7 bytes. The IPv6 addresses are planned to be handled - outside this area. */ -/* FIXME: mac[] only needs to be as big as our local datalink MAC */ -#if BACDL_BIP6 - #define MAX_MAC_LEN 19 -#else - #define MAX_MAC_LEN 7 -#endif +/* Any size MAC address could be received which is less than or + equal to 7 bytes. Standard even allows 6 bytes max. */ +/* ARCNET = 1 byte + MS/TP = 1 byte + Ethernet = 6 bytes + BACnet/IPv4 = 6 bytes + LonTalk = 7 bytes + BACnet/IPv6 = 3 bytes (VMAC) */ +#define MAX_MAC_LEN 7 struct BACnet_Device_Address { /* mac_len = 0 is a broadcast address */