20.04.2016 17:05, Nikolay Shirokovskiy пишет:
Signed-off-by: Nikolay Shirokovskiy
<nshirokovskiy(a)virtuozzo.com>
---
src/libvirt_private.syms | 1 +
src/vz/vz_sdk.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 2b55369..3f2845b 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2185,6 +2185,7 @@ virSocketAddrEqual;
virSocketAddrFormat;
virSocketAddrFormatFull;
virSocketAddrGetIpPrefix;
+virSocketAddrGetNumNetmaskBits;
virSocketAddrGetPort;
virSocketAddrGetRange;
virSocketAddrIsNetmask;
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 29b31a2..db85558 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -727,6 +727,91 @@ prlsdkAddDomainOpticalDisksInfo(vzDriverPtr driver, PRL_HANDLE
sdkdom, virDomain
return -1;
}
+static virDomainNetIpDefPtr
+prlsdkParseNetAddress(char *addr)
+{
+ char *maskstr = NULL;
+ int nbits;
+ virSocketAddr mask;
+ virDomainNetIpDefPtr ip = NULL, ret = NULL;
+
+ if (!(maskstr = strchr(addr, '/')))
+ goto cleanup;
+
+ *maskstr = '\0';
+ ++maskstr;
why not *maskstr++ = '\0'; ?
Anyway, ACK :)