0

I mean, if you use tools like NetLimiter, they let you know that a given process that connections to IP1, IP2, etc. I am using packet sniffing for my application, but I only need to packet sniff one application, so I'd like to know to what ip addresses that application is connected. Any easy way to do this? I am using a wrapper for WinPCap.

edit: After googling I came to know about the -netstat -bno command. It seems to do what I want, but I'd like to know if there are any specific functions do do it. Otherwise, I'll use this.

edit2: w i n d o w s !

devoured elysium
  • 101,373
  • 131
  • 340
  • 557
  • I am not sure what you are asking. You say netstat -bno is what you want, but ask for a specific function to do that. Do you want a c#/c++/something .net function? Ie are you doing this programmatically or want a tool like Netlimiter? – RJFalconer Aug 13 '09 at 17:15

3 Answers3

1

As you suggest, use the windows equivalent;

netstat -abnot 
RJFalconer
  • 10,890
  • 5
  • 51
  • 66
1

Take a look at GetExtendedTcpTable(), and it's related listed functions. C or C++, I imagine the VB equivs have similar names if your taste is VB.

http://msdn.microsoft.com/en-us/library/aa365928%28VS.85%29.aspx

Eric M
  • 1,027
  • 2
  • 8
  • 21
0

If you are on Linux you can say "netstat -nap" which will list open network and UNIX domain sockets.

Also you can read info like this from /proc/net/tcp and /proc/net/udp. This page http://linuxdevcenter.com/pub/a/linux/2000/11/16/LinuxAdmin.html should get you started.

Eric M
  • 1,027
  • 2
  • 8
  • 21