Nicola De Nisco
Nicola De Nisco

Reputation: 127

Detecting wi-fi or cable network interface by mac address

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.

Upvotes: 0

Views: 464

Answers (1)

Dean J
Dean J

Reputation: 40298

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.

Upvotes: 1

Related Questions