0

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.

Barett
  • 5,826
  • 6
  • 51
  • 55
  • The first 3 bytes (24 bits) are assigned to the manufacturer of the NIC. A list of them is here: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf The last 3 bytes are up to the manufacturer to assign. I don't know if any manufacturers assign significance to them. Also, see this: http://www.quora.com/Can-you-see-manufacturer-and-model-from-a-devices-Wi-Fi-MAC-Address – Duston Jun 25 '15 at 14:55

1 Answers1

1

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.

Community
  • 1
  • 1
Dean J
  • 39,360
  • 16
  • 67
  • 93