Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Eric Blake a218c81da2 API: add VIR_TYPED_PARAM_STRING
This allows strings to be transported between client and server
in the context of name-type-value virTypedParameter functions.
For compatibility,

    o new clients will not send strings to old servers, based on
      a feature check
    o new servers will not send strings to old clients without the
      flag VIR_TYPED_PARAM_STRING_OKAY; this will be enforced at
      the RPC layer in the next patch, so that drivers need not
      worry about it in general.  The one exception is that
      virDomainGetSchedulerParameters lacks a flags argument, so
      it must not return a string; drivers that forward that
      function on to virDomainGetSchedulerParametersFlags will
      have to pay attention to the flag.
    o the flag VIR_TYPED_PARAM_STRING_OKAY is set automatically,
      based on a feature check (so far, no driver implements it),
      so clients do not have to worry about it

Future patches can then enable the feature on a per-driver basis.

This patch also ensures that drivers can blindly strdup() field
names (previously, a malicious client could stuff 80 non-NUL bytes
into field and cause a read overrun).

* src/libvirt_internal.h (VIR_DRV_FEATURE_TYPED_PARAM_STRING): New
driver feature.
* src/libvirt.c (virTypedParameterValidateSet)
(virTypedParameterSanitizeGet): New helper functions.
(virDomainSetMemoryParameters, virDomainSetBlkioParameters)
(virDomainSetSchedulerParameters)
(virDomainSetSchedulerParametersFlags)
(virDomainGetMemoryParameters, virDomainGetBlkioParameters)
(virDomainGetSchedulerParameters)
(virDomainGetSchedulerParametersFlags, virDomainBlockStatsFlags):
Use them.
* src/util/util.h (virTypedParameterArrayClear): New helper
function.
* src/util/util.c (virTypedParameterArrayClear): Implement it.
* src/libvirt_private.syms (util.h): Export it.
Based on an initial patch by Hu Tao, with feedback from
Daniel P. Berrange.

Signed-off-by: Eric Blake <eblake@redhat.com>
2011-11-11 17:21:36 -07:00
.gnulib@e56e96fe20 build: drop useless dirent.h includes 2011-11-11 14:12:37 -07:00
daemon startupPolicty: Minor cleanups 2011-10-31 15:25:09 +01:00
docs Release of libvirt-0.9.7 2011-11-08 14:55:25 +08:00
examples Add APIs for virNetSocket for sending/receiving file descriptors 2011-10-28 10:23:53 +01:00
gnulib build: fix mingw build of gnulib openpty 2011-11-09 09:12:40 -07:00
include API: add VIR_TYPED_PARAM_STRING 2011-11-11 17:21:36 -07:00
m4 tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
po Split bridge.h into three separate files 2011-11-09 16:34:25 +00:00
python python: Fix documentation of virStream recv 2011-10-31 18:07:05 +01:00
src API: add VIR_TYPED_PARAM_STRING 2011-11-11 17:21:36 -07:00
tests Santize naming of socket address APIs 2011-11-09 17:10:23 +00:00
tools Adjust naming of network device bandwidth management APIs 2011-11-09 17:10:28 +00:00
.dir-locals.el maint: let emacs avoid tabs in rng files 2011-08-13 08:56:26 -06:00
.gitignore snapshot: test domainsnapshot indentation 2011-10-20 16:02:16 -06:00
.gitmodules make .gnulib a submodule 2009-07-08 16:17:51 +02:00
.mailmap maint: use mailmap, not AUTHORS, for secondary addresses 2011-11-11 08:56:19 -07:00
AUTHORS util: fix compile error on debian 2011-11-11 17:04:33 -07:00
autobuild.sh spec: mingw cleanups 2011-10-13 09:21:02 -06:00
autogen.sh build: allow for local gnulib diffs 2011-11-09 09:03:33 -07:00
bootstrap build: fix compilation on mingw64 2011-08-19 07:20:10 -06:00
bootstrap.conf build: allow for local gnulib diffs 2011-11-09 09:03:33 -07:00
cfg.mk build: allow for local gnulib diffs 2011-11-09 09:03:33 -07:00
ChangeLog-old generate ChangeLog from git logs into distribution tarball 2009-07-08 16:17:51 +02:00
configure.ac Split bridge.h into three separate files 2011-11-09 16:34:25 +00:00
COPYING.LIB remove all trailing blank lines 2009-07-16 15:06:42 +02:00
HACKING Document STREQ_NULLABLE and STRNEQ_NULLABLE 2011-10-06 16:50:38 +02:00
libvirt.pc.in * libvirt.pc.in: applied patch from Daniel Berrange to fix --cflags 2006-03-24 13:18:12 +00:00
libvirt.spec.in Disable numactl on ARM architectures too 2011-11-10 11:33:17 +00:00
Makefile.am maint: add missing copyright notices 2011-07-28 15:01:17 -06:00
Makefile.nonreentrant Ban use of all inet_* functions 2010-10-22 11:59:23 +01:00
mingw32-libvirt.spec.in Add libvirt confdir to files section in mingw32 spec 2011-11-10 11:30:57 +00:00
README Correct typos in the documentation (Atsushi SAKAI) 2008-01-24 10:15:13 +00:00
README-hacking maint: relax git minimum version 2010-02-24 14:29:27 -05:00
TODO Update todo list file to point at bugzilla/website 2010-10-13 16:45:26 +01:00

         LibVirt : simple API for virtualization

  Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the basic
resources are driven by a Linux instance. The library aim at providing
long term stable C API initially for the Xen paravirtualization but
should be able to integrate other virtualization mechanisms if needed.

Daniel Veillard <veillard@redhat.com>