Get UDP connection statistics from IP Helper API (iphlpapi.dll)
Asked Answered
R

0

2

I would like to count the bytes received and sent from specific UDP connections in Windows 10.

This answer lists an approach to count bytes for specific TCP connections using GetPerTcpConnectionEStats() from the IP Helper API (iphlpapi.dll). I would like to mirror this approach for UDP connections.

The IP Helper API provides UDP and TCP implementations for almost all functions (e.g., GetTcpTable(), GetUdpTable()), except the documentation does not list GetPerUdpConnectionEStats(). This answer references the function nevertheless.

Is is possible to get counts of bytes received and sent from specific UDP connections with the IP Helper API?

Rochelrochell answered 31/3, 2018 at 13:0 Comment(1)
The best place to start is www.pinvoke.net. This webpage (from your link) : msdn.microsoft.com/library/windows/desktop/bb485738.aspx uses the enum from pinvoke : pinvoke.net/default.aspx/Enums.MIB_TCP_STATE. You can use following : pinvoke.net/default.aspx/iphlpapi/GetExtendedTcpTable.htmlAntiphony

© 2022 - 2024 — McMap. All rights reserved.