diff --git a/src/filter.c b/src/filter.c index 91efa43..ca837e6 100644 --- a/src/filter.c +++ b/src/filter.c @@ -96,6 +96,8 @@ f2b_filter_create(f2b_config_section_t *config, const char *file) { goto cleanup; if ((*(void **) (&filter->ready) = dlsym(filter->h, "ready")) == NULL) goto cleanup; + if ((*(void **) (&filter->stats) = dlsym(filter->h, "stats")) == NULL) + goto cleanup; if ((*(void **) (&filter->match) = dlsym(filter->h, "match")) == NULL) goto cleanup; if ((*(void **) (&filter->destroy) = dlsym(filter->h, "destroy")) == NULL) diff --git a/src/filter.h b/src/filter.h index fa4ddb4..c40c955 100644 --- a/src/filter.h +++ b/src/filter.h @@ -18,6 +18,7 @@ typedef struct f2b_filter_t { bool (*append) (void *cfg, const char *pattern); char *(*error) (void *cfg); bool (*ready) (void *cfg); + bool (*stats) (void *cfg, int **matches, char **pattern, bool reset); bool (*match) (void *cfg, const char *line, char *buf, size_t buf_size); void (*destroy) (void *cfg); } f2b_filter_t;