Slaus
Slaus

Reputation: 2236

What is "adapter name"?

WinAPI's GetAdaptersInfo() fills structure AdapterInfo which has field called AdapterName. What does this field mean? What's the point in it? In my case it holds string "{C01E7744-531D-401F-8EA6-D76D3AF35555}" (including curly braces).

P.S.: beside AdapterName there is pretty clear (for me) field called Description with value (in my case):

"Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC - VirtualBox Host Interface Networking Driver Miniport"

what makes me even more confused with AdapterName.

Upvotes: 1

Views: 2873

Answers (3)

zezba9000
zezba9000

Reputation: 3383

Its formatted like so

GetAdapterIndex(L"\\device\\tcpip_{FD2046B5-1DA0-40A2-9F28-DE4D6F0EBE22}", &index);

I have no idea where this is actually documented officially but found it sourced here: https://chromium.googlesource.com/external/qemu/+/refs/heads/master/qga/commands-win32.c

Upvotes: 1

Eric Petroelje
Eric Petroelje

Reputation: 60498

Looks like it's just a GUID that windows assigns to the adapter, probably as a unique identifier that you can use in some other API call to reference that adapter specifically. For example GetAdapterIndex.

Most IP helper functions seem to take an adapter index, but if you had an app that manipulated network adapters, you probably wouldn't want to store the index of a specific adapter in your app as that could change when adapters are added or removed. So you would store the name of the adapter, then use GetAdapterIndex to get the index for it when needed.

Upvotes: 1

Chris Laplante
Chris Laplante

Reputation: 29658

Description is the user-friendly name associated with AdapterName.

Sources:

http://www.delphigroups.info/2/8/215347.html

Upvotes: 0

Related Questions