Fixed BVLC Write Broadcast Distribution Table for protocol revision 17 and later. (#1005)

* Fixed BVLC Write Broadcast Distribution Table for protocol revision 17 and later.

* Added check for Network Port object bbmd-accept-fd-registrations property in BBMD handler.

* Added bvlc_foreign_device_table_decode() function and unit test.

* Added BDT and FTD write property to network port for IPv4
This commit is contained in:
Steve Karg
2025-06-10 09:48:10 -05:00
committed by GitHub
parent f0ec05d085
commit 5d45d43da5
7 changed files with 711 additions and 48 deletions
+38
View File
@@ -321,6 +321,38 @@ static int bbmd6_register_as_foreign_device(void)
return retval;
}
/**
* @brief
*
* @param instance
*/
static void bip_network_port_activate_changes(uint32_t instance)
{
#if defined(BACDL_BIP)
bvlc_bbmd_accept_fd_registrations_set(
Network_Port_BBMD_Accept_FD_Registrations(instance));
#else
/* if we are not using BIP, then we don't have any changes to discard */
(void)instance;
#endif
}
/**
* @brief
*
* @param instance
*/
static void bip_network_port_discard_changes(uint32_t instance)
{
#if defined(BACDL_BIP)
Network_Port_BBMD_Accept_FD_Registrations_Set(
instance, bvlc_bbmd_accept_fd_registrations());
#else
/* if we are not using BIP, then we don't have any changes to discard */
(void)instance;
#endif
}
/**
* Datalink network port object settings
*/
@@ -401,6 +433,8 @@ static void dlenv_network_port_bip_init(uint32_t instance)
instance, addr0, addr1, addr2, addr3);
Network_Port_Remote_BBMD_BIP_Port_Set(instance, BBMD_Address.port);
Network_Port_Remote_BBMD_BIP_Lifetime_Set(instance, BBMD_TTL_Seconds);
Network_Port_BBMD_Accept_FD_Registrations_Set(
instance, bvlc_bbmd_accept_fd_registrations());
#endif
/* common NP data */
Network_Port_Reliability_Set(instance, RELIABILITY_NO_FAULT_DETECTED);
@@ -411,6 +445,10 @@ static void dlenv_network_port_bip_init(uint32_t instance)
/* last thing - clear pending changes - we don't want to set these
since they are already set */
Network_Port_Changes_Pending_Set(instance, false);
Network_Port_Changes_Pending_Activate_Callback_Set(
instance, bip_network_port_activate_changes);
Network_Port_Changes_Pending_Discard_Callback_Set(
instance, bip_network_port_discard_changes);
}
/**