Feature/makefile add apps library (#218)
* add BACnet stack library at apps/lib * convert apps to use apps/lib for smaller binary * fix -DBACDL_ALL=1 build * fix piface build * datalink MAX_MPDU and MAX_HEADER cleanup * add bip6 to git workflow * fix system library dependency of BACnet library Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -226,7 +226,7 @@ int ethernet_send_pdu(BACNET_ADDRESS *dest, /* destination address */
|
||||
int i = 0; /* counter */
|
||||
int bytes = 0;
|
||||
BACNET_ADDRESS src = { 0 }; /* source address for npdu */
|
||||
uint8_t mtu[MAX_MPDU] = { 0 }; /* our buffer */
|
||||
uint8_t mtu[ETHERNET_MPDU_MAX] = { 0 }; /* our buffer */
|
||||
int mtu_len = 0;
|
||||
|
||||
(void)npdu_data;
|
||||
@@ -265,7 +265,7 @@ int ethernet_send_pdu(BACNET_ADDRESS *dest, /* destination address */
|
||||
mtu[15] = 0x82; /* SSAP for BACnet */
|
||||
mtu[16] = 0x03; /* Control byte in header */
|
||||
mtu_len = 17;
|
||||
if ((mtu_len + pdu_len) > MAX_MPDU) {
|
||||
if ((mtu_len + pdu_len) > ETHERNET_MPDU_MAX) {
|
||||
fprintf(stderr, "ethernet: PDU is too big to send!\n");
|
||||
return -4;
|
||||
}
|
||||
@@ -293,7 +293,7 @@ uint16_t ethernet_receive(BACNET_ADDRESS *src, /* source address */
|
||||
unsigned timeout)
|
||||
{ /* number of milliseconds to wait for a packet */
|
||||
int received_bytes;
|
||||
uint8_t buf[MAX_MPDU] = { 0 }; /* data */
|
||||
uint8_t buf[ETHERNET_MPDU_MAX] = { 0 }; /* data */
|
||||
uint16_t pdu_len = 0; /* return value */
|
||||
fd_set read_fds;
|
||||
int max;
|
||||
|
||||
Reference in New Issue
Block a user