Feature/router bsd (#821)

* fix router compile warnings declaration-after-statement overlength-strings

* router disable PRINT(debug_level)

* ports rename dlmstp_[linux|bsd] to dlmstp_port

* copy ports/linux/dlmstp_port.c ports/bsd/dlmstp_port.c

* copy ports/linux/dlmstp_port.c ports/bsd/dlmstp_port.c

* fix typedef in bip_get_local_address_ioctl

* copy ports/linux/dlmstp_port.c ports/bsd/dlmstp_port.c

* add bsd support for router app

* fix clang __attribute__ optimize dont work
clang O2/O3/Os are also not working

* fix pre-commit

* fix bsd SO_BINDTODEVICE is not available

* add brew install libconfig for app router and bsd

* fix BACDL_MSTP test on macOS

* remove old comments
This commit is contained in:
Patrick Grimm
2024-10-21 14:53:01 +02:00
committed by GitHub
parent 57c3b81bb1
commit b9de08cf60
18 changed files with 1127 additions and 103 deletions
+1 -1
View File
@@ -98,6 +98,6 @@ extern int bip_get_local_netmask(struct in_addr *netmask);
BACNET_STACK_EXPORT
extern int bip_get_local_address_ioctl(
const char *ifname, struct in_addr *addr, int request);
const char *ifname, struct in_addr *addr, uint32_t request);
#endif
+1 -1
View File
@@ -499,7 +499,7 @@ get_local_ifr_ioctl(const char *ifname, struct ifreq *ifr, int request)
* @return 0 on success, else the error from the ioctl() call.
*/
int bip_get_local_address_ioctl(
const char *ifname, struct in_addr *addr, int request)
const char *ifname, struct in_addr *addr, uint32_t request)
{
struct ifreq ifr = { 0 };
struct sockaddr_in *tcpip_address;
@@ -22,12 +22,13 @@
#include "bacnet/basic/sys/ringbuf.h"
#include "bacnet/basic/sys/debug.h"
/* port specific */
#include "dlmstp_linux.h"
#include "dlmstp_port.h"
#include "rs485.h"
/* OS Specific include */
#include "bacport.h"
/** @file linux/dlmstp.c Provides Linux-specific DataLink functions for MS/TP.
/** @file linux/dlmstp_port.c Provides Linux-specific DataLink functions for
* MS/TP.
*/
#define BACNET_PDU_CONTROL_BYTE_OFFSET 1
+1 -1
View File
@@ -42,7 +42,7 @@
#include <sys/select.h>
#include <sys/time.h>
#include "dlmstp_linux.h"
#include "dlmstp_port.h"
/* Posix serial programming reference:
http://www.easysw.com/~mike/serial/serial.html */