[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 0/7] Introduce API for dumping domain IP addresses



On 06/08/2012 02:04 AM, Michal Privoznik wrote:
> This feature has been requested for a very long time. However,
> we had to wait for guest agent to obtain reliable results as
> user might create totally different structure of interfaces than
> seen from outside (e.g. bonding, virtual interfaces, etc.).
> That's the main reason why sniffing for domain traffic can
> return bogus results. Fortunately, qemu guest agent implement
> requested part for a while so nothing holds us back anymore.

How hard would it be to wire this API up to _also_ have the option of
using our nwfilter IP learning code (first packet detection mode has
been here for a while, and DHCP snooping mode was just added)?  Use of
the flags parameter should make it possible to force which method we
attempt, use of flags==0 chooses the best method possible (GA if
present, otherwise fall back to nwfilter IP learning).

> 
> This API is called virDomainInterfacesAddresses (okay, maybe
> too many plurals) and returns a dynamically allocated array
> of virDomainInterface struct. The great disadvantage once
> this gets released, it's written in stone and we cannot change
> or add an item into it. Therefore we might add a padding into
> it - something like reserved for future use. On the other hand,
> everything important is already there - what else we will want
> to add? :)

But that's why we invented virTypedParameter.  If you would return an
allocated array of virTypedParameter instead of a hard-coded
virDomainInterface struct, then you have the flexibility to add new
named parameters down the road without ABI concerns.  I haven't looked
closely at your proposal yet, but just reading this one paragraph makes
me think we need to rework it into using typed parameters.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]