开发者

Identify all interfaces of computer by giving host

doing little network projects for identification interfaces of computer.

Id like to just use Ping, DNS, TCP to achieve it.

Eg. I give google.pl as hostname, I obtain ip.

string host = "google.pl";
IPA开发者_StackOverflowddress[] address = Dns.GetHostAddresses(host);

Ok iv got IP. Now how can I check witch interface it use to communicate?


If I understand what you want to do correctly, then it's impossible. There are thousands of different protocols the computer could be using to communicate, many of them proprietary. And even if you somehow managed to detect all of the protocols used today, new ones are going to come into existence.


This by no means is an easy problem to solve reliably, so outsource the functionality to another program.

The easiest way to accomplish this is to write an adaptor to use the NMAP shell program, and then parse out the output.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜