MINOR: dns: Handle SRV records.

Make it so for each server, instead of specifying a hostname, one can use
a SRV label.
When doing so, haproxy will first resolve the SRV label, then use the
resulting hostnames, as well as port and weight (priority is ignored right
now), to each server using the SRV label.
It is resolved periodically, and any server disappearing from the SRV records
will be removed, and any server appearing will be added, assuming there're
free servers in haproxy.
diff --git a/include/types/dns.h b/include/types/dns.h
index 12c1155..c371d5f 100644
--- a/include/types/dns.h
+++ b/include/types/dns.h
@@ -63,6 +63,7 @@
 #define DNS_RTYPE_A		1	/* IPv4 address */
 #define DNS_RTYPE_CNAME		5	/* canonical name */
 #define DNS_RTYPE_AAAA		28	/* IPv6 address */
+#define DNS_RTYPE_SRV		33	/* SRV record */
 #define DNS_RTYPE_ANY		255	/* all records */
 
 /* dns rcode values */
@@ -318,4 +319,19 @@
 	DNS_UPD_OBSOLETE_IP,		/* The server IP was obsolete, and no other IP was found */
 };
 
+struct dns_srvrq {
+	enum obj_type obj_type;			/* object type == OBJ_TYPE_SRVRQ */
+	struct dns_resolvers *resolvers;	/* pointer to the resolvers structure used for this server template */
+
+	struct dns_resolution *resolution;	/* server name resolution */
+
+	struct proxy *proxy;			/* associated proxy */
+	char *name;
+	char *hostname_dn;			/* server hostname in Domain Name format */
+	int hostname_dn_len;			/* string length of the server hostname in Domain Name format */
+	struct dns_requester *dns_requester;	/* used to link to its DNS resolution */
+	int inter;				/* time in ms */
+	struct list list;			/* Next SRV RQ for the same proxy */
+};
+
 #endif /* _TYPES_DNS_H */
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 5306a3b..a4f3b9e 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -438,6 +438,7 @@
 						 * name is used
 						 */
 	struct list filter_configs;		/* list of the filters that are declared on this proxy */
+	struct list srvrq_list;			/* List of SRV requests associated with this proxy */
 };
 
 struct switching_rule {
diff --git a/include/types/server.h b/include/types/server.h
index 724d496..77263db 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -298,6 +298,7 @@
 		int nb_low;
 		int nb_high;
 	} tmpl_info;
+	struct dns_srvrq *srvrq;		/* Pointer representing the DNS SRV requeest, if any */
 };
 
 /* Descriptor for a "server" keyword. The ->parse() function returns 0 in case of