From 5c9372c4a8678c6856360891180b02c2fdf688ee Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 20 Jul 2011 19:35:07 +0400 Subject: * 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 --- src/dns.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/dns.h') diff --git a/src/dns.h b/src/dns.h index 794714380..ba2a60c6e 100644 --- a/src/dns.h +++ b/src/dns.h @@ -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 -- cgit v1.2.3