Add support for MX, TXT, NS and SOA records to GResolver

* Add resolver functions for looking up DNS records of
   various types. Currently implemented: MX, TXT, SOA, SRV, NS
 * Return records as GVariant tuples.
 * Make the GSrvTarget lookups a wrapper over this new
   functionality.
 * Rework the resolver test so that it has support for
   looking up MX, NS, SOA, TXT records, and uses GOptionContext

https://bugzilla.gnome.org/show_bug.cgi?id=672944
This commit is contained in:
Stef Walter
2012-04-04 17:13:10 +02:00
parent cec17df598
commit 666374c16f
8 changed files with 862 additions and 102 deletions

View File

@@ -95,13 +95,19 @@ char *_g_resolver_name_from_nameinfo (GInetAddress *address,
GError **error);
#if defined(G_OS_UNIX)
GList *_g_resolver_targets_from_res_query (const gchar *rrname,
gint _g_resolver_record_type_to_rrtype (GResolverRecordType record_type);
GList *_g_resolver_records_from_res_query (const gchar *rrname,
gint rrtype,
guchar *answer,
gint len,
gint herr,
GError **error);
#elif defined(G_OS_WIN32)
GList *_g_resolver_targets_from_DnsQuery (const gchar *rrname,
WORD _g_resolver_record_type_to_dnstype (GResolverRecordType record_type);
GList *_g_resolver_records_from_DnsQuery (const gchar *rrname,
WORD dnstype,
DNS_STATUS status,
DNS_RECORD *results,
GError **error);