diff options
author | Luca Deri <deri@ntop.org> | 2020-12-30 18:23:40 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-12-30 18:23:40 +0100 |
commit | 32f0446c9c90bb02e11be75381f0855106cdd1ed (patch) | |
tree | 148cc405aa0a19937dd3480cc22a3fe378ef3868 | |
parent | b7376cc6903b0e1e111fad38484e592676883faa (diff) |
Updated ndpi_ptree_match_addr() prototype
-rw-r--r-- | src/include/ndpi_api.h.in | 2 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in index f307af9f1..d6145e99a 100644 --- a/src/include/ndpi_api.h.in +++ b/src/include/ndpi_api.h.in @@ -937,7 +937,7 @@ extern "C" { /* ptree (trie) API */ ndpi_ptree_t* ndpi_ptree_create(void); int ndpi_ptree_insert(ndpi_ptree_t *tree, const ndpi_ip_addr_t *addr, u_int8_t bits, u_int64_t user_data); - int ndpi_ptree_match_addr(ndpi_ptree_t *tree, const ndpi_ip_addr_t *addr, u_int32_t *user_data); + int ndpi_ptree_match_addr(ndpi_ptree_t *tree, const ndpi_ip_addr_t *addr, u_int64_t *user_data); void ndpi_ptree_destroy(ndpi_ptree_t *tree); /* General purpose utilities */ diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 3088f7432..3309e6105 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -6683,7 +6683,7 @@ int ndpi_ptree_insert(ndpi_ptree_t *tree, const ndpi_ip_addr_t *addr, /* ******************************************************************** */ int ndpi_ptree_match_addr(ndpi_ptree_t *tree, - const ndpi_ip_addr_t *addr, uint *user_data) { + const ndpi_ip_addr_t *addr, u_int64_t *user_data) { u_int8_t is_v6 = ndpi_is_ipv6(addr); patricia_tree_t *ptree = is_v6 ? tree->v6 : tree->v4; prefix_t prefix; @@ -6698,7 +6698,7 @@ int ndpi_ptree_match_addr(ndpi_ptree_t *tree, node = ndpi_patricia_search_best(ptree, &prefix); if(node) { - *user_data = node->value.u.uv32.user_value; + *user_data = node->value.u.uv64; return(0); } |