Skip to content

libpnet interfaces cannot return IPv6 address on Windows #707

@rikonaka

Description

@rikonaka

OS: Windows 11 10.0.22631 Build 22631

fn test_windows() {
    for interface in interfaces() {
        // can not found ipv6 address in windows
        println!("{}", interface);
    }
}

Output

\Device\NPF_{CD3CE291-BD38-42E0-AFA9-902C8B360EDD}: flags=0
      index: 17
      ether: f4:4e:fc:4f:ab:0f
       inet: 0.0.0.0/0
\Device\NPF_{0A871DAA-E859-411A-AF5E-90E33B8B9587}: flags=0
      index: 3
      ether: 00:50:56:c0:00:08
       inet: 192.168.72.1/24
\Device\NPF_{97E58DA7-4AE8-4C4F-BAED-C041CD1581AA}: flags=0
      index: 10
      ether: 00:50:56:c0:00:01
       inet: 192.168.36.1/24
\Device\NPF_{B1F5EDD3-A40A-44DF-929B-1CB5FD42D22C}: flags=0
      index: 14
      ether: 00:00:00:00:00:00
       inet: 0.0.0.0/0
\Device\NPF_{AD264497-F660-4258-95B6-AEF0C5C4E83F}: flags=0
      index: 13
      ether: 2c:f0:5d:56:72:96
       inet: 192.168.1.115/24
\Device\NPF_{E2A60CE5-DE70-4C5E-94EC-AE7E388B52AE}: flags=0
      index: 19
      ether: 00:ff:e2:a6:0c:e5
       inet: 0.0.0.0/0

My computer has IPv6 addresses

Windows IP Configuration

Ethernet adapter net 2:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : xxxxx:34d0::1000
   IPv6 Address. . . . . . . . . . . : xxxxx:34d0:4dfa:a555:b74f:4c57
   Temporary IPv6 Address. . . . . . : xxxxxx:98b5:847b:8f26:2322
   Link-local IPv6 Address . . . . . : fe80::93a5:3740:1c78:31a3%13
   IPv4 Address. . . . . . . . . . . : 192.168.1.115
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : fe80::4a5f:8ff:fee0:1394%13
                                       192.168.1.1

Unknown adapter OpenVPN Connect DCO Adapter:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter VMware Network Adapter VMnet1:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::82df:fe49:3040:1af7%10
   IPv4 Address. . . . . . . . . . . : 192.168.36.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::8278:525c:195a:eafb%3
   IPv4 Address. . . . . . . . . . . : 192.168.72.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions