Commit Graph

60 Commits

Author SHA1 Message Date
skarg 9914f30a65 Merged revision(s) 3181 from branches/releases/bacnet-stack-0-8-0:
Added BDT backup and restore to file option API. Thank you to Mario de Sousa for the patch.
........
2018-06-10 02:25:47 +00:00
skarg 7fc3060dbf Added environment variables to enhance BBMD behavior in the example server demo.
BACNET_BDT_ADDR_1 - dotted IPv4 address of the BBMD table entry 1..128
BACNET_BDT_PORT_1 - UDP port of the BBMD table entry 1..128 (optional)
BACNET_BDT_MASK_1 - dotted IPv4 mask of the BBMD table
    entry 1..128 (optional)

Added environment variable to allow setting of the public NAT address.
BACNET_IP_NAT_ADDR - dotted IPv4 address of the public facing router
2018-04-19 20:10:45 +00:00
skarg a46fcc37d5 Fixed buffer overflow in BACnet/IP BVLC packet handling by properly checking the size of the packets at each function. Thank you, Marlies Ruck! 2018-04-18 18:24:15 +00:00
skarg 80a720b431 [Bug #46] Fixed potential buffer overflow in BVLC BACnet/IP forwarded NPDU encoding. 2016-06-29 20:20:27 +00:00
skarg 98207470f4 Adds network address translation (NAT) handling to BVLC when the device is BBMD.
When the device is behind a NAT enabled IP router, the local subnet is not accessible from the WAN side. This means that the device's local IP address cannot be used by other devices to communicate with it. The router can port forward BACnet packets to one device in the local network, but to do so other devices need to use the global IP for communication. The considerations and limitations for NAT usage are specified in BACnet standard Annex J.7.8. Thank you, Sami Pietikäinen, for the contribution!
2015-02-24 21:54:19 +00:00
skarg efdb70b7f9 Added simple local interface to manage entries in the broadcast distribution table. Using this interface, the BDT can be supplied by local means, e.g. device's local user interface as stated in Annex J.4.4. Thank you, Sami Pietikäinen, for the contribution! 2015-02-24 20:01:18 +00:00
skarg 0be5ddce65 Fixed BACnet/IP to handler remote network broadcast that is unicast to the router. 2014-08-02 00:05:00 +00:00
skarg 3835dc8998 Merged revision(s) 2707 from branches/obvius/bacnet-stack:
Fix: As a BBMD, when forwarding NPDU to the local subnet (as an IP broacast)
  we omit BVLC header, resulting in corrupt packet.

  bvlc_send_mpdu(&dest, &npdu[4 + 6], npdu_len); // bad
  bvlc_send_mpdu(&dest, &npdu[0], npdu_len+4+6); // good

Also added some debug_prints. To test, start bacserv, use VTS to add
yourself to the BDT, then send a Who-Is to bacserv as a Forwarded-NPDU.
Will be rebroadcast on local subnet but w/o BVLC header.

........
2014-01-17 04:29:20 +00:00
skarg 1738701f81 Merged revision(s) 2706 from branches/obvius/bacnet-stack:
Fix: BVLC-Delete-Foreign-Device always returns NAK.
    uninitialized 'port' var. Use sin.sin_port instead.

........
2014-01-16 20:01:18 +00:00
skarg ba3242aafd indented using indent.sh script to get uniform looking code for release 2013-03-13 22:17:13 +00:00
skarg fa12f4bcdf Added BVLC Read-Broadcast-Distribution-Table demo (doesn't print table yet). 2012-10-24 22:09:43 +00:00
skarg c28f55d3df Added parenthesis to provide clarity and make it obvious to anyone maintaining the code. 2012-09-27 19:26:11 +00:00
skarg 6a2d467fc2 DADR is only valid when DNET is specified (i.e. net is non-zero). 2012-09-19 21:27:00 +00:00
netp 6a8fdcca74 added checks to allow broadcast to network or if mac address is not specified 2012-08-07 03:43:19 +00:00
skarg 48e2c60ce2 indented to standard from script 2012-05-13 15:07:12 +00:00
skarg 2ffdc9bc53 Added missing return result to fix compiler warning. 2011-10-03 14:00:25 +00:00
tbrennan3 7eb2109dc4 Added the ability to ask for the BVLC Function Code in the lower layers; particular need was to recognize bcasts and not respond with Reject-Message-to-Network. 2011-09-30 20:00:48 +00:00
tbrennan3 7b3a6b3465 Missed a NAK case; got it now! 2011-09-18 19:49:14 +00:00
tbrennan3 ce7e651156 Provided a feedback path, so we can find out if our foreign device registration has been NAK'd. 2011-09-12 21:21:39 +00:00
tbrennan3 364293b075 Added NAK functionality for BBMD commands when not supported.
Also record any BVLL Result returned to us (eg, for foreign device registration).
2011-09-12 20:52:42 +00:00
tbrennan3 46d7daf405 Arranged the BBMD functions so that BBMD_ENABLE shrouds all the code used just by implementations which serve as a BBMD device.
Left the few for registering as a foreign device in the common code body (no #ifdef around them), and moved them to one area toward the end of the file.  (Seemed like too few to justify having their own source code file.) Allow foreign device registration function without requiring BBMD_ENABLE.
2011-09-12 11:54:42 +00:00
tbrennan3 a92160f73d Revised BBMD registration functions to return something approximating a goodness value. (Still too happy for invalid BBMDs, but it's a start.)
Fixed handling of bacapp_decode_context_data() for some of the more unusual (empty, etc) cases I've seen.
2011-08-22 19:45:41 +00:00
skarg 3e1cb1847f Indented project. 2011-08-17 02:27:11 +00:00
skarg 2a0bf4926a Performed standard indent script indent.sh on project files. 2010-12-15 19:02:40 +00:00
skarg 706e0221b6 Changed the client functions to be defined only when BBMD_CLIENT_ENABLED=1, which cleaned up the warnings. 2010-12-15 18:51:03 +00:00
skarg 80185c6a63 Changed lines marked with "dangerous cast" to use memcpy. 2010-11-06 01:27:11 +00:00
bacpack d50eb7fef7 In bvlc.c, IP address and port number are always in the network byte order (including FD_Table[] and BBMD_Table[]).
The only left hton and ntoh functions are in debug_printf() and test functions.
2010-11-05 19:30:20 +00:00
bacpack a639864cc8 In bip.c getter and setter functions of IP address and Port number expect and return values in the network byte order. All ntoh and hton were eliminated from bip.c.
All other modules changed to be consistent.
arm7 port left unchanged.
2010-11-04 13:30:26 +00:00
skarg 9569f2c536 Fixed EOL and performed standard indentation. 2010-09-16 22:00:47 +00:00
skarg b769dcbe1d Indented. 2010-08-18 00:11:35 +00:00
skarg bc0de6b71f Cleaning up code by adding prototypes or include files where required. 2010-08-17 13:51:56 +00:00
skarg 6c9ef7211d Fixed indent script, and indented files. 2010-07-19 23:19:54 +00:00
petermcs 04e99f3671 Changes to reduce the number of warnings with Visual C++2008 warning level 4 to a minimum. 2010-05-14 14:21:48 +00:00
skarg 710cfccfef Indented using indent script. 2010-05-04 21:06:26 +00:00
tbrennan3 cc20f225b9 The beginning of doxygenation:
As a first step, added an @file description for each file.
2010-02-14 05:29:43 +00:00
skarg c04e69da8c Fixed EOL, indent. 2009-10-24 17:02:59 +00:00
skarg cd2c001d66 Corrected BLVC for BDT Ack. 2009-09-29 13:21:19 +00:00
skarg d0dd6127a2 Changed BDT create to correct host/network order of bytes. 2009-09-28 22:52:28 +00:00
skarg b9367b7bde Corrected FDT Ack. 2009-09-28 22:34:11 +00:00
skarg db61a1122f Ran indent script. 2009-07-29 18:06:33 +00:00
minack 88f3aab51d Code cleanup to get rid of some warnings during compilation. 2009-07-08 22:25:54 +00:00
skarg 241e877d23 indented. 2008-07-20 13:22:15 +00:00
skarg f6d792d30d Corrected BBMD for Forwarded-NPDU and Distributed-Broadcast-to-Network. Added source address exclusions to FDT sends. 2008-07-17 14:18:32 +00:00
skarg 7d763e9a7b Debugging BVLC. 2008-07-16 02:43:29 +00:00
skarg 56f9492dcb Corrected BVLC module for Foreign Device registration. 2008-06-23 00:19:17 +00:00
skarg 3d3d7e420d Ran the comment and indent tools on the source code. 2008-04-24 01:07:23 +00:00
skarg df310edca6 Updated Visual Studio ports project, cleaning up compile warnings. 2008-04-10 05:31:08 +00:00
skarg cf9d15631a Indented using indent script. Corrected any C++ comments using the comment script. 2008-03-10 21:00:48 +00:00
skarg cff20d7669 Cleaned up compiler warnings for Borland 5.5 compile. 2008-03-08 15:09:14 +00:00
skarg 9bbac30cf4 Added defines to ease usage with demo applications. 2008-02-20 22:47:16 +00:00