在C#中的设备-什么类句柄? [英] Device in c# - what class handle ?

查看:109
本文介绍了在C#中的设备-什么类句柄?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,

我现在正在编写一个使用ip并告诉您该ip是什么程序的程序.
如果它是服务器,打印机或路由器,还是没关系.
有人有一个至高无上的想法可以使用吗?如何 ?

谢谢,谢谢!!!

hey ,

I programing now a program that take ip and say to you what this ip .
if it a server or printer or router or never matter .
someone have a idea wich class to use ? how ?

thank you , thank you !!

推荐答案

您无法从IP地址分辨出它是哪种设备:您可能能够查明是否可以查询单个设备,它可以返回某种设备上限,但是我不知道有哪个简单的类可以做到这一点-您可能必须深入研究Windows联网API的深度-Google可能是您最好的选择,但是"将不是一个简单的事情.
You cannot tell from the IP address what kind of device it is: You may be able to find out if you can query the individual device, and it can return some sort of device caps, but I know of no simple class which can do that - you will likely have to delve deep into the depths of the windows networking API - Google is probably your best bet, but it''s not going to be a simple matter.


您可以使用 ^ ]类以查看IP地址是否为活动",然后通过ARP表(在cmd.exe-arp -a下)读取MAC地址.
拥有MAC地址后,您可以查找前6个字符并找到供应商.

http://www.coffer.com/mac_find/ [ http://aruljohn.com/mac.pl [ http://anonsvn.wireshark.org/wireshark/trunk/manuf [如何通过.NET访问ARP协议信息? [ ^ ]
You can use Ping[^] class to see if the IP address is "alive", and then read the MAC address via the ARP table ( under cmd.exe - arp -a )

When you have the MAC address you can lookup the first 6 characters and find the vendor.

http://www.coffer.com/mac_find/[^]

http://aruljohn.com/mac.pl[^]

A list (old ?) from Wireshark
http://anonsvn.wireshark.org/wireshark/trunk/manuf[^]

How do I access ARP-protocol information through .NET?[^]


这篇关于在C#中的设备-什么类句柄?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆