diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-20 19:35:07 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-20 19:35:07 +0400 |
commit | 5c9372c4a8678c6856360891180b02c2fdf688ee (patch) | |
tree | bc67f5cb057c4784c67e691f76aa8a8f80a40e51 /src/bloom.h | |
parent | 9bc06fea2eac12cc46028fcdd630d291a76b68ae (diff) | |
download | rspamd-5c9372c4a8678c6856360891180b02c2fdf688ee.tar.gz rspamd-5c9372c4a8678c6856360891180b02c2fdf688ee.zip |
* Add start script for red hat compatible systems
Add descriptions for some rspamd API functions (no functional changes).
--HG--
rename : linux/rspamd => linux/rspamd_debian.in
Diffstat (limited to 'src/bloom.h')
-rw-r--r-- | src/bloom.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/bloom.h b/src/bloom.h index bd53613a9..eb3d538ba 100644 --- a/src/bloom.h +++ b/src/bloom.h @@ -24,10 +24,32 @@ guint bloom_ap_hash (const gchar *key); #define DEFAULT_BLOOM_HASHES 8, bloom_sax_hash, bloom_sdbm_hash, bloom_fnv_hash, bloom_rs_hash, bloom_js_hash, bloom_elf_hash, bloom_bkdr_hash, bloom_ap_hash +/* + * Create new bloom filter + * @param size length of bloom buffer + * @param nfuncs number of hash functions + * @param ... hash functions list + */ bloom_filter_t* bloom_create (size_t size, size_t nfuncs, ...); + +/* + * Destroy bloom filter + */ void bloom_destroy (bloom_filter_t * bloom); + +/* + * Add a string to bloom filter + */ gboolean bloom_add (bloom_filter_t * bloom, const gchar *s); + +/* + * Delete a string from bloom filter + */ gboolean bloom_del (bloom_filter_t * bloom, const gchar *s); + +/* + * Check whether this string is in bloom filter (algorithm produces FALSE-POSITIVES, so result must be checked if it is positive) + */ gboolean bloom_check (bloom_filter_t * bloom, const gchar *s); #endif |