aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h.in
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-12-04 10:09:01 +0100
committerLuca Deri <deri@ntop.org>2021-12-04 10:09:01 +0100
commitfe2822c6a8fcbf9e0a4bb9ee7558cbd0c310e067 (patch)
treeab0a32b8f38cd5b73d3d688f179e62249c6479b3 /src/include/ndpi_api.h.in
parent6ab1367846bfa7aeba578e363e46a1acccb9c477 (diff)
Added example for finding similarities in RRDs using nDPI statistical APIs
Diffstat (limited to 'src/include/ndpi_api.h.in')
-rw-r--r--src/include/ndpi_api.h.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in
index 243b16ad8..1cc96e854 100644
--- a/src/include/ndpi_api.h.in
+++ b/src/include/ndpi_api.h.in
@@ -1564,16 +1564,17 @@ extern "C" {
/* ******************************* */
- int ndpi_init_bin(struct ndpi_bin *b, enum ndpi_bin_family f, u_int8_t num_bins);
+ int ndpi_init_bin(struct ndpi_bin *b, enum ndpi_bin_family f, u_int16_t num_bins);
void ndpi_free_bin(struct ndpi_bin *b);
struct ndpi_bin* ndpi_clone_bin(struct ndpi_bin *b);
- void ndpi_inc_bin(struct ndpi_bin *b, u_int8_t slot_id, u_int32_t val);
- void ndpi_set_bin(struct ndpi_bin *b, u_int8_t slot_id, u_int32_t value);
- u_int32_t ndpi_get_bin_value(struct ndpi_bin *b, u_int8_t slot_id);
+ void ndpi_inc_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int32_t val);
+ void ndpi_set_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int32_t value);
+ u_int32_t ndpi_get_bin_value(struct ndpi_bin *b, u_int16_t slot_id);
void ndpi_reset_bin(struct ndpi_bin *b);
void ndpi_normalize_bin(struct ndpi_bin *b);
char* ndpi_print_bin(struct ndpi_bin *b, u_int8_t normalize_first, char *out_buf, u_int out_buf_len);
- float ndpi_bin_similarity(struct ndpi_bin *b1, struct ndpi_bin *b2, u_int8_t normalize_first);
+ float ndpi_bin_similarity(struct ndpi_bin *b1, struct ndpi_bin *b2,
+ u_int8_t normalize_first, float similarity_max_threshold);
int ndpi_cluster_bins(struct ndpi_bin *bins, u_int16_t num_bins,
u_int8_t num_clusters, u_int16_t *cluster_ids,
struct ndpi_bin *centroids);