获取机器的MAC地址从它的IP在C#中的本地网络上 [英] Get a machines MAC address on the local network from its IP in C#

查看:137
本文介绍了获取机器的MAC地址从它的IP在C#中的本地网络上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图写,需要一个单一的 IP地址作为参数,并查询该机器在我的本地网络上它的 MAC地址的功能

I am trying write a function that takes a single IP address as a parameter and queries that machine on my local network for it's MAC address.

我已经看到,获得本地机器本身的 MAC地址的许多例子,但是无。(我发现),似乎查询本地网络的机器吧。

I have seen many examples that get the local machine's own MAC address, however none (I've found) that seem to query a local network machine for it.

我知道这样的任务是可以实现的,因为这的Wake局域网扫描仪软件扫描本地IP范围和返回所有的机器的MAC地址/主机名。

I know such a task is achievable as this Wake on LAN scanner software scans the local IP range and returns MAC address/Hostname of all on machines.

谁能告诉我在哪里,我开始尝试写一个函数在C#中实现这一目标?任何帮助,将不胜感激。谢谢

Can anyone tell me where I'd get started trying to write a function to achieve this in C#? Any help would be appreciated. Thanks

编辑:

按照下面的Marco熔点的评论,已经使用ARP表。
命令arp类

As per Marco Mp's comment below, have used ARP tables. arp class

推荐答案

根据上述马尔科熔点的评论,已经使用ARP表。 ARP类

As per Marco Mp's comment above, have used ARP tables. arp class

这篇关于获取机器的MAC地址从它的IP在C#中的本地网络上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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