summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-06-04 14:51:42 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-06-04 14:51:42 +0100
commit89a411447ebc068efbe4c841c95adeaf9a1bbcd0 (patch)
tree4808e0e1e26ba10735718c2a6cc3711a5b4e8620 /src/util.h
parentd0544d42a0cd4aa6f1b8d52c90c0e65b9d1c335b (diff)
downloadrspamd-89a411447ebc068efbe4c841c95adeaf9a1bbcd0.tar.gz
rspamd-89a411447ebc068efbe4c841c95adeaf9a1bbcd0.zip
Allow restriction of update commands for fuzzy storage.
Now it is possible to specify ip or networks from which fuzzy updates or removes are possible. Rework sockets logic while I'm here. Create universal utility for parsing ipv4/mask strings.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 6d0bdc098..39473a85e 100644
--- a/src/util.h
+++ b/src/util.h
@@ -381,4 +381,13 @@ void rspamd_hash_table_copy (GHashTable *src, GHashTable *dst,
*/
gpointer rspamd_str_pool_copy (gconstpointer data, gpointer ud);
+/**
+ * Parse ipv4 address with optional mask in CIDR format
+ * @param line cidr notation of ipv4 address
+ * @param ina destination address
+ * @param mask destination mask
+ * @return
+ */
+gboolean parse_ipmask_v4 (const char *line, struct in_addr *ina, int *mask);
+
#endif