![]() Spoiler alert - Just implemented TCPv4 here. This is some very "POC" code I got working from these libraries. If you have (for example) multiple tabs open in your browser, could choose to show the data for each connection individually, or you could amalgamate them as you saw fit. You retrieve the information with GetPerTcpConnectionEStats for IPv4 or GetPerTcp6ConnectionEStats for IPv6.Įither of these will retrieve a table, with each row in the table containing statistics for one connection. Each connection is identified by a combination of local address/port and remote address port (same as used above). The second pair gets you statistics about the data sent/received on a particular connection. ![]() To get all the information above, you'll probably need to call this (at least) twice: once with the TCP_TABLE_OWNER_PID_CONNECTIONS flag, and once with the TCP_TABLE_OWNER_MODULE_CONNECTIONS flag to retrieve both the PID and the module name of the local executable. ![]() The first function is GetExtendedTcpTable. ![]() Well, technically, it's three functions: for the second part of the data, there are separate functions for IPv4 and IPv6 data. Windows supplies you with this information in two parts from different functions that you'll need to put together to get the full story. ![]()
0 Comments
Leave a Reply. |