From 300bcdb63b1d44120ee7b4a27382c20926400fcd Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Mon, 6 Aug 2012 16:17:58 -0400 Subject: [PATCH] network: add connections counter to networks Just as each physical device used by a network has a connections counter, now each network has a connections counter which is incremented once for each guest interface that connects using this network. The count is output in the live network XML, like this: ... It is read-only, and for informational purposes only - it isn't used internally anywhere by libvirt. --- docs/formatnetwork.html.in | 32 ++++++++++++++++++++++++-------- docs/schemas/network.rng | 10 ++++++++++ src/conf/network_conf.c | 6 +++++- src/conf/network_conf.h | 1 + src/network/bridge_driver.c | 10 ++++++++++ 5 files changed, 50 insertions(+), 9 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index daa6524f0f..a010cbd217 100644 --- a/docs/formatnetwork.html.in +++ b/docs/formatnetwork.html.in @@ -15,8 +15,14 @@

The root element required for all virtual networks is - named network and has no attributes. - The network XML format is available since 0.3.0 + named network and has no configurable attributes + (although since 0.10.0 there is one + optional read-only attribute - when examining the live + configuration of a network, the + attribute connections, if present, specifies the + number of guest interfaces currently connected via this + network). The network XML format is + available since 0.3.0

General metadata

@@ -233,12 +239,22 @@ </forward> ... - Additionally, since 0.9.10, libvirt - allows a shorthand for specifying all virtual interfaces - associated with a single physical function, by using - the <pf> subelement to call out the - corresponding physical interface associated with multiple - virtual interfaces: +

+ since 0.10.0, + <interface> also has an optional read-only + attribute - when examining the live configuration of a + network, the attribute connections, if present, + specifies the number of guest interfaces currently connected + via this physical interface. +

+

+ Additionally, since 0.9.10, libvirt + allows a shorthand for specifying all virtual interfaces + associated with a single physical function, by using + the <pf> subelement to call out the + corresponding physical interface associated with multiple + virtual interfaces: +

 ...
   <forward mode='passthrough'>
diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng
index 2ae879ec47..25df26686a 100644
--- a/docs/schemas/network.rng
+++ b/docs/schemas/network.rng
@@ -12,6 +12,11 @@
   
 
     
+      
+        
+          
+        
+