This patch adds the internal API extensions for network filtering (ACL) support. Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
--- 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 @@ -983,6 +983,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 @@ -994,6 +1046,7 @@ int virRegisterInterfaceDriver(virInterf int virRegisterStorageDriver(virStorageDriverPtr); int virRegisterDeviceMonitor(virDeviceMonitorPtr); int virRegisterSecretDriver(virSecretDriverPtr); +int virRegisterNWFilterDriver(virNWFilterDriverPtr); # ifdef WITH_LIBVIRTD int virRegisterStateDriver(virStateDriverPtr); # endif
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list