redjack/ipset — Issue #8: libipset needs a lookup function
Author: JohnMcHugh
Created: 2012-02-29 14:20:21+00:00
State: open

In order to use the bdd based ipsets in a filter, a function is needed to determine whether or not a given IP is in a given set.

bool ipset_contains_ip(struct ip_set *set, struct cork_ip *addr);

Probably with the variants for ipv4 and ipv6 addresses

bool ipset_contains_ipv4(struct ip_set *set, struct cork_ipv4 *addr);
bool ipset_contains_ipv6(struct ip_set *set, struct cork_ipv6 *addr);