[libvirt] [PATCH 1/7] Introduce virDomainInterfacesAddresses API
Eric Blake
eblake at redhat.com
Mon Jun 11 23:35:13 UTC 2012
On 06/08/2012 02:04 AM, Michal Privoznik wrote:
> This API returns dynamically allocated array of IP addresses for
> all domain interfaces.
> ---
> include/libvirt/libvirt.h.in | 32 +++++++++++++
> python/generator.py | 1 +
> src/driver.h | 6 +++
> src/libvirt.c | 101 ++++++++++++++++++++++++++++++++++++++++++
> src/libvirt_public.syms | 5 ++
> 5 files changed, 145 insertions(+), 0 deletions(-)
I still think XML may be the way to go for extensibility reasons. But
if we stick with structs...
> /**
> + * virDomainInterfacesAddresses:
> + * @dom: domain object
> + * @ifaces: array of @dom interfaces
> + * @ifaces_count: number of items in @ifaces
Lose the ifaces_count parameter, and instead,
> + *
> + * Returns 0 on success,
Return the number of ifaces allocated on return, as well as also
guaranteeing an extra NULL pointer on the end of the array not counted
in the return value.
>
> +LIBVIRT_0.9.13 {
> + global:
> + virDomainInterfacesAddresses;
> +} LIBVIRT_0.9.11;
This will need rebasing, but shouldn't be too hard to figure out.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120611/b96d7deb/attachment-0001.sig>
More information about the libvir-list
mailing list