Detecting wi-fi or cable network interface by mac address

444 views Asked by At

I'm try to detect a network cable interface using it's mac address. On some machine there is many type of adapter (cable, wifi, usb dongle, etc).

Is it possible to have the types of each mac address, such as wifi/cable/other?

The primary application is a Java program, but other languages would be useful too.

1

There are 1 answers

0
Dean J On

You can get your machine's current MAC in Java; you can't get remote MAC addresses.

Get MAC address on local machine with Java

If you were to connect the computer to the network one way, get the MAC address, and then remember that, you'd have it.

It sounds like what you want is a regexp to tell you if a particular MAC address is a wifi device, a cable router, etc; I don't think the space of MAC addresses was well enough designed to reliably allow for that, and you'd still miss cases of MAC spoofing.