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/dns.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/dns.h')
-rw-r--r-- | src/dns.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -227,11 +227,35 @@ struct dns_query { }; /* Rspamd DNS API */ + +/* + * Init DNS resolver, params are obtained from a config file or system file /etc/resolv.conf + */ struct rspamd_dns_resolver *dns_resolver_init (struct config_file *cfg); + +/* + * Make a DNS request + * @param resolver resolver object + * @param session async session to register event + * @param pool memory pool for storage + * @param cb callback to call on resolve completing + * @param ud user data for callback + * @param type request type + * @param ... string or ip address based on a request type + * @return TRUE if request was sent. + */ gboolean make_dns_request (struct rspamd_dns_resolver *resolver, struct rspamd_async_session *session, memory_pool_t *pool, dns_callback_type cb, gpointer ud, enum rspamd_request_type type, ...); + +/* + * Get textual presentation of DNS error code + */ const gchar *dns_strerror (enum dns_rcode rcode); + +/* + * Get textual presentation of DNS request type + */ const gchar *dns_strtype (enum rspamd_request_type type); #endif |