[libvirt] [Fwd: first cut public API for physical host interface configuration]

Laine Stump laine at laine.org
Wed Mar 25 18:16:48 UTC 2009

(Oops, I originally sent this with the wrong return address, which 
probably caused it to be silently swallowed...)

To get started integrating libnetcf support into libvirt, the attached 
libvirt.h diff has a first attempt at the public API that will hook up 
to libnetcf on the libvirtd side. I started out with the virNetwork* 
API, and modified/removed as seemed appropriate.

A few points worth mentioning:

virNetwork has "defined" and "active" interfaces, but so far 
virInterface just has interfaces, as the active/inactive status is 
really controlled by 1) the "onboot" property in the XML, and 2) whether 
or not virInterfaceStart() has been called yet.

The _virInterface struct that is referenced here is more or less 
identical to _virnetwork.

libnetcf works with netcf structs (one per library instance) and 
netcf_if structs (one per interface, multiple per library instance. As 
far as I can see right now, the netcf struct will not need to be 
referenced directly from the client side, but the netcf_if for each 
interface is needed, and I guess a cookie representing it will be sent 
to the client side and stored in the _virInterface. Is that what the 
UUID in _virNetwork is used for? (I know, I know - "read the code!", 
it's just quicker to (and avoids misreading on my part) to ask)

As before, any and all advice/corrections gratefully accepted!

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: API.diff
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090325/4dfe6620/attachment-0001.ksh>

More information about the libvir-list mailing list