I need to write some code to determine which tcp connection(s) are opened by a particular process on the local machine. This code will run locally on the same machine as the process that is creating the network connections. This process is known by the executable file's name. I need the IP address(es) that it is connecting to. This process is a piece of middleware and is not a .net process and I do not have the source code for it.
The windows command line utility "netstat" executed with "-b" flag gives me the answer. I'd like the .net equivalent of that. I'd prefer not to start a command line "netstat -b" in .net code and parse the output - that is the obvious answer.