Fixing Makefile build for bip6 with win32 MinGW and in github workflows. (#1125)

This commit is contained in:
Steve Karg
2025-10-30 12:00:01 -05:00
committed by GitHub
parent 895d9b3e21
commit 17259b37f3
10 changed files with 216 additions and 104 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
#
# Assumes rm and cp are available
CFLAGS += -Dbacnet_stack_EXPORTS
CFLAGS += -DBACNET_STACK_EXPORTS
ifeq ($(STATIC),1)
CFLAGS += -DBACNET_STACK_STATIC_DEFINE
+2 -44
View File
@@ -364,7 +364,7 @@ static void bbmd6_send_pdu_bdt(uint8_t *mtu, unsigned int mtu_len)
if (mtu) {
bip6_get_addr(&my_addr);
for (i = 0; i < MAX_BBMD_ENTRIES; i++) {
for (i = 0; i < MAX_BBMD6_ENTRIES; i++) {
if (BBMD_Table[i].valid) {
if (bvlc6_address_different(
&my_addr, &BBMD_Table[i].bip6_address)) {
@@ -391,7 +391,7 @@ static void bbmd6_send_pdu_fdt(uint8_t *mtu, unsigned int mtu_len)
if (mtu) {
bip6_get_addr(&my_addr);
for (i = 0; i < MAX_FD_ENTRIES; i++) {
for (i = 0; i < MAX_FD6_ENTRIES; i++) {
if (FD_Table[i].valid) {
if (bvlc6_address_different(
&my_addr, &FD_Table[i].bip6_address)) {
@@ -401,46 +401,6 @@ static void bbmd6_send_pdu_fdt(uint8_t *mtu, unsigned int mtu_len)
}
}
}
/**
* The Forward NPDU send function for Broadcast Distribution Table
*
* @param addr - Points to a #BACNET_IP6_ADDRESS structure containing the
* source IPv6 address.
* @param vmac_src - Source-Virtual-Address
* @param npdu - the bytes of NPDU+APDU data to send
* @param npdu_len - the number of bytes of NPDU+APDU data to send
*/
static void bbmd6_send_forward_npdu(
BACNET_IP6_ADDRESS *address,
uint32_t vmac_src,
uint8_t *npdu,
unsigned int npdu_len)
{
uint8_t mtu[BIP6_MPDU_MAX] = { 0 };
uint16_t mtu_len = 0;
unsigned i = 0; /* loop counter */
for (i = 0; i < MAX_BBMD_ENTRIES; i++) {
if (BBMD_Table[i].valid) {
if (bbmd6_address_match_self(&BBMD_Table[i].bip6_address)) {
/* don't forward to our selves */
} else {
bip6_send_mpdu(&BBMD_Table[i].bip6_address, mtu, mtu_len);
}
}
}
for (i = 0; i < MAX_FD_ENTRIES; i++) {
if (FD_Table[i].valid) {
if (bbmd6_address_match_self(&FD_Table[i].bip6_address)) {
/* don't forward to our selves */
} else {
bip6_send_mpdu(&FD_Table[i].bip6_address, mtu, mtu_len);
}
}
}
}
#endif
/**
@@ -840,10 +800,8 @@ int bvlc6_bbmd_enabled_handler(
uint16_t mtu_len)
{
uint16_t result_code = BVLC6_RESULT_SUCCESSFUL_COMPLETION;
uint32_t vmac_me = 0;
uint32_t vmac_src = 0;
uint32_t vmac_dst = 0;
uint32_t vmac_target = 0;
uint8_t message_type = 0;
uint16_t message_length = 0;
int header_len = 0;
+2 -2
View File
@@ -93,7 +93,7 @@ void routed_get_my_address(BACNET_ADDRESS *my_address);
#else
#define datalink_get_my_address bip_get_my_address
#endif
#define datalink_maintenance_timer(s) bvlc_maintenance_timer(s)
#define datalink_maintenance_timer bvlc_maintenance_timer
#elif defined(BACDL_BIP6) && !defined(BACDL_MULTIPLE)
#define MAX_MPDU BIP6_MPDU_MAX
@@ -104,7 +104,7 @@ void routed_get_my_address(BACNET_ADDRESS *my_address);
#define datalink_cleanup bip6_cleanup
#define datalink_get_broadcast_address bip6_get_broadcast_address
#define datalink_get_my_address bip6_get_my_address
#define datalink_maintenance_timer(s) bvlc6_maintenance_timer(s)
#define datalink_maintenance_timer bvlc6_maintenance_timer
#elif defined(BACDL_ZIGBEE) && !defined(BACDL_MULTIPLE)
/* A BACnet/ZigBee Data Link Layer (BZLL) */