From 52f138031fe902c5fcdb9a0e435de6ee80af3e77 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 27 Feb 2006 22:48:33 +0000 Subject: [PATCH] add NetFlags.ANY_ADDR --- bindings/java/src/net/hyperic/sigar/NetFlags.java | 2 ++ bindings/java/src/net/hyperic/sigar/cmd/Netstat.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/net/hyperic/sigar/NetFlags.java b/bindings/java/src/net/hyperic/sigar/NetFlags.java index 210a7eb5..589be1ec 100644 --- a/bindings/java/src/net/hyperic/sigar/NetFlags.java +++ b/bindings/java/src/net/hyperic/sigar/NetFlags.java @@ -12,6 +12,8 @@ public class NetFlags { */ public final static String NULL_HWADDR = "00:00:00:00:00:00"; + public static final String ANY_ADDR = "0.0.0.0"; + /** * interface is up */ diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Netstat.java b/bindings/java/src/net/hyperic/sigar/cmd/Netstat.java index 1483c7b3..54f8da7b 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Netstat.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Netstat.java @@ -113,7 +113,7 @@ public class Netstat extends SigarCommandBase { if (isNumeric) { address = ip; } - else if (ip.equals("0.0.0.0")) { + else if (ip.equals(NetFlags.ANY_ADDR)) { address = "*"; } else {