[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[libvirt] [PATCH v2 2/7] bandwidth: Declare internal structures
- From: Michal Privoznik <mprivozn redhat com>
- To: libvir-list redhat com
- Subject: [libvirt] [PATCH v2 2/7] bandwidth: Declare internal structures
- Date: Tue, 12 Jul 2011 13:57:08 +0200
---
src/util/network.h | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/util/network.h b/src/util/network.h
index ed0b78c..568bca1 100644
--- a/src/util/network.h
+++ b/src/util/network.h
@@ -45,6 +45,22 @@ typedef struct {
typedef virSocketAddr *virSocketAddrPtr;
+typedef struct {
+ /* Even if we let user to input rates
+ * in various units, we store them in bps */
+ unsigned long average;
+ unsigned long peak;
+ unsigned long burst;
+} virRate;
+
+typedef virRate *virRatePtr;
+
+typedef struct {
+ virRate in, out;
+} virBandwidth;
+
+typedef virBandwidth *virBandwidthPtr;
+
int virSocketParseAddr (const char *val,
virSocketAddrPtr addr,
int hint);
--
1.7.5.rc3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]