#pragma once

#ifdef __cplusplus
extern "C"
{
#endif

struct session_filter *session_filter_new(uint32_t capacity, uint32_t timeout, double error_rate, uint64_t now);
void session_filter_free(struct session_filter *filter);

// return 1: found
// reutrn 0: no found
int session_filter_lookup(struct session_filter *filter, const struct tuple6 *key, uint64_t now);
void session_filter_add(struct session_filter *filter, const struct tuple6 *key, uint64_t now);

#ifdef __cplusplus
}
#endif
