From c7ed0b24c050b01dcdcb669895984c40e9155bd1 Mon Sep 17 00:00:00 2001 From: skarg Date: Sun, 10 Jun 2018 02:21:44 +0000 Subject: [PATCH] Added address compare API for BIP6. --- bacnet-stack/ports/win32/bip6.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bacnet-stack/ports/win32/bip6.c b/bacnet-stack/ports/win32/bip6.c index eb0814bf..89c63a2d 100644 --- a/bacnet-stack/ports/win32/bip6.c +++ b/bacnet-stack/ports/win32/bip6.c @@ -299,6 +299,20 @@ bool bip6_get_addr( return bvlc6_address_copy(addr, &BIP6_Addr); } + +/** + * Determine if the BACnet/IPv6 address matches our own address + * + * @param addr - network IPv6 address + * + * @return true if the BACnet/IPv6 address matches our own address + */ +bool bip6_address_match_self( + BACNET_IP6_ADDRESS *addr) +{ + return !bvlc6_address_different(addr, &BIP6_Addr); +} + /** * Set the BACnet/IP address *