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 !

4

3 回答 3

1

正如你所建议的,使用windows等价物;

netstat -abnot 
于 2009-08-13T17:17:34.453 回答
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

于 2009-08-13T17:25:47.413 回答
0

如果您在 Linux 上,您可以说“netstat -nap”,它将列出打开的网络和 UNIX 域套接字。

你也可以从 /proc/net/tcp 和 /proc/net/udp 中读取这样的信息。此页面http://linuxdevcenter.com/pub/a/linux/2000/11/16/LinuxAdmin.html应该可以帮助您入门。

于 2009-08-13T17:11:12.017 回答