cap
cap copied to clipboard
Not all interfaces are available
Hello!
I noticed that I can't capture traffic for some interfaces (like VPN connections). Is it supported?
Output from systeminformation:
[
{
"iface": "Ethernet",
"ip4": "10.190.201.120",
"ip6": "fe80::4857:7b9f:5352:126e",
"mac": "50:46:5d:66:5f:ed",
"internal": false
},
{
"iface": "Beeline Internet", // <--- I want to capture on this interface
"ip4": "95.29.167.212",
"ip6": "",
"mac": "00:00:00:00:00:00",
"internal": false
},
{
"iface": "Loopback Pseudo-Interface 1",
"ip4": "127.0.0.1",
"ip6": "::1",
"mac": "00:00:00:00:00:00",
"internal": true
}
]
Output from Cap. deviceList ():
[
{
"addresses": [],
"description": "NdisWan Adapter",
"name": "\\Device\\NPF_{878F73D6-9D00-4184-9701-C8309B79BD0C}"
},
{
"addresses": [
{
"addr": "fe80::4857:7b9f:5352:126e"
},
{
"addr": "10.190.201.120",
"broadaddr": "255.255.255.255",
"netmask": "255.255.248.0"
}
],
"description": "Realtek PCIe GBE Family Controller",
"name": "\\Device\\NPF_{AF4AB692-6040-4E44-B0A1-E30C7858772C}"
},
{
"addresses": [],
"description": "NdisWan Adapter",
"name": "\\Device\\NPF_{B20FDE49-DF61-409B-A4A6-C6A02FED4A42}"
},
{
"addresses": [],
"description": "NdisWan Adapter",
"name": "\\Device\\NPF_{5A2D7797-F7E7-41FE-9EF2-80F7D40D3808}"
}
]
When I'm trying to call findDevice with 95.29.167.212 IP address I gon a null.
Thank you!
Probably a limitation of WinPcap/WinPcap compatibility mode in npcap. Ideally the Windows-specific code should be updated to use npcap's direct API which might help with problems like this.
How can I find all the MAC addresses using this library?