adding BVLC support - not working yet.
This commit is contained in:
+7
-2
@@ -51,6 +51,11 @@ void bip_set_socket(int sock_fd)
|
||||
BIP_Socket = sock_fd;
|
||||
}
|
||||
|
||||
int bip_socket(void)
|
||||
{
|
||||
return BIP_Socket;
|
||||
}
|
||||
|
||||
bool bip_valid(void)
|
||||
{
|
||||
return (BIP_Socket != -1);
|
||||
@@ -248,7 +253,7 @@ uint16_t bip_receive(BACNET_ADDRESS * src, /* source address */
|
||||
/* the signature of a BACnet/IP packet */
|
||||
if (buf[0] != BVLL_TYPE_BACNET_IP)
|
||||
return 0;
|
||||
if ((buf[1] == BVLC_ORIGINAL_UNICAST_NPDU) ||
|
||||
if ((buf[1] == BVLC_ORIGINAL_UNICAST_NPDU) ||
|
||||
(buf[1] == BVLC_ORIGINAL_BROADCAST_NPDU)) {
|
||||
/* ignore messages from me */
|
||||
if (sin.sin_addr.s_addr == BIP_Address.s_addr)
|
||||
@@ -275,7 +280,7 @@ uint16_t bip_receive(BACNET_ADDRESS * src, /* source address */
|
||||
}
|
||||
#ifdef BBMD_ENABLED
|
||||
if (buf[1] < MAX_BVLC_FUNCTION) {
|
||||
bbmd_handler(&buf[0], received_bytes, &sin);
|
||||
bbmd_handler(&buf[0], received_bytes, &sin);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user