Skip to content

Conversation

orfins
Copy link
Contributor

@orfins orfins commented Jun 7, 2019

PCAP on Windows needs GUID's (names of devices in format \Device\NPF_{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}, and this is what findalldevs returns and what open_live expects.
The matching readable names (like Local Area Connection and Ethernet) are hard to find, so I added this functionality to make it transparent to the user.

Basically, I made findalldevs return the readable names, and open_live expect them.

@BobbyAtCore BobbyAtCore merged commit 0c58209 into helpsystems:master Jul 2, 2019

/* testing of nhGetInterfaceNameFromGuid indicates the unpublished API function expects the 3rd parameter
* to be the available space in bytes (as compared to wchar's) available in the second parameter buffer
* to receive the friendly name (in unicode format) including the space for the nul termination.*/
Copy link
Contributor

@gpotter2 gpotter2 Jul 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats some very scary stuff 😄 (understand: this PR was merged WAYYYY too quickly)

Not only does this PR breaks backward compatibility (it requires the name rather than the UUID. This will break basically everything), and uses a name that may suffer from duplication (yes, you can change an adapter's name), but it also uses an undeclared function, that could disappear at anytime.

I know the intent is good, but there is a reason to use very "unfriendly" GUIDs: they are unique ! That's like, the whole point of it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants