Re: [PATCH 2/7] bandwidth: Declare internal structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/18/2011 04:05 PM, Michal Privoznik wrote:
---
  src/util/network.h |   14 ++++++++++++++
  1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/util/network.h b/src/util/network.h
index ed0b78c..af32558 100644
--- a/src/util/network.h
+++ b/src/util/network.h
@@ -45,6 +45,20 @@ typedef struct {

  typedef virSocketAddr *virSocketAddrPtr;

+typedef struct {
+    unsigned long average;  /* kbytes/s */
+    unsigned long peak;     /* kbytes/s */
+    unsigned long burst;    /* kbytes */
+} virRate;
+
+typedef virRate *virRatePtr;
+
+typedef struct {
+    virRate in, out;
+} virBandwidth;
+
+typedef virBandwidth *virBandwidthPtr;
+
  int virSocketParseAddr    (const char *val,
                             virSocketAddrPtr addr,
                             int hint);

ACK. (Actually, you probably didn't need to break down the patches quite so much - a single patch that did the RNG, docs, data definitions, parser/formatter, and test cases, followed by another patch to hook the new data into the functionality probably would have been adequate.)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]