From 7c901c486ec57a8f81fb2d3609a5c10f03ffc604 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 11 Mar 2005 01:27:19 +0000 Subject: [PATCH] support -n flag and ip->hostname conversion --- .../src/net/hyperic/sigar/cmd/Netstat.java | 41 +++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Netstat.java b/bindings/java/src/net/hyperic/sigar/cmd/Netstat.java index 5a5c6063..f0b9cea6 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Netstat.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Netstat.java @@ -1,5 +1,8 @@ package net.hyperic.sigar.cmd; +import java.net.InetAddress; +import java.net.UnknownHostException; + import net.hyperic.sigar.SigarException; import net.hyperic.sigar.NetConnection; import net.hyperic.sigar.NetFlags; @@ -9,6 +12,8 @@ import net.hyperic.sigar.NetFlags; */ public class Netstat extends SigarCommandBase { + private static boolean isNumeric; + public Netstat(Shell shell) { super(shell); } @@ -28,6 +33,7 @@ public class Netstat extends SigarCommandBase { //poor mans getopt. public static int getFlags(String[] args, int flags) { int proto_flags = 0; + isNumeric = false; for (int i=0; i