From 2a968c2c0f2d2dc2523fa569167223127ed4d34f Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 23 Jul 2004 17:37:15 +0000 Subject: [PATCH] Found another non unique mac that seems to get used by a tunnel adaptor faking up MAC info to display. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1469 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/net/MACUtil.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/projects/samskivert/src/java/com/samskivert/net/MACUtil.java b/projects/samskivert/src/java/com/samskivert/net/MACUtil.java index 71b24c92..3386ae65 100644 --- a/projects/samskivert/src/java/com/samskivert/net/MACUtil.java +++ b/projects/samskivert/src/java/com/samskivert/net/MACUtil.java @@ -11,6 +11,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import com.samskivert.util.RunAnywhere; +import com.samskivert.util.StringUtil; /** * Attempts to find all the MAC addresses on the machine. @@ -19,6 +20,19 @@ import com.samskivert.util.RunAnywhere; */ public class MACUtil { +/** + public static void main (String[] args) + { + String testOutput = + "YOUR TEST STRING GOES HERE"; + + String[] macs = parseMACs(testOutput); + for (int ii = 0; ii < macs.length; ii++) { + System.err.println("mac: " + macs[ii]); + } + } +*/ + /** * Get all the MAC addresses of the hardware we are running on that we * can find. @@ -57,6 +71,7 @@ public class MACUtil // 00-04-4B-80-80-03 - Some nvidia built in lan issues. // 00-03-8A-XX-XX-XX - MiniWAN or AOL software. // 02-03-8A-00-00-11 - Westell Dual (USB/Ethernet) modem + // FF-FF-FF-FF-FF-FF - Tunnel adapter Teredo if (mac.startsWith("44-45-53")) { continue; } else if (mac.startsWith("00-53-45-00")) { @@ -69,6 +84,8 @@ public class MACUtil continue; } else if (mac.startsWith("02-03-8A-00-00-11")) { continue; + } else if (mac.startsWith("FF-FF-FF-FF-FF-FF")) { + continue; } list.add(mac);