From 64fb40d21ed81acadd5bd51fc68924b6e37135c6 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Fri, 17 Jul 2020 13:16:01 +0200 Subject: Added ndpi_reset_data_analysis() API call --- src/lib/ndpi_analyze.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/lib') diff --git a/src/lib/ndpi_analyze.c b/src/lib/ndpi_analyze.c index 489b402f6..a2fe557ae 100644 --- a/src/lib/ndpi_analyze.c +++ b/src/lib/ndpi_analyze.c @@ -75,6 +75,14 @@ void ndpi_free_data_analysis(struct ndpi_analyze_struct *d) { /* ********************************************************************************* */ +void ndpi_reset_data_analysis(struct ndpi_analyze_struct *d) { + memset(d, 0, sizeof(struct ndpi_analyze_struct)); + memset(d->values, 0, sizeof(u_int32_t)*d->num_values_array_len); + d->num_data_entries = 0; +} + +/* ********************************************************************************* */ + /* Add a new point to analyze */ -- cgit v1.2.3