From 1c0de9075ae257a40abc5c9f7e0b3b89d6d680fe Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 10 May 2005 14:32:04 +0000 Subject: [PATCH] add totals for num in/out connections --- .../src/net/hyperic/sigar/NetPortMap.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/NetPortMap.java b/bindings/java/src/net/hyperic/sigar/NetPortMap.java index 17a918ec..0f5b549a 100644 --- a/bindings/java/src/net/hyperic/sigar/NetPortMap.java +++ b/bindings/java/src/net/hyperic/sigar/NetPortMap.java @@ -10,7 +10,8 @@ public class NetPortMap { private Map inbound; private Map outbound; private int[] states; - + private int inboundTotal, outboundTotal; + public NetPortMap() { this.sigar = new Sigar(); } @@ -37,6 +38,7 @@ public class NetPortMap { public void stat(int flags) throws SigarException { this.inbound = new HashMap(); this.outbound = new HashMap(); + this.inboundTotal = this.outboundTotal = 0; this.states = new int[NetFlags.TCP_UNKNOWN]; for (int i=0; i