From c1b412f1d94ba717896f876dbf59fffa91e596fc Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 19 Jul 2016 12:54:47 +0100 Subject: io: introduce a DNS resolver API Currently DNS resolution is done automatically as part of the creation of a QIOChannelSocket object instance. This works ok for network clients where you just end up a single network socket, but for servers, the results of DNS resolution may require creation of multiple sockets. Introducing a DNS resolver API allows DNS resolution to be separated from the socket object creation. This will make it practical to create multiple QIOChannelSocket instances for servers. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- util/qemu-sockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/qemu-sockets.c') diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index b6d99cbf42..7c120c45ce 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -114,8 +114,8 @@ NetworkAddressFamily inet_netfamily(int family) * outside scope of this method and not currently handled by * callers at all. */ -static int inet_ai_family_from_address(InetSocketAddress *addr, - Error **errp) +int inet_ai_family_from_address(InetSocketAddress *addr, + Error **errp) { if (addr->has_ipv6 && addr->has_ipv4 && !addr->ipv6 && !addr->ipv4) { -- cgit 1.4.1