aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-09-13 14:54:09 +0800
committerOsier Yang <jyang@redhat.com>2012-09-17 10:30:04 +0800
commitc6a3be5dff769cdbfc5e6c9d5817e5c6ee745a7e (patch)
tree6dddb1b99030ba26889e0d05336deed029ea96d0 /include
parentbuild: fix missing include (diff)
downloadlibvirt-c6a3be5dff769cdbfc5e6c9d5817e5c6ee745a7e.tar.gz
libvirt-c6a3be5dff769cdbfc5e6c9d5817e5c6ee745a7e.tar.bz2
libvirt-c6a3be5dff769cdbfc5e6c9d5817e5c6ee745a7e.zip
list: Define new API virConnectListAllNodeDevices
This is to list the node device objects, supports to filter the results by capability types. include/libvirt/libvirt.h.in: Declare enum virConnectListAllNodeDeviceFlags and virConnectListAllNodeDevices. python/generator.py: Skip auto-generating src/driver.h: (virDrvConnectListAllNodeDevices) src/libvirt.c: Implement the public API src/libvirt_public.syms: Export the symbol to public
Diffstat (limited to 'include')
-rw-r--r--include/libvirt/libvirt.h.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index ca04f6cbb..8b2d8ac41 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -2834,6 +2834,28 @@ int virNodeListDevices (virConnectPtr conn,
char **const names,
int maxnames,
unsigned int flags);
+/*
+ * virConnectListAllNodeDevices:
+ *
+ * Flags used to filter the returned node devices. Flags in each group
+ * are exclusive. Currently only one group to filter the devices by cap
+ * type.
+ */
+typedef enum {
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM = 1 << 0, /* System capability */
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_PCI_DEV = 1 << 1, /* PCI device */
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_DEV = 1 << 2, /* USB device */
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_USB_INTERFACE = 1 << 3, /* USB interface */
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_NET = 1 << 4, /* Network device */
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_HOST = 1 << 5, /* SCSI Host Bus Adapter */
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_TARGET = 1 << 6, /* SCSI Target */
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI = 1 << 7, /* SCSI device */
+ VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE = 1 << 8, /* Storage device */
+} virConnectListAllNodeDeviceFlags;
+
+int virConnectListAllNodeDevices (virConnectPtr conn,
+ virNodeDevicePtr **devices,
+ unsigned int flags);
virNodeDevicePtr virNodeDeviceLookupByName (virConnectPtr conn,
const char *name);