mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
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 <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
59de517d8d
commit
c1b412f1d9
5 changed files with 509 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue