Added ndpi_reset_data_analysis() API call
This commit is contained in:
@@ -1028,6 +1028,7 @@ extern "C" {
|
||||
struct ndpi_analyze_struct* ndpi_alloc_data_analysis(u_int16_t _max_series_len);
|
||||
void ndpi_init_data_analysis(struct ndpi_analyze_struct *s, u_int16_t _max_series_len);
|
||||
void ndpi_free_data_analysis(struct ndpi_analyze_struct *d);
|
||||
void ndpi_reset_data_analysis(struct ndpi_analyze_struct *d);
|
||||
void ndpi_data_add_value(struct ndpi_analyze_struct *s, const u_int32_t value);
|
||||
|
||||
/* Sliding-window only */
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user