(Mar 12, 2014 12:13 PM)Only3 Wrote: another way can be to get some info with cmd
Oh yeah, totally forgot about netstat. I think someone posted such thing here a long time ago..
EDIT: My other post got deleted?
Here is it again:
There is no simple way to recreate the program of the picture you posted. Although, there is a way to get (some) (established) connections.
You can use the System.Net.NetworkInformation namespace.It has a class named IPGlobalProperties.
IPGlobalProperties:
http://msdn.microsoft.com/en-us/library/....110).aspx
But, in order to get a PID (ProccesID) from a connection, you would have to use some APIs:
GetExtendedTcpTable: http://msdn.microsoft.com/en-us/library/...s.85).aspx
GetExtendedUdpTable: http://msdn.microsoft.com/en-us/library/...s.85).aspx
Example in .NET:
http://www.codeproject.com/Articles/1442...sing-the-G
But as packets have a Transport Layer (for example; TCP or UDP) you will have to 'get' them all.
Transport Layer: http://en.wikipedia.org/wiki/Transport_layer
The list there is just small, there are way more to explore!
If you just need TCP & UDP your are fine programming it in .NET, although if you want to monitor EVERYTHING you have to write a (n atleast, I think) a driver that monitors this, which will have to be written in a language like C++