MINOR: dns: new snr_check_ip_callback function

In the process of breaking links between dns_* functions and other
structures (mainly server and a bit of resolution), the function
dns_get_ip_from_response needs to be reworked: it now can call
"callback" functions based on resolution's owner type to allow modifying
the way the response is processed.

For now, main purpose of the callback function is to check that an IP
address is not already affected to an element of the same type.

For now, only server type has a callback.
diff --git a/include/proto/dns.h b/include/proto/dns.h
index 12f0393..ffb1cac 100644
--- a/include/proto/dns.h
+++ b/include/proto/dns.h
@@ -33,10 +33,11 @@
 int dns_init_resolvers(int close_socket);
 uint16_t dns_rnd16(void);
 int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, struct dns_response_packet *dns_p);
-int dns_get_ip_from_response(struct dns_response_packet *dns_p, struct dns_resolution *resol,
+int dns_get_ip_from_response(struct dns_response_packet *dns_p,
                              struct dns_options *dns_opts, void *currentip,
                              short currentip_sin_family,
-                             void **newip, short *newip_sin_family);
+                             void **newip, short *newip_sin_family,
+                             void *owner);
 void dns_resolve_send(struct dgram_conn *dgram);
 void dns_resolve_recv(struct dgram_conn *dgram);
 int dns_send_query(struct dns_resolution *resolution);
diff --git a/include/proto/server.h b/include/proto/server.h
index 6e3ccf3..ec29230 100644
--- a/include/proto/server.h
+++ b/include/proto/server.h
@@ -55,6 +55,7 @@
 int snr_update_srv_status(struct server *s);
 int snr_resolution_cb(struct dns_resolution *resolution, struct dns_nameserver *nameserver, struct dns_response_packet *dns_p);
 int snr_resolution_error_cb(struct dns_resolution *resolution, int error_code);
+struct server *snr_check_ip_callback(struct server *srv, void *ip, unsigned char *ip_family);
 
 /* increase the number of cumulated connections on the designated server */
 static void inline srv_inc_sess_ctr(struct server *s)