aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/radix.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-21 17:48:28 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-21 17:48:28 +0100
commit875707dcc1f2dff45af8da88c93b6d5a658baf4f (patch)
treeba3bcc3d3ca565ddc321ff3e5a83f65aad6b8a5d /src/libutil/radix.h
parent0645b75e9671ece4756ab5c3477acf00c9bca015 (diff)
downloadrspamd-875707dcc1f2dff45af8da88c93b6d5a658baf4f.tar.gz
rspamd-875707dcc1f2dff45af8da88c93b6d5a658baf4f.zip
Add function `radix32_tree_find_addr`.
Diffstat (limited to 'src/libutil/radix.h')
-rw-r--r--src/libutil/radix.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/radix.h b/src/libutil/radix.h
index 4cc2873c7..88f345e3d 100644
--- a/src/libutil/radix.h
+++ b/src/libutil/radix.h
@@ -3,6 +3,7 @@
#include "config.h"
#include "mem_pool.h"
+#include "util.h"
#define RADIX_NO_VALUE (uintptr_t)-1
@@ -70,6 +71,14 @@ gint radix32tree_delete (radix_tree_t *tree, guint32 key, guint32 mask);
uintptr_t radix32tree_find (radix_tree_t *tree, guint32 key);
/**
+ * Find specified address in tree (works only for ipv4 addresses)
+ * @param tree
+ * @param addr
+ * @return
+ */
+uintptr_t radix32_tree_find_addr (radix_tree_t *tree, rspamd_inet_addr_t *addr);
+
+/**
* Traverse via the whole tree calling specified callback
*/
void radix32tree_traverse (radix_tree_t *tree, radix_tree_traverse_func func, void *user_data);