On Mon, May 11, 2009 at 12:17:17PM +0200, Daniel Veillard wrote:
On Wed, May 06, 2009 at 06:12:21PM +0200, Pritesh Kothari wrote:
> +/**
> + * The Network Functions here on
> + */
> +static virDrvOpenStatus vboxNetworkOpen(virConnectPtr conn,
> + virConnectAuthPtr auth
> ATTRIBUTE_UNUSED,
> + int flags ATTRIBUTE_UNUSED) {
> + vboxGlobalData *data = conn->privateData;
[...]
> + DEBUG0("network intialized");
> + /* conn->networkPrivateData = some network specific data */
> + return VIR_DRV_OPEN_SUCCESS;
[...]
> +static int vboxNetworkClose(virConnectPtr conn) {
> + DEBUG0("network unintialized");
> + conn->networkPrivateData = NULL;
> + return 0;
> +}
You really don't need to keep any data about the networking driver
in libvirt(d) itself ?
Nah, this is fine in the virtualbox case. The driver is essentially
a stateless driver, the only info being the RPC function tables
which are stored in conn->privateData.
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|