`IpHlpApi.GetExtendedUdpTable<IpHlpApi.MIB_UDP6TABLE_OWNER_PID>` Bug?
See original GitHub issueDescribe the bug
I got a lot of large PID
from UDP6 table.
It seems like a bug.
If I change to UDP table (IPv4) rather 6, and change AF_INET6
to AF_INET
. There’s no any large PID, all in 5 digits.
What code is involved
static void PrintUdpV6() {
using var table = IpHlpApi.GetExtendedUdpTable<IpHlpApi.MIB_UDP6TABLE_OWNER_PID>(IpHlpApi.UDP_TABLE_CLASS.UDP_TABLE_OWNER_PID,
Ws2_32.ADDRESS_FAMILY.AF_INET6);
foreach (var row in table) {
Console.WriteLine($"PID={row.dwOwningPid, 10}, EndPoint={new IPEndPoint(new IPAddress(row.ucLocalAddr), (ushort)IPAddress.NetworkToHostOrder((short)row.dwLocalPort))}");
}
}
Expected behavior No large PID.
Screenshots If applicable, add screenshots to help explain your problem.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
GetExtendedTcpTable function (iphlpapi.h) - Win32 apps
The GetExtendedTcpTable function retrieves a table that contains a list of TCP endpoints available to the application.
Read more >GetExtendedTcpTable (iphlpapi.dll) returns undocumented ...
What is this error code and why does it occur only at specific machines? The issue is not googling well. I found only...
Read more >net_windows.go
modiphlpapi = windows.NewLazySystemDLL("iphlpapi.dll"). procGetExtendedTCPTable = modiphlpapi.NewProc("GetExtendedTcpTable").
Read more >gopsutil/net/net_windows.go at master
NewLazySystemDLL("iphlpapi.dll") procGetExtendedTCPTable = modiphlpapi.NewProc("GetExtendedTcpTable") procGetExtendedUDPTable = modiphlpapi.
Read more >GetExtendedTcpTable (iphlpapi): pinvoke.net
The GetExtendedTcpTable function retrieves a table that contains a list of TCP endpoints available to the application. C# Signature: [DllImport("iphlpapi.dll", ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I went through every structure to ensure size is correct. Most recent commit has all those corrections.
Thanks your great work!