aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_api.h.in (renamed from src/include/ndpi_api.h)4
-rw-r--r--src/lib/ndpi_main.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h.in
index 5028f111b..75a1bb5e2 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h.in
@@ -34,7 +34,7 @@ extern "C" {
/* The #define below is used for apps that dynamically link with nDPI to make
sure that datastructures and in sync across versions
*/
-#define NDPI_API_VERSION 1
+#define NDPI_API_VERSION @NDPI_API_VERSION@
#define SIZEOF_ID_STRUCT ( sizeof(struct ndpi_id_struct) )
#define SIZEOF_FLOW_STRUCT ( sizeof(struct ndpi_flow_struct) )
@@ -852,7 +852,7 @@ extern "C" {
//void * ndpi_malloc(size_t size);
//void * ndpi_calloc(unsigned long count, size_t size);
//void ndpi_free(void *ptr);
- u_int8_t ndpi_get_api_version(void);
+ int ndpi_get_api_version(void);
/* https://github.com/corelight/community-id-spec */
int ndpi_flowv4_flow_hash(u_int8_t l4_proto, u_int32_t src_ip, u_int32_t dst_ip, u_int16_t src_port, u_int16_t dst_port,
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index e6d7385e5..8a24e506d 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -6544,7 +6544,7 @@ void NDPI_DUMP_BITMASK(NDPI_PROTOCOL_BITMASK a) {
}
#endif
-u_int8_t ndpi_get_api_version() {
+int ndpi_get_api_version() {
return(NDPI_API_VERSION);
}