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

Re: [libvirt] [PATCH v3 03/14] Add internal API



On Tue, Mar 23, 2010 at 10:54:09AM -0400, stefanb us ibm com wrote:
> This patch adds the internal API extensions for network filtering (ACL) support.
> 
> Signed-off-by: Stefan Berger <stefanb us ibm com>
> 
> ---
>  src/driver.h |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 53 insertions(+)
> 
> Index: libvirt-acl/src/driver.h
> ===================================================================
> --- libvirt-acl.orig/src/driver.h
> +++ libvirt-acl/src/driver.h
> @@ -994,6 +994,58 @@ struct _virStreamDriver {
>  };
>  
>  
> +typedef int
> +    (*virDrvConnectNumOfNWFilters)        (virConnectPtr conn);
> +typedef int
> +    (*virDrvConnectListNWFilters)         (virConnectPtr conn,
> +                                           char **const names,
> +                                           int maxnames);
> +typedef virNWFilterPtr
> +    (*virDrvNWFilterLookupByName)             (virConnectPtr conn,
> +                                               const char *name);
> +typedef virNWFilterPtr
> +    (*virDrvNWFilterLookupByUUID)             (virConnectPtr conn,
> +                                               const unsigned char *uuid);
> +typedef virNWFilterPtr
> +    (*virDrvNWFilterDefineXML)                (virConnectPtr conn,
> +                                               const char *xmlDesc,
> +                                               unsigned int flags);
> +typedef int
> +    (*virDrvNWFilterUndefine)                 (virNWFilterPtr pool);
> +
> +typedef char *
> +    (*virDrvNWFilterGetXMLDesc)              (virNWFilterPtr pool,
> +                                              unsigned int flags);
> +
> +
> +typedef struct _virNWFilterDriver virNWFilterDriver;
> +typedef virNWFilterDriver *virNWFilterDriverPtr;
> +
> +/**
> + * _virNWFilterDriver:
> + *
> + * Structure associated to a network filter driver, defining the various
> + * entry points for it.
> + *
> + * All drivers must support the following fields/methods:
> + *  - open
> + *  - close
> + */
> +struct _virNWFilterDriver {
> +    const char * name;    /* the name of the driver */
> +    virDrvOpen            open;
> +    virDrvClose           close;
> +
> +    virDrvConnectNumOfNWFilters numOfNWFilters;
> +    virDrvConnectListNWFilters listNWFilters;
> +    virDrvNWFilterLookupByName nwfilterLookupByName;
> +    virDrvNWFilterLookupByUUID nwfilterLookupByUUID;
> +    virDrvNWFilterDefineXML defineXML;
> +    virDrvNWFilterUndefine undefine;
> +    virDrvNWFilterGetXMLDesc getXMLDesc;
> +};
> +
> +
>  /*
>   * Registration
>   * TODO: also need ways to (des)activate a given driver
> @@ -1005,6 +1057,7 @@ int virRegisterInterfaceDriver(virInterf
>  int virRegisterStorageDriver(virStorageDriverPtr);
>  int virRegisterDeviceMonitor(virDeviceMonitorPtr);
>  int virRegisterSecretDriver(virSecretDriverPtr);
> +int virRegisterNWFilterDriver(virNWFilterDriverPtr);
>  # ifdef WITH_LIBVIRTD
>  int virRegisterStateDriver(virStateDriverPtr);
>  # endif


ACK


Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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