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?

u17
  • 2,776
  • 4
  • 31
  • 43
  • The best place to start is www.pinvoke.net. This webpage (from your link) : https://msdn.microsoft.com/library/windows/desktop/bb485738.aspx uses the enum from pinvoke : https://www.pinvoke.net/default.aspx/Enums.MIB_TCP_STATE. You can use following : https://www.pinvoke.net/default.aspx/iphlpapi/GetExtendedTcpTable.html – jdweng Mar 31 '18 at 13:52

0 Answers0