Also added possibility for RMP of encoding large items in-line in the response packet so that the object RP handlers know how much space they really have without the need for a full APDU buffer being maintained.
1. Top (main) makefile defines build configuration variables and export them for sub-makes to use. BAC_ROUTING is defined here - is has been removed from config.h.
2. A new makefile has been added in demo subdirectory. It builds the demo applications. NOTE: the 'ports' target is not build.
Renamed Lookup_Routed_Device_Address() as Routed_Device_Address_Lookup(), and replaced it in the routed npdu handler with a function that finds the "next" gateway or routed device, as per the destination address. (Less tied to the specifics of the gw_device.c implementation.)
Fixed a few build warnings (eg, %zu for size_t arguments).
Until we improve the makefile system, I've enabled BAC_ROUTING in config.h
For building, made it possible to include or exclude the routing functionality with simple changes in the main Makefile and enables in lib/Makefile and include/config.h
The Device object (device.c and .h) was extended to support the virtually routed Devices, with most of the new functions in new file gw_device.c to replace their simpler cousins in device.c.
bip_get_xxx() deliver address and port in host order. Used htonl,htons to marshal them into PDU.
Fixed the BVLC beheading in the Forwarded Message case - Usually the BVLC header is 4 octets long. It's 10 octets in this case.
Extracted source address from BVLC header for forwards since it contains the original MAC address we are supposed to talk to.
Fixed the byte order of IP and port on unicast outgoing DA.
Added BBMD_ENABLED to config.h file to allow enable and disable of BBMD at compile time.
Thank you to Tomás Zerolo for the patch!