Added more functionality to BVLC (untested and uncompiled), and corrected BIP.

This commit is contained in:
skarg
2007-10-16 01:24:22 +00:00
parent ae6d2e882b
commit b3896ea4f4
2 changed files with 383 additions and 40 deletions
+3 -2
View File
@@ -215,9 +215,10 @@ uint16_t bip_receive(BACNET_ADDRESS * src, /* source address */
if ((pdu[1] == BVLC_ORIGINAL_UNICAST_NPDU) ||
(pdu[1] == BVLC_ORIGINAL_BROADCAST_NPDU)) {
/* ignore messages from me */
if (sin.sin_addr.s_addr == htonl(BIP_Address.s_addr))
if ((sin.sin_addr.s_addr == htonl(BIP_Address.s_addr)) &&
(sin.sin_port == htonl(BIP_Port))) {
pdu_len = 0;
else {
} else {
/* copy the source address
FIXME: IPv6? */
src->mac_len = 6;