aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.seed10
-rw-r--r--src/include/ndpi_api.h.in (renamed from src/include/ndpi_api.h)2
2 files changed, 10 insertions, 2 deletions
diff --git a/configure.seed b/configure.seed
index ead7f7a0f..568be4f1b 100644
--- a/configure.seed
+++ b/configure.seed
@@ -40,9 +40,15 @@ if test -d ".git"; then :
#
GIT_NUM=`git log --pretty=oneline | wc -l | tr -d '[[:space:]]'`
GIT_RELEASE="${PACKAGE_VERSION}-${GIT_NUM}-${GIT_TAG}"
+
+ A=`git log src/include/ndpi_typedefs.h|wc -l`
+ B=`git log src/include/ndpi_protocol_ids.h|wc -l`
+ C=`git log src/include/ndpi_api.h.in|wc -l`
+ NDPI_API_VERSION=$((A+B+B))
else
GIT_RELEASE="${PACKAGE_VERSION}"
GIT_DATE=`date -u -r CHANGELOG.md`
+ NDPI_API_VERSION=`date +%s`
fi
AC_DEFINE_UNQUOTED(NDPI_GIT_RELEASE, "${GIT_RELEASE}", [GIT Release])
@@ -179,7 +185,8 @@ if test "${with_pcre+set}" = set; then :
fi
fi
-AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile python/Makefile fuzz/Makefile])
+
+AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile python/Makefile fuzz/Makefile src/include/ndpi_api.h])
AC_CONFIG_HEADERS(src/include/ndpi_config.h)
AC_SUBST(GIT_RELEASE)
AC_SUBST(NDPI_MAJOR)
@@ -195,4 +202,5 @@ AC_SUBST(DL_LIB)
AC_SUBST(DPDK_TARGET)
AC_SUBST(HAVE_PTHREAD_SETAFFINITY_NP)
AC_SUBST(CUSTOM_NDPI)
+AC_SUBST(NDPI_API_VERSION)
AC_OUTPUT
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h.in
index 5028f111b..fb409c0eb 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) )