aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2018-05-14 22:58:14 +0200
committerLuca Deri <deri@ntop.org>2018-05-14 22:58:14 +0200
commit66b759ca690425aa94b88b05f5a23818dce0b4be (patch)
treead4dd7439df3ed96057e9d9e1c7d36c036a4535d /src/lib
parent529492e81fa9866f0b4cd22227eb6a499ac5da68 (diff)
Hidden ndpi_detection_module_struct definition
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Makefile.am2
-rw-r--r--src/lib/Makefile.simple2
-rw-r--r--src/lib/ndpi_main.c20
3 files changed, 22 insertions, 2 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index ea29f89f7..b1ff5a072 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = libndpi.la
-CFLAGS += -fPIC -DPIC # --coverage
+CFLAGS += -fPIC -DPIC -DNDPI_LIB_COMPILATION # --coverage
libndpi_la_CPPFLAGS = -I$(top_srcdir)/src/include/ -I$(top_srcdir)/src/lib/third_party/include/ @HS_INC@
libndpi_la_LDFLAGS = -version-info 1:0:0 -export-symbols $(top_srcdir)/libndpi.sym
diff --git a/src/lib/Makefile.simple b/src/lib/Makefile.simple
index 2a6649131..1aae55636 100644
--- a/src/lib/Makefile.simple
+++ b/src/lib/Makefile.simple
@@ -5,7 +5,7 @@
# cd src/lib
# make -f Makefile.simple
#
-CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include
+CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION
RANLIB=ranlib
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) ndpi_main.o
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 0205a6354..43f8d93c6 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -5655,3 +5655,23 @@ void NDPI_DUMP_BITMASK(NDPI_PROTOCOL_BITMASK a) {
u_int8_t ndpi_get_api_version() {
return(NDPI_API_VERSION);
}
+
+ndpi_proto_defaults_t* ndpi_get_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod) {
+ return(ndpi_mod->proto_defaults);
+}
+
+u_int ndpi_get_ndpi_num_supported_protocols(struct ndpi_detection_module_struct *ndpi_mod) {
+ return(ndpi_mod->ndpi_num_supported_protocols);
+}
+
+u_int ndpi_get_ndpi_num_custom_protocols(struct ndpi_detection_module_struct *ndpi_mod) {
+ return(ndpi_mod->ndpi_num_custom_protocols);
+}
+
+u_int ndpi_get_ndpi_detection_module_size() {
+ return(sizeof(struct ndpi_detection_module_struct));
+}
+
+void ndpi_set_log_level(struct ndpi_detection_module_struct *ndpi_mod, u_int l) {
+ ndpi_mod->ndpi_log_level = l;
+}