aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-10-29 10:29:12 +0100
committerLuca Deri <deri@ntop.org>2019-10-29 10:29:12 +0100
commit42c8d3ac273ef92ef507a01aff8f3127840cda3b (patch)
treeb2547335b21522eb8def4948edf5ac07ebfc00c0 /src/lib/ndpi_main.c
parentd53563ab4651f0bb70fbcc48193e450d92e4c8cd (diff)
Added ability to defien custom protocols
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index b65a1f36f..31f2e362d 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -1778,6 +1778,10 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */
);
+#ifdef CUSTOM_NDPI_PROTOCOLS
+#include "../../../nDPI-custom/custom_ndpi_main.c"
+#endif
+
/* calling function for host and content matched protocols */
init_string_based_protocols(ndpi_str);
@@ -1786,6 +1790,12 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
/* ****************************************************** */
+#ifdef CUSTOM_NDPI_PROTOCOLS
+#include "../../../nDPI-custom/custom_ndpi_protocols.c"
+#endif
+
+/* ****************************************************** */
+
static int ac_match_handler(AC_MATCH_t *m, AC_TEXT_t *txt, AC_REP_t *match) {
int min_len = (txt->length < m->patterns->length) ? txt->length : m->patterns->length;
char buf[64] = { '\0' };