aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2018-03-21 18:33:08 +0100
committerLuca <deri@ntop.org>2018-03-21 18:33:08 +0100
commita2acd092634d1cfc04e89c874d584a16ae54f3ea (patch)
tree88bff31f9dcfacd0a4278aaba1cae6ed82d40bdb /example
parent957b01aa716d3477d2a4530ca12ff209cd225321 (diff)
Added ndpi_get_api_version() API call to be used in applications that
are dynamically linking with nDPI, to make sure the APIs are in sync
Diffstat (limited to 'example')
-rw-r--r--example/ndpiReader.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 38ce75b14..ddd83bb74 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -3142,6 +3142,11 @@ int main(int argc, char **argv) {
#endif
int i;
+ if(ndpi_get_api_version() != NDPI_API_VERSION) {
+ printf("nDPI Library version mismatch: please make sure this code and the nDPI library are in sync\n");
+ return(-1);
+ }
+
automataUnitTest();
ndpi_info_mod = ndpi_init_detection_module();