--- ares.h	2007-11-15 16:40:48.000000000 -0600
+++ ares.h	2008-03-17 19:59:47.000000000 -0500
@@ -197,6 +197,13 @@
   int nsort;
 };
 
+struct ares_config_info {
+	int timeout;
+	int tries;
+	int numservers;
+	char **servers;
+};
+
 struct hostent;
 struct timeval;
 struct sockaddr;
@@ -284,6 +291,8 @@
 void ares_free_hostent(struct hostent *host);
 const char *ares_strerror(int code);
 
+int ares_get_config(struct ares_config_info *d, ares_channel c);
+
 #ifdef  __cplusplus
 }
 #endif
--- ares_init.c	2007-10-23 02:51:59.000000000 -0500
+++ ares_init.c	2008-03-17 20:01:41.000000000 -0500
@@ -1390,3 +1390,24 @@
   ares__rc4(key, (unsigned char *)&r, sizeof(r));
   return r;
 }
+
+int ares_get_config(struct ares_config_info *d, ares_channel c)
+{
+	int i;
+	char *p;
+
+	memset(d, 0, sizeof(struct ares_config_info));
+
+	d->timeout = c->timeout;
+	d->tries = c->tries;
+	d->numservers = c->nservers;
+	d->servers = calloc(sizeof(char *), c->nservers);
+
+	for (i = 0; i < c->nservers; i++)
+	{
+		p = inet_ntoa(c->servers[i].addr);
+		d->servers[i] = p ? strdup(p) : NULL;
+	}
+
+	return ARES_SUCCESS;
+}
