Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use user-visible adapter name on Windows #34

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

mon
Copy link
Collaborator

@mon mon commented Apr 2, 2024

Closes #16

Keep the old GUID, but as its own field, as it's still useful in some contexts.
I would parse the GUID, but the WinAPI docs don't say anything about the string's format, so we can't trust that my system's values are formatted like anyone else.

Note: this is a BREAKING CHANGE if anyone was relying on the name struct member being the GUID. I think this is a good change to make, but if a release is pushed it'll need a semver bump.

Example interface after this change:

Interface {
    name: "Loopback Pseudo-Interface 1",
    addr: V4(
        Ifv4Addr {
            ip: 127.0.0.1,
            netmask: 255.0.0.0,
            broadcast: Some(
                127.255.255.255,
            ),
        },
    ),
    index: Some(
        1,
    ),
    adapter_name: "{E0EC89D8-2A3A-11EB-BA6E-806E6F6E6963}",
},

Keep the old GUID, but as its own field, as it's still useful in some contexts
Copy link
Owner

@messense messense left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@messense messense merged commit 93fee9d into messense:master Apr 2, 2024
12 checks passed
@mon mon deleted the windows-friendly-name branch April 2, 2024 12:11
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.

Wired interface names on windows {C685FC7C-553A-11EC-8BBC-806E6F6E6963}
2 participants