Cleaned up the comment about non unique macs, fixed up the checking to
avoid the basically duplicate test for the - and : versions. Added another non-unique mac. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1437 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: MACUtil.java,v 1.10 2004/02/25 20:19:06 eric Exp $
|
// $Id: MACUtil.java,v 1.11 2004/05/26 21:15:36 eric Exp $
|
||||||
|
|
||||||
package com.samskivert.net;
|
package com.samskivert.net;
|
||||||
|
|
||||||
@@ -45,28 +45,27 @@ public class MACUtil
|
|||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
while (m.find()) {
|
while (m.find()) {
|
||||||
String mac = m.group(1).toUpperCase();
|
String mac = m.group(1).toUpperCase();
|
||||||
|
mac = mac.replace(':', '-');
|
||||||
|
|
||||||
// What fun, we have to explicitly skip PPP adaptor addresses
|
// "Didn't you get that memo?" Apparently some people are not
|
||||||
// since they all start with 444553 and tend to not be unique.
|
// up on MAC addresses actually being unique, so we will
|
||||||
// Why do I have a feeling we will find more of this? And hey
|
// ignore those.
|
||||||
// we did find another one. Different versions of windows
|
//
|
||||||
// seem to magic up different magic MAC addresses that don't
|
// 44-45-53-XX-XX-XX - PPP Adaptor
|
||||||
// mean anything. Great. Adding 005345 to the list to
|
// 00-53-45-XX-XX-XX - PPP Adaptor
|
||||||
// ignore. And another, 00E006095566 is apparently the mac of
|
// 00-E0-06-09-55-66 - Some bogus run of ASUS motherboards
|
||||||
// some set of all in one ASUS motherboards. Guess they
|
// 00-04-4B-80-80-03 - Some nvidia built in lan issues.
|
||||||
// didn't get the memo about the MACs all being unique.
|
// 00-03-8A-XX-XX-XX - MiniWAN or AOL software.
|
||||||
// Nvidia with built in LAN has a unique prob.
|
|
||||||
if (mac.startsWith("44-45-53") ||
|
if (mac.startsWith("44-45-53")) {
|
||||||
mac.startsWith("44:45:53")) {
|
|
||||||
continue;
|
continue;
|
||||||
} else if (mac.startsWith("00-53-45-00") ||
|
} else if (mac.startsWith("00-53-45-00")) {
|
||||||
mac.startsWith("00:53:45:00")) {
|
|
||||||
continue;
|
continue;
|
||||||
} else if (mac.startsWith("00-E0-06-09-55-66") ||
|
} else if (mac.startsWith("00-E0-06-09-55-66")) {
|
||||||
mac.startsWith("00:E0:06:09:55:66")) {
|
|
||||||
continue;
|
continue;
|
||||||
} else if (mac.startsWith("00-04-4B-80-80-03") ||
|
} else if (mac.startsWith("00-04-4B-80-80-03")) {
|
||||||
mac.startsWith("00:04:4B:80:80:03")) {
|
continue;
|
||||||
|
} else if (mac.startsWith("00-03-8A")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user