aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-09-04 23:55:15 +0800
committerOsier Yang <jyang@redhat.com>2012-09-11 16:58:16 +0800
commit89a1df9b06a40157530531c766ea4891f3e0e6af (patch)
tree5805f8667c93b9a435ca420249b47cdfed41a68a /include
parentFix unwanted closing of libvirt client connection (diff)
downloadlibvirt-89a1df9b06a40157530531c766ea4891f3e0e6af.tar.gz
libvirt-89a1df9b06a40157530531c766ea4891f3e0e6af.tar.bz2
libvirt-89a1df9b06a40157530531c766ea4891f3e0e6af.zip
list: Define new API virConnectListAllNetworks
This is to list the network objects, supported filtering flags are: active|inactive, persistent|transient, autostart|no-autostart. include/libvirt/libvirt.h.in: Declare enum virConnectListAllNetworkFlags and virConnectListAllNetworks. python/generator.py: Skip auto-generating src/driver.h: (virDrvConnectListAllNetworks) 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.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index f63178c9b..b0d34c5f8 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -2279,6 +2279,26 @@ int virConnectNumOfDefinedNetworks (virConnectPtr conn);
int virConnectListDefinedNetworks (virConnectPtr conn,
char **const names,
int maxnames);
+/*
+ * virConnectListAllNetworks:
+ *
+ * Flags used to filter the returned networks. Flags in each group
+ * are exclusive attributes of a network.
+ */
+typedef enum {
+ VIR_CONNECT_LIST_NETWORKS_INACTIVE = 1 << 0,
+ VIR_CONNECT_LIST_NETWORKS_ACTIVE = 1 << 1,
+
+ VIR_CONNECT_LIST_NETWORKS_PERSISTENT = 1 << 2,
+ VIR_CONNECT_LIST_NETWORKS_TRANSIENT = 1 << 3,
+
+ VIR_CONNECT_LIST_NETWORKS_AUTOSTART = 1 << 4,
+ VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART = 1 << 5,
+} virConnectListAllNetworksFlags;
+
+int virConnectListAllNetworks (virConnectPtr conn,
+ virNetworkPtr **nets,
+ unsigned int flags);
/*
* Lookup network by name or uuid