views:

60

answers:

1

I have to differentiate between the real addresses and the VM addresses using any Windows API. I'm using Getadaptersaddresses API to populate a list of ipaddresses for the local machine. I need to extract only the "real" addresses apart from the addresses associated with the VMware network adapter and other addresses(auto-configuration and tunnel adapter addresses) I've not been able to find any API or any flag to differentiate this. Is there any way this can be done?

PS:The IfType flag in the IP_ADAPTER_ADDRESSES structure returned by Getadaptersaddresses doesn't help me differentiate between VMware addresses and the real addresses

+1  A: 

The beginning (first 3 segments) of the mac address shows if a interface is virtual:

"00:05:69"; //vmware1
"00:0C:29"; //vmware2
"00:50:56"; //vmware3
"00:1C:42"; //parallels1
"00:03:FF"; //microsoft virtual pc
"00:0F:4B"; //virtual iron 4
"00:16:3E"; //red hat xen , oracle vm , xen source, novell xen
"08:00:27"; //virtualbox

EDIT
To be more clear, if a interface has a MAC address that starts with any of the above given strings, then it's virtual.

clyfe
just wanted to add some links: use this link - http://standards.ieee.org/regauth/oui/index.shtml to find id reservations. Reverse operation can be performed here: http://coffer.com/mac_find/
Andrey
thanks, that was quite helpful
Venkat
how about accepting some answers on that 20% accept rate?
clyfe
This doesn't exactly answer the question: how do we know from the company name if it's virtual or not?
Gyuri
What do you mean by "from the company name"?
clyfe