[libvirt] [TCK] [PATCH] nwfilter: Add a test case for filtering of gratuitous ARP packets
by Stefan Berger
This patch adds a test for filtering of gratuitous ARP packets to the
TCK tests.
Signed-off-by: Stefan Berger <stefanb(a)linux.vnet.ibm.com>
---
scripts/nwfilter/nwfilterxml2fwallout/arp-test.fwall | 2 ++
scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat | 1 +
scripts/nwfilter/nwfilterxml2xmlin/arp-test.xml | 4 ++++
3 files changed, 7 insertions(+)
Index: libvirt-tck/scripts/nwfilter/nwfilterxml2fwallout/arp-test.fwall
===================================================================
--- libvirt-tck.orig/scripts/nwfilter/nwfilterxml2fwallout/arp-test.fwall
+++ libvirt-tck/scripts/nwfilter/nwfilterxml2fwallout/arp-test.fwall
@@ -4,6 +4,8 @@
-p ARP -s 1:2:3:4:5:6 --arp-op 11 --arp-htype 256 --arp-ptype 0x100 -j
ACCEPT
-p ARP -s 1:2:3:4:5:6 --arp-op 65535 --arp-htype 65535 --arp-ptype
0xffff -j ACCEPT
-p ARP -s 1:2:3:4:5:6 -j ACCEPT
+#ebtables -t nat -L libvirt-O-vnet0 | grep -v "^Bridge" | grep -v "^$"
+-p ARP --arp-gratuitous -j ACCEPT
#ebtables -t nat -L PREROUTING | grep vnet0
-i vnet0 -j libvirt-I-vnet0
Index: libvirt-tck/scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat
===================================================================
--- libvirt-tck.orig/scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat
+++ libvirt-tck/scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat
@@ -26,6 +26,7 @@
-p ARP --arp-op Reply -j ACCEPT
-j DROP
#ebtables -t nat -L O-vnet0-arp | grep -v "^Bridge" | grep -v "^$"
+-p ARP --arp-gratuitous -j ACCEPT
-p ARP --arp-op Reply --arp-mac-dst ! 52:54:0:9f:33:da -j DROP
-p ARP --arp-ip-dst ! 10.1.1.1 -j DROP
-p ARP --arp-op Request -j ACCEPT
Index: libvirt-tck/scripts/nwfilter/nwfilterxml2xmlin/arp-test.xml
===================================================================
--- libvirt-tck.orig/scripts/nwfilter/nwfilterxml2xmlin/arp-test.xml
+++ libvirt-tck/scripts/nwfilter/nwfilterxml2xmlin/arp-test.xml
@@ -30,4 +30,8 @@
<arp srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:ff'
opcode='65536' hwtype='65536' protocoltype='65536' />
</rule>
+
+ <rule action='accept' direction='in'>
+ <arp gratuitous='true'/>
+ </rule>
</filter>
13 years, 6 months
[libvirt] [PATCH] nwfilter: enable filtering of gratuitous ARP packets
by Stefan Berger
This patch enables filtering of gratuitous ARP packets using the
following XML:
<rule action='accept' direction='in' priority='425'>
<arp gratuitous='true'/>
</rule>
Signed-off-by: Stefan Berger <stefanb(a)us.ibm.com>
---
docs/formatnwfilter.html.in | 6 ++++++
docs/schemas/nwfilter.rng | 16 ++++++++++++++++
examples/xml/nwfilter/no-arp-spoofing.xml | 6 +++++-
src/conf/nwfilter_conf.c | 23 +++++++++++++++++++++++
src/conf/nwfilter_conf.h | 5 ++++-
src/nwfilter/nwfilter_ebiptables_driver.c | 7 +++++++
tests/nwfilterxml2xmlin/arp-test.xml | 4 ++++
tests/nwfilterxml2xmlout/arp-test.xml | 3 +++
8 files changed, 68 insertions(+), 2 deletions(-)
Index: libvirt-acl/src/conf/nwfilter_conf.c
===================================================================
--- libvirt-acl.orig/src/conf/nwfilter_conf.c
+++ libvirt-acl/src/conf/nwfilter_conf.c
@@ -970,6 +970,10 @@ static const virXMLAttr2Struct arpAttrib
.name = ARPDSTIPADDR,
.datatype = DATATYPE_IPADDR,
.dataIdx = offsetof(virNWFilterRuleDef,
p.arpHdrFilter.dataARPDstIPAddr),
+ }, {
+ .name = "gratuitous",
+ .datatype = DATATYPE_BOOLEAN,
+ .dataIdx = offsetof(virNWFilterRuleDef,
p.arpHdrFilter.dataGratuitousARP),
},
COMMENT_PROP(arpHdrFilter),
{
@@ -1611,6 +1615,18 @@ virNWFilterRuleDetailsParse(xmlNodePtr n
found = 1;
break;
+ case DATATYPE_BOOLEAN:
+ if (STREQ(prop, "true") ||
+ STREQ(prop, "1") ||
+ STREQ(prop, "yes"))
+ item->u.boolean = true;
+ else
+ item->u.boolean = false;
+
+ data.ui = item->u.boolean;
+ found = 1;
+ break;
+
case DATATYPE_LAST:
default:
break;
@@ -2744,6 +2760,13 @@ virNWFilterRuleDefDetailsFormat(virBuffe
virBufferEscapeString(buf, "%s", item->u.string);
break;
+ case DATATYPE_BOOLEAN:
+ if (item->u.boolean == true)
+ virBufferAddLit(buf, "true");
+ else
+ virBufferAddLit(buf, "false");
+ break;
+
case DATATYPE_STRING:
default:
virBufferAsprintf(buf,
Index: libvirt-acl/src/conf/nwfilter_conf.h
===================================================================
--- libvirt-acl.orig/src/conf/nwfilter_conf.h
+++ libvirt-acl/src/conf/nwfilter_conf.h
@@ -97,8 +97,9 @@ enum attrDatatype {
DATATYPE_IPV6ADDR = (1 << 9),
DATATYPE_IPV6MASK = (1 << 10),
DATATYPE_STRINGCOPY = (1 << 11),
+ DATATYPE_BOOLEAN = (1 << 12),
- DATATYPE_LAST = (1 << 12),
+ DATATYPE_LAST = (1 << 13),
};
@@ -118,6 +119,7 @@ struct _nwItemDesc {
union {
nwMACAddress macaddr;
virSocketAddr ipaddr;
+ bool boolean;
uint8_t u8;
uint16_t u16;
char protocolID[10];
@@ -160,6 +162,7 @@ struct _arpHdrFilterDef {
nwItemDesc dataARPSrcIPAddr;
nwItemDesc dataARPDstMACAddr;
nwItemDesc dataARPDstIPAddr;
+ nwItemDesc dataGratuitousARP;
nwItemDesc dataComment;
};
Index: libvirt-acl/docs/schemas/nwfilter.rng
===================================================================
--- libvirt-acl.orig/docs/schemas/nwfilter.rng
+++ libvirt-acl/docs/schemas/nwfilter.rng
@@ -581,6 +581,11 @@
<ref name="uint16range"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="gratuitous">
+ <ref name="boolean"/>
+ </attribute>
+ </optional>
</interleave>
</define>
@@ -784,6 +789,17 @@
</choice>
</define>
+ <define name="boolean">
+ <choice>
+ <value>yes</value>
+ <value>no</value>
+ <value>true</value>
+ <value>false</value>
+ <value>1</value>
+ <value>0</value>
+ </choice>
+ </define>
+
<define name="arpOpcodeType">
<choice>
<!-- variable -->
Index: libvirt-acl/src/nwfilter/nwfilter_ebiptables_driver.c
===================================================================
--- libvirt-acl.orig/src/nwfilter/nwfilter_ebiptables_driver.c
+++ libvirt-acl/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -2033,6 +2033,13 @@ ebtablesCreateRuleInstance(char chainPre
ENTRY_GET_NEG_SIGN(&rule->p.arpHdrFilter.dataARPDstMACAddr),
macaddr);
}
+
+ if (HAS_ENTRY_ITEM(&rule->p.arpHdrFilter.dataGratuitousARP) &&
+ rule->p.arpHdrFilter.dataGratuitousARP.u.boolean == true) {
+ virBufferAsprintf(&buf,
+ " %s --arp-gratuitous",
+
ENTRY_GET_NEG_SIGN(&rule->p.arpHdrFilter.dataGratuitousARP));
+ }
break;
case VIR_NWFILTER_RULE_PROTOCOL_IP:
Index: libvirt-acl/examples/xml/nwfilter/no-arp-spoofing.xml
===================================================================
--- libvirt-acl.orig/examples/xml/nwfilter/no-arp-spoofing.xml
+++ libvirt-acl/examples/xml/nwfilter/no-arp-spoofing.xml
@@ -12,7 +12,11 @@
<rule action='drop' direction='out' priority='400' >
<arp match='no' arpsrcipaddr='$IP' />
</rule>
- <!-- drop if ipaddr or macaddr odes not belong to guest -->
+ <!-- allow gratuitous arp -->
+ <rule action='accept' direction='in' priority='425'>
+ <arp gratuitous='true'/>
+ </rule>
+ <!-- drop if ipaddr or macaddr does not belong to guest -->
<rule action='drop' direction='in' priority='450' >
<arp match='no' arpdstmacaddr='$MAC'/>
<arp opcode='reply'/>
Index: libvirt-acl/docs/formatnwfilter.html.in
===================================================================
--- libvirt-acl.orig/docs/formatnwfilter.html.in
+++ libvirt-acl/docs/formatnwfilter.html.in
@@ -321,6 +321,7 @@
<li>IPV6_ADDR: IPv6 address in numbers format, i.e., FFFF::1</li>
<li>IPV6_MASK: IPv6 mask in numbers format (FFFF:FFFF:FC00::) or CIDR
mask (0-128)</li>
<li>STRING: A string</li>
+ <li>BOOLEAN: 'true', 'yes', '1' or 'false', 'no', '0'</li>
</ul>
<p>
<br/><br/>
@@ -476,6 +477,11 @@
<td>STRING</td>
<td>text with max. 256 characters</td>
</tr>
+ <tr>
+ <td>gratuitous <span class="since">(Since 0.9.2)</span></td>
+ <td>BOOLEAN</td>
+ <td>boolean indicating whether to check for gratuitous ARP packet</td>
+ </tr>
</table>
<p>
Valid strings for the <code>Opcode</code> field are:
Index: libvirt-acl/tests/nwfilterxml2xmlin/arp-test.xml
===================================================================
--- libvirt-acl.orig/tests/nwfilterxml2xmlin/arp-test.xml
+++ libvirt-acl/tests/nwfilterxml2xmlin/arp-test.xml
@@ -30,4 +30,8 @@
<arp srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:ff'
opcode='65536' hwtype='65536' protocoltype='65536' />
</rule>
+
+ <rule action='accept' direction='in'>
+ <arp gratuitous='true'/>
+ </rule>
</filter>
Index: libvirt-acl/tests/nwfilterxml2xmlout/arp-test.xml
===================================================================
--- libvirt-acl.orig/tests/nwfilterxml2xmlout/arp-test.xml
+++ libvirt-acl/tests/nwfilterxml2xmlout/arp-test.xml
@@ -15,4 +15,7 @@
<rule action='accept' direction='out' priority='500'>
<arp srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:ff'/>
</rule>
+ <rule action='accept' direction='in' priority='500'>
+ <arp gratuitous='true'/>
+ </rule>
</filter>
13 years, 6 months
[libvirt] [PATCH 2/9] add DHCP snooping support to nwfilter
by David L Stevens
The ARP protocol requires processing of packets that may not be
explicitly addressed to a host and only defines request and reply. This patch
removes the filtering of gratuitous ARPs and ARP requests which must update
a VMs patch for correct function and removes the unnecessary check for arpop
of request or reply.
Signed-off-by: David L Stevens <dlstevens(a)us.ibm.com>
diff --git a/examples/xml/nwfilter/no-arp-spoofing.xml b/examples/xml/nwfilter/no-arp-spoofing.xml
index c6c858d..fdd4e60 100644
--- a/examples/xml/nwfilter/no-arp-spoofing.xml
+++ b/examples/xml/nwfilter/no-arp-spoofing.xml
@@ -12,21 +12,6 @@
<rule action='drop' direction='out' priority='400' >
<arp match='no' arpsrcipaddr='$IP' />
</rule>
- <!-- drop if ipaddr or macaddr odes not belong to guest -->
- <rule action='drop' direction='in' priority='450' >
- <arp match='no' arpdstmacaddr='$MAC'/>
- <arp opcode='reply'/>
- </rule>
- <rule action='drop' direction='in' priority='500' >
- <arp match='no' arpdstipaddr='$IP' />
- </rule>
- <!-- accept only request or reply packets -->
- <rule action='accept' direction='inout' priority='600' >
- <arp opcode='request'/>
- </rule>
- <rule action='accept' direction='inout' priority='650' >
- <arp opcode='reply'/>
- </rule>
<!-- drop everything else -->
- <rule action='drop' direction='inout' priority='1000' />
+ <rule action='drop' direction='out' priority='1000' />
</filter>
13 years, 6 months
[libvirt] [PATCH] Use per-user TLS certificates when possible
by Doug Goldstein
When using TLS authentication and operating as the non-root user,
initially attempt to use that specific user's TLS certificates before
attempting to use the system wide TLS certificates.
Signed-off-by: Doug Goldstein <cardoe(a)cardoe.com>
---
src/remote/remote_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 8c69743..1691dab 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -1159,7 +1159,7 @@ initialize_gnutls(char *pkipath, int flags)
if ((virAsprintf(&libvirt_clientcert, "%s/%s", pkipath,
"clientcert.pem")) < 0)
goto out_of_memory;
- } else if (flags & VIR_DRV_OPEN_REMOTE_USER) {
+ } else if (flags & VIR_DRV_OPEN_REMOTE_USER || getuid() > 0) {
userdir = virGetUserDirectory(getuid());
if (!userdir)
--
1.7.5.rc3
13 years, 6 months
[libvirt] [PATCH] storage: pick return value of qemu-img
by Michal Privoznik
qemu-img returns non-zero status on -h. Therefore we need to
provide virCommandRun() a non-NULL exit status pointer.
---
src/storage/storage_backend.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index f90425a..c8e19c8 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -621,13 +621,14 @@ static int virStorageBackendQEMUImgBackingFormat(const char *qemuimg)
char *end;
char *tmp;
int ret = -1;
+ int exitstatus;
virCommandPtr cmd = virCommandNewArgList(qemuimg, "-h", NULL);
virCommandAddEnvString(cmd, "LC_ALL=C");
virCommandSetOutputBuffer(cmd, &help);
virCommandClearCaps(cmd);
- if (virCommandRun(cmd, NULL) < 0)
+ if (virCommandRun(cmd, &exitstatus) < 0)
goto cleanup;
start = strstr(help, " create ");
--
1.7.5.rc3
13 years, 6 months
[libvirt] [PATCH] virCommand: Cleanup unnecessarily variables
by Michal Privoznik
---
Building with ENABLE_DEBUG=0 showed more errors,
because VIR_DEBUG() get replaced with dummy 'do {} while(0)' statement,
and compiler complains about unused parameters. So if anybody knows
how to get rid of this ... Note that I am speaking about '...' part in
VIR_DEBUG_INT() definition.
src/util/command.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/util/command.c b/src/util/command.c
index ebb90cb..4b8a940 100644
--- a/src/util/command.c
+++ b/src/util/command.c
@@ -962,9 +962,8 @@ virCommandProcessIO(virCommandPtr cmd)
} else {
inoff += done;
if (inoff == inlen) {
- int tmpfd = infd;
if (VIR_CLOSE(infd) < 0)
- VIR_DEBUG("ignoring failed close on fd %d", tmpfd);
+ VIR_DEBUG("ignoring failed close on fd %d", infd);
}
}
}
@@ -1145,17 +1144,15 @@ virCommandRun(virCommandPtr cmd, int *exitstatus)
VIR_DEBUG("ignoring failed close on fd %d", tmpfd);
}
if (cmd->outbuf == &outbuf) {
- int tmpfd = cmd->outfd;
if (VIR_CLOSE(cmd->outfd) < 0)
- VIR_DEBUG("ignoring failed close on fd %d", tmpfd);
+ VIR_DEBUG("ignoring failed close on fd %d", cmd->outfd);
cmd->outfdptr = NULL;
cmd->outbuf = NULL;
VIR_FREE(outbuf);
}
if (cmd->errbuf == &errbuf) {
- int tmpfd = cmd->errfd;
if (VIR_CLOSE(cmd->errfd) < 0)
- VIR_DEBUG("ignoring failed close on fd %d", tmpfd);
+ VIR_DEBUG("ignoring failed close on fd %d", cmd->errfd);
cmd->errfdptr = NULL;
cmd->errbuf = NULL;
VIR_FREE(errbuf);
--
1.7.5.rc3
13 years, 6 months
[libvirt] [PATCH 0/5] remote generator: Cover more functions
by Matthias Bolte
Move more functions to the generator and cover stream-using functions. As the
stream-usage is not detectable from the .x file directly add additional
annotations.
daemon/remote.c | 185 ---------------------------
daemon/remote_generator.pl | 211 +++++++++++++++++++++++--------
daemon/stream.c | 7 +-
src/driver.h | 2 +-
src/libvirt.c | 4 +-
src/lxc/lxc_driver.c | 2 +-
src/qemu/qemu_driver.c | 2 +-
src/remote/remote_driver.c | 288 ------------------------------------------
src/remote/remote_protocol.x | 26 +++--
src/uml/uml_driver.c | 2 +-
src/xen/xen_driver.c | 2 +-
11 files changed, 188 insertions(+), 543 deletions(-)
Matthias
13 years, 6 months
[libvirt] [PATCH] Perform feature flag compat checking in QEMU migration cookies
by Daniel P. Berrange
To allow new mandatory migration cookie data to be introduced,
add support for checking supported feature flags when parsing
migration cookie.
* src/qemu/qemu_migration.c: Feature flag checking in migration
cookie parsing
---
src/qemu/qemu_migration.c | 56 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 55 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 4d7bc38..f69bbfd 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -48,7 +48,18 @@
#define timeval_to_ms(tv) (((tv).tv_sec * 1000ull) + ((tv).tv_usec / 1000))
enum qemuMigrationCookieFlags {
- QEMU_MIGRATION_COOKIE_GRAPHICS = (1 << 0),
+ QEMU_MIGRATION_COOKIE_FLAG_GRAPHICS,
+
+ QEMU_MIGRATION_COOKIE_FLAG_LAST
+};
+
+VIR_ENUM_DECL(qemuMigrationCookieFlag);
+VIR_ENUM_IMPL(qemuMigrationCookieFlag,
+ QEMU_MIGRATION_COOKIE_FLAG_LAST,
+ "graphics");
+
+enum qemuMigrationCookieFeatures {
+ QEMU_MIGRATION_COOKIE_GRAPHICS = (1 << QEMU_MIGRATION_COOKIE_FLAG_GRAPHICS),
};
typedef struct _qemuMigrationCookieGraphics qemuMigrationCookieGraphics;
@@ -65,6 +76,7 @@ typedef struct _qemuMigrationCookie qemuMigrationCookie;
typedef qemuMigrationCookie *qemuMigrationCookiePtr;
struct _qemuMigrationCookie {
int flags;
+ int flagsMandatory;
/* Host properties */
unsigned char hostuuid[VIR_UUID_BUFLEN];
@@ -286,6 +298,7 @@ static void qemuMigrationCookieXMLFormat(virBufferPtr buf,
{
char uuidstr[VIR_UUID_STRING_BUFLEN];
char hostuuidstr[VIR_UUID_STRING_BUFLEN];
+ int i;
virUUIDFormat(mig->uuid, uuidstr);
virUUIDFormat(mig->hostuuid, hostuuidstr);
@@ -296,6 +309,12 @@ static void qemuMigrationCookieXMLFormat(virBufferPtr buf,
virBufferEscapeString(buf, " <hostname>%s</hostname>\n", mig->hostname);
virBufferAsprintf(buf, " <hostuuid>%s</hostuuid>\n", hostuuidstr);
+ for (i = 0 ; i < QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) {
+ if (mig->flagsMandatory & (1 << i))
+ virBufferAsprintf(buf, " <feature name='%s'/>",
+ qemuMigrationCookieFlagTypeToString(i));
+ }
+
if ((mig->flags & QEMU_MIGRATION_COOKIE_GRAPHICS) &&
mig->graphics)
qemuMigrationCookieGraphicsXMLFormat(buf, mig->graphics);
@@ -377,6 +396,8 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
{
char uuidstr[VIR_UUID_STRING_BUFLEN];
char *tmp;
+ xmlNodePtr *nodes = NULL;
+ int i, n;
/* We don't store the uuid, name, hostname, or hostuuid
* values. We just compare them to local data to do some
@@ -440,6 +461,38 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
}
VIR_FREE(tmp);
+ /* Check to ensure all mandatory features from XML are also
+ * present in 'flags' */
+ if ((n = virXPathNodeSet("./features", ctxt, &nodes)) < 0)
+ goto error;
+
+ for (i = 0 ; i < n ; i++) {
+ int val;
+ char *str = virXMLPropString(nodes[i], "name");
+ if (!str) {
+ qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ "%s", _("missing feature name"));
+ goto error;
+ }
+
+ if ((val = qemuMigrationCookieFlagTypeFromString(str)) < 0) {
+ qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unknown migration cookie feature %s"),
+ str);
+ VIR_FREE(str);
+ goto error;
+ }
+
+ if ((flags & (1 << val)) == 0) {
+ qemuReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unsupported migration cookie feature %s"),
+ str);
+ VIR_FREE(str);
+ }
+ VIR_FREE(str);
+ }
+ VIR_FREE(nodes);
+
if ((flags & QEMU_MIGRATION_COOKIE_GRAPHICS) &&
virXPathBoolean("count(./graphics) > 0", ctxt) &&
(!(mig->graphics = qemuMigrationCookieGraphicsXMLParse(ctxt))))
@@ -449,6 +502,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
error:
VIR_FREE(tmp);
+ VIR_FREE(nodes);
return -1;
}
--
1.7.4.4
13 years, 6 months
Re: [libvirt] failure to build on rawhide
by Simon Josefsson
Eric Blake <eblake(a)redhat.com> writes:
> I'm getting this when trying to build libvirt on rawhide (using the
> package gnutls-devel-2.12.3-1.fc16.x86_64):
>
> remote/remote_driver.c: In function 'negotiate_gnutls_on_connection':
> remote/remote_driver.c:1361:9: error:
> 'gnutls_certificate_type_set_priority' is deprecated (declared at
> /usr/include/gnutls/compat.h:347) [-Werror=deprecated-declarations]
>
> but I can't find anything in the gnutls man pages that says why it is
> deprecated or what to use in its place. Any ideas?
Try gnutls_priority_set. What did you use
gnutls_certificate_type_set_priority for? It is rare to really need it,
a call to gnutls_set_default_priority() is usually sufficient.
Ideally the GTK-DOC strings for the deprecated functions should be
updated to point at the newer functions.
/Simon
13 years, 6 months
[libvirt] [PATCHv5 0/6] Add virNodeGetCPUTimeParameters() API
by Minoru Usui
Hi,
This is v5 of virNodeGetCPUTimeParameters() API.
It returns cpu utilization or
cumulative cpu time of the node from /proc/stat since node boots up.
This patch only supports linux host.
Changes
v4->v5
- Rebase latest libvirt GIT tree.
v3->v4
- Rebase this patch like virDomainGetMemoryParameters() from v2 patches.
(drop v3 patches except virsh subcommand)
- Rename API name to virNodeGetCPUTimeParameters()
v2->v3
- Change user I/F. It is able to request what the user want by the @flags.
- Minor change of virsh nodecputime I/F.
v1->v2
- Change user I/F like virDomainGetMemoryStats()
- It can return either cpu utilization or cumulative cpu time of the node
depends on each driver.
Minoru Usui (6):
[v5] virNodeGetCPUTimeParameters: Expose new API
[v5] virNodeGetCPUTimeParameters: Define internal driver API
[v5] virNodeGetCPUTimeParameters: Implement public API
[v5] virNodeGetCPUTimeParameters: Implement remote protocol
[v5] virNodeGetCPUTimeParameters: Implement virsh support
[v5] virNodeGetCPUTimeParameters: Implement linux support
daemon/remote.c | 76 +++++++++++++++++++++++++
include/libvirt/libvirt.h.in | 65 +++++++++++++++++++++
src/driver.h | 8 +++
src/libvirt.c | 87 ++++++++++++++++++++++++++++
src/libvirt_private.syms | 1 +
src/libvirt_public.syms | 1 +
src/lxc/lxc_driver.c | 1 +
src/nodeinfo.c | 127 ++++++++++++++++++++++++++++++++++++++++++
src/nodeinfo.h | 5 +-
src/qemu/qemu_driver.c | 1 +
src/remote/remote_driver.c | 65 +++++++++++++++++++++
src/remote/remote_protocol.x | 21 +++++++-
src/uml/uml_driver.c | 1 +
tools/virsh.c | 107 +++++++++++++++++++++++++++++++++++
tools/virsh.pod | 4 +
15 files changed, 568 insertions(+), 2 deletions(-)
--
Minoru Usui <usui(a)mxm.nes.nec.co.jp>
13 years, 6 months