Export symbols in order to support shared libraries (#54)
* Add BAC_ROUTING compile definition * Reorder cmake * Fix OpenSSL support: support both 1.0 and 1.1t pus * Explicitly export symbols, hidden by default * Build shared libraries on travis using cmake * Learn Makefile about static library * Fix build using mingw with cmake * Do not cleanup twice or after potential free
This commit is contained in:
committed by
GitHub
parent
bb5fafc06a
commit
4a916468c6
@@ -33,6 +33,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
#include "bacnet/datalink/bvlc6.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -40,19 +41,24 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* user application function prototypes */
|
||||
BACNET_STACK_EXPORT
|
||||
int bvlc6_handler(
|
||||
BACNET_IP6_ADDRESS *addr,
|
||||
BACNET_ADDRESS * src,
|
||||
uint8_t * npdu,
|
||||
uint16_t npdu_len);
|
||||
BACNET_STACK_EXPORT
|
||||
int bvlc6_register_with_bbmd(
|
||||
BACNET_IP6_ADDRESS *bbmd_addr,
|
||||
uint32_t vmac_src,
|
||||
uint16_t time_to_live_seconds);
|
||||
BACNET_STACK_EXPORT
|
||||
uint16_t bvlc6_get_last_result(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
uint8_t bvlc6_get_function_code(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
void bvlc6_init(void);
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
|
||||
/* define the max MAC as big as IPv6 + port number */
|
||||
#define VMAC_MAC_MAX 18
|
||||
@@ -26,22 +27,32 @@ struct vmac_data {
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
unsigned int VMAC_Count(void);
|
||||
BACNET_STACK_EXPORT
|
||||
struct vmac_data *VMAC_Find_By_Key(uint32_t device_id);
|
||||
BACNET_STACK_EXPORT
|
||||
bool VMAC_Find_By_Data(struct vmac_data *vmac, uint32_t *device_id);
|
||||
BACNET_STACK_EXPORT
|
||||
bool VMAC_Add(uint32_t device_id, struct vmac_data *pVMAC);
|
||||
BACNET_STACK_EXPORT
|
||||
bool VMAC_Delete(uint32_t device_id);
|
||||
BACNET_STACK_EXPORT
|
||||
bool VMAC_Different(
|
||||
struct vmac_data *vmac1,
|
||||
struct vmac_data *vmac2);
|
||||
BACNET_STACK_EXPORT
|
||||
bool VMAC_Match(
|
||||
struct vmac_data *vmac1,
|
||||
struct vmac_data *vmac2);
|
||||
BACNET_STACK_EXPORT
|
||||
void VMAC_Cleanup(void);
|
||||
BACNET_STACK_EXPORT
|
||||
void VMAC_Init(void);
|
||||
|
||||
#ifdef TEST
|
||||
#include "ctest.h"
|
||||
BACNET_STACK_EXPORT
|
||||
void testVMAC(
|
||||
Test * pTest);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user