mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
Add internal API
This patch adds the internal API extensions for network filtering (ACL) support. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
parent
c71a2100b1
commit
f0c1c3f86a
53
src/driver.h
53
src/driver.h
@ -1009,6 +1009,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
|
* Registration
|
||||||
* TODO: also need ways to (des)activate a given driver
|
* TODO: also need ways to (des)activate a given driver
|
||||||
@ -1020,6 +1072,7 @@ int virRegisterInterfaceDriver(virInterfaceDriverPtr);
|
|||||||
int virRegisterStorageDriver(virStorageDriverPtr);
|
int virRegisterStorageDriver(virStorageDriverPtr);
|
||||||
int virRegisterDeviceMonitor(virDeviceMonitorPtr);
|
int virRegisterDeviceMonitor(virDeviceMonitorPtr);
|
||||||
int virRegisterSecretDriver(virSecretDriverPtr);
|
int virRegisterSecretDriver(virSecretDriverPtr);
|
||||||
|
int virRegisterNWFilterDriver(virNWFilterDriverPtr);
|
||||||
# ifdef WITH_LIBVIRTD
|
# ifdef WITH_LIBVIRTD
|
||||||
int virRegisterStateDriver(virStateDriverPtr);
|
int virRegisterStateDriver(virStateDriverPtr);
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
Reference in New Issue
Block a user