Fixed router app after BACnet IPv4 refactor
This commit is contained in:
@@ -9,6 +9,7 @@ before_install:
|
|||||||
- sudo apt-get install -qq libnewlib-arm-none-eabi
|
- sudo apt-get install -qq libnewlib-arm-none-eabi
|
||||||
- sudo apt-get install -qq gcc-avr avr-libc binutils-avr
|
- sudo apt-get install -qq gcc-avr avr-libc binutils-avr
|
||||||
- sudo apt-get install -qq mingw-w64
|
- sudo apt-get install -qq mingw-w64
|
||||||
|
- sudo apt-get install -qq libconfig-dev
|
||||||
|
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
@@ -36,6 +37,10 @@ jobs:
|
|||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
script: make clean gateway
|
script: make clean gateway
|
||||||
|
- stage: router
|
||||||
|
os: linux
|
||||||
|
compiler: gcc
|
||||||
|
script: make clean router
|
||||||
- stage: mstp-build
|
- stage: mstp-build
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ SRCS = main.c \
|
|||||||
${BACNET_PORT_DIR}/mstimer-init.c \
|
${BACNET_PORT_DIR}/mstimer-init.c \
|
||||||
${BACNET_PORT_DIR}/bip-init.c \
|
${BACNET_PORT_DIR}/bip-init.c \
|
||||||
${BACNET_PORT_DIR}/dlmstp_linux.c \
|
${BACNET_PORT_DIR}/dlmstp_linux.c \
|
||||||
${BACNET_SOURCE_DIR}/datalink/bip.c \
|
${BACNET_SOURCE_DIR}/basic/bbmd/h_bbmd.c \
|
||||||
${BACNET_SOURCE_DIR}/datalink/bvlc.c \
|
${BACNET_SOURCE_DIR}/datalink/bvlc.c \
|
||||||
${BACNET_SOURCE_DIR}/basic/sys/fifo.c \
|
${BACNET_SOURCE_DIR}/basic/sys/fifo.c \
|
||||||
${BACNET_SOURCE_DIR}/datalink/mstp.c \
|
${BACNET_SOURCE_DIR}/datalink/mstp.c \
|
||||||
@@ -43,7 +43,7 @@ SRCS = main.c \
|
|||||||
portthread.c \
|
portthread.c \
|
||||||
msgqueue.c \
|
msgqueue.c \
|
||||||
network_layer.c
|
network_layer.c
|
||||||
|
|
||||||
CFLAGS = -I${SOURCE_DIR} -I${BACNET_PORT_DIR}
|
CFLAGS = -I${SOURCE_DIR} -I${BACNET_PORT_DIR}
|
||||||
|
|
||||||
OBJS = ${SRCS:.c=.o}
|
OBJS = ${SRCS:.c=.o}
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ uint8_t test_packet[] = { 0x81, 0x0a, 0x00, 0x16, /* BVLC header */
|
|||||||
0x55 }; /* APDU */
|
0x55 }; /* APDU */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int get_local_address_ioctl(
|
|
||||||
char *ifname, struct in_addr *addr, int request);
|
|
||||||
|
|
||||||
void *dl_ip_thread(void *pArgs)
|
void *dl_ip_thread(void *pArgs)
|
||||||
{
|
{
|
||||||
MSGBOX_ID msgboxid;
|
MSGBOX_ID msgboxid;
|
||||||
@@ -147,12 +144,12 @@ bool dl_ip_init(ROUTER_PORT *port, IP_DATA *ip_data)
|
|||||||
|
|
||||||
/* get local address */
|
/* get local address */
|
||||||
status =
|
status =
|
||||||
get_local_address_ioctl(port->iface, &ip_data->local_addr, SIOCGIFADDR);
|
bip_get_local_address_ioctl(port->iface, &ip_data->local_addr, SIOCGIFADDR);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/* get broadcast address */
|
/* get broadcast address */
|
||||||
status = get_local_address_ioctl(
|
status = bip_get_local_address_ioctl(
|
||||||
port->iface, &ip_data->broadcast_addr, SIOCGIFBRDADDR);
|
port->iface, &ip_data->broadcast_addr, SIOCGIFBRDADDR);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -31,12 +31,13 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include "bacport.h"
|
||||||
#include "portthread.h"
|
#include "portthread.h"
|
||||||
#include "bacnet/datalink/bip.h"
|
#include "bacnet/datalink/bip.h"
|
||||||
|
|
||||||
#define MAX_BIP_APDU 1476
|
#define MAX_BIP_APDU 1476
|
||||||
#define MAX_BIP_PDU (MAX_NPDU + MAX_BIP_APDU)
|
#define MAX_BIP_PDU (MAX_NPDU + MAX_BIP_APDU)
|
||||||
#define MAX_BIP_MPDU (MAX_HEADER + MAX_BIP_PDU)
|
#define MAX_BIP_MPDU (BIP_HEADER_MAX + MAX_BIP_PDU)
|
||||||
/* Yes, we know this is longer than an Ethernet Frame,
|
/* Yes, we know this is longer than an Ethernet Frame,
|
||||||
a UDP payload and an IPv6 packet.
|
a UDP payload and an IPv6 packet.
|
||||||
Grandfathered in from BACnet Ethernet days,
|
Grandfathered in from BACnet Ethernet days,
|
||||||
|
|||||||
Reference in New Issue
Block a user