aboutsummaryrefslogtreecommitdiff
path: root/src/lib/third_party
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-03-31 19:43:55 +0200
committerLuca Deri <deri@ntop.org>2021-03-31 19:43:55 +0200
commit28879c570e700660e4eab7bbb72064d5e00fbf05 (patch)
tree23bb1bd57b5ac911cd1161630c62876f21a21cc5 /src/lib/third_party
parent1290c40968d757eb429b99ec24e96aca43da7026 (diff)
Reworked ndpi patricia includes to avoid compilation issues on some platforms
Diffstat (limited to 'src/lib/third_party')
-rw-r--r--src/lib/third_party/include/ndpi_patricia.h30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/lib/third_party/include/ndpi_patricia.h b/src/lib/third_party/include/ndpi_patricia.h
index a8478986e..e4617d402 100644
--- a/src/lib/third_party/include/ndpi_patricia.h
+++ b/src/lib/third_party/include/ndpi_patricia.h
@@ -43,6 +43,8 @@
#include "ndpi_api.h"
+#include "ndpi_patricia_typedefs.h"
+
/* typedef unsigned int u_int; */
/* { from defs.h */
#define ndpi_prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
@@ -85,34 +87,6 @@ typedef struct _prefix4_t {
/* } */
-/* pointer to usr data (ex. route flap info) */
-union patricia_node_value_t {
- void *user_data;
-
- /* User-defined values */
- union {
- struct {
- u_int32_t user_value, additional_user_value;
- } uv32;
-
- u_int64_t uv64;
- } u;
-};
-
-typedef struct _ndpi_patricia_node_t {
- u_int16_t bit; /* flag if this node used */
- ndpi_prefix_t *prefix; /* who we are in patricia tree */
- struct _ndpi_patricia_node_t *l, *r; /* left and right children */
- struct _ndpi_patricia_node_t *parent;/* may be used */
- void *data; /* pointer to data */
- union patricia_node_value_t value;
-} ndpi_patricia_node_t;
-
-typedef struct _ndpi_patricia_tree_t {
- ndpi_patricia_node_t *head;
- u_int16_t maxbits; /* for IP, 32 bit addresses */
- int num_active_node; /* for debug purpose */
-} ndpi_patricia_tree_t;
#ifdef WIN32
#define PATRICIA_MAXBITS 128