summaryrefslogtreecommitdiff
path: root/src/rpc/virnetsocket.h
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-05-21 15:51:28 +0100
committerDaniel P. Berrange <berrange@redhat.com>2015-06-11 12:11:18 +0100
commitd587704cc797735db794ac6f6cf9aa672746f94a (patch)
tree69fe24a01b81d7f63b4fa232f9ce0be3793c5c88 /src/rpc/virnetsocket.h
parentc0ef99525d55aecbcf84dea73ba6753c243680ca (diff)
downloadlibvirt-d587704cc797735db794ac6f6cf9aa672746f94a.tar.gz
rpc: allow selection of TCP address family
By default, getaddrinfo() will return addresses for both IPv4 and IPv6 if both protocols are enabled, and so the RPC code will listen/connect to both protocols too. There may be cases where it is desirable to restrict this to just one of the two protocols, so add an 'int family' parameter to all the TCP related APIs. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'src/rpc/virnetsocket.h')
-rw-r--r--src/rpc/virnetsocket.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/virnetsocket.h b/src/rpc/virnetsocket.h
index 86bc2f6cda..a8ff8a9e48 100644
--- a/src/rpc/virnetsocket.h
+++ b/src/rpc/virnetsocket.h
@@ -47,6 +47,7 @@ typedef void (*virNetSocketIOFunc)(virNetSocketPtr sock,
int virNetSocketNewListenTCP(const char *nodename,
const char *service,
+ int family,
virNetSocketPtr **addrs,
size_t *naddrs);
@@ -61,6 +62,7 @@ int virNetSocketNewListenFD(int fd,
int virNetSocketNewConnectTCP(const char *nodename,
const char *service,
+ int family,
virNetSocketPtr *addr);
int virNetSocketNewConnectUNIX(const char *path,
@@ -84,6 +86,7 @@ int virNetSocketNewConnectSSH(const char *nodename,
int virNetSocketNewConnectLibSSH2(const char *host,
const char *port,
+ int family,
const char *username,
const char *privkey,
const char *knownHosts,