rename packet_filter to packet_dabloom

This commit is contained in:
luwenpeng
2024-11-07 19:09:26 +08:00
parent e734af76d8
commit e93480d05d
6 changed files with 56 additions and 56 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
struct packet;
// Duplicated Packet Filter for IPv4 Packet
struct packet_dabloom;
struct packet_dabloom *packet_dabloom_new(uint32_t capacity, uint32_t timeout, double error_rate, uint64_t now);
void packet_dabloom_free(struct packet_dabloom *pkt_dab);
// return 1: found
// reutrn 0: no found
int packet_dabloom_lookup(struct packet_dabloom *pkt_dab, const struct packet *pkt, uint64_t now);
void packet_dabloom_add(struct packet_dabloom *pkt_dab, const struct packet *pkt, uint64_t now);
#ifdef __cplusplus
}
#endif