6 #include "bpf-filter.hh"
11 #include <boost/multi_index_container.hpp>
12 #include <boost/multi_index/ordered_index.hpp>
17 DynBPFFilter(std::shared_ptr<BPFFilter> bpf): d_bpf(bpf)
23 void block(const ComboAddress& addr, const struct timespec& until);
24 void purgeExpired(const struct timespec& now);
28 BlockEntry(const ComboAddress& addr, const struct timespec until): d_addr(addr), d_until(until)
32 struct timespec d_until;
34 typedef multi_index_container<BlockEntry,
36 ordered_unique< member<BlockEntry,ComboAddress,&BlockEntry::d_addr>, ComboAddress::addressOnlyLessThan >,
37 ordered_non_unique< member<BlockEntry,struct timespec,&BlockEntry::d_until> >
40 container_t d_entries;
42 std::shared_ptr<BPFFilter> d_bpf;
45 #endif /* HAVE_EBPF */