summaryrefslogtreecommitdiffstats
path: root/include/hash.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-07-17 13:36:05 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-07-17 13:36:05 +0200
commita1d03b775376aa8545ec9a0e89381b659e4d28ed (patch)
treedbce19e61288f5a4d31154e55a1e53553416bc72 /include/hash.h
parent9406f29b89f6727c3db5485d109466701393b4d4 (diff)
conntrackd: add iterators with limited steps in hash and cache types
This patch adds cache_iterate_limit() and hashtable_iterate_limit() that allows to limit the iteration to given a number of states. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/hash.h')
-rw-r--r--include/hash.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hash.h b/include/hash.h
index 68d618b..eaa9e96 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -37,7 +37,8 @@ int hashtable_add(struct hashtable *table, struct hashtable_node *n, int id);
void hashtable_del(struct hashtable *table, struct hashtable_node *node);
int hashtable_flush(struct hashtable *table);
int hashtable_iterate(struct hashtable *table, void *data,
- int (*iterate)(void *data, struct hashtable_node *n));
+ int (*iterate)(void *data, void *n));
+int hashtable_iterate_limit(struct hashtable *table, void *data, uint32_t from, uint32_t steps, int (*iterate)(void *data1, void *n));
unsigned int hashtable_counter(const struct hashtable *table);
#endif