是否可以检查谁连接到您的无线网络?
因此,经过几个小时的研究,我对这个问题一无所获。
是否可以使用 C# 查看谁连接到我的无线网络?
示例:我有 2 台笔记本电脑 - 笔记本电脑 A 和笔记本电脑 B。
A 正在运行我编写的程序,并且 连接到我的无线网络。
B 正在启动并连接到我的无线网络。 A 现在可以通过我编写的程序看到 B 已连接到无线网络。
这可能吗?
So after hours of research i have found nothing about this question.
Is it possible to see who is connected to my wireless network using C#?
Example: I have 2 Laptops - Laptop A and Laptop B.
A is on running my program I made and
connected to my wireless network.B is starting up and connects to my wireless network. A can now see that B is connected to the wireless network through the program I made.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
选项 1) 取决于您的无线连接设备是什么(假设是路由器或接入点)及其可编程程度。例如,如果您有 Linksys WRT54GL,您可以加载 DD-WRT 或其他 OSS 固件并编写自己的模块来监视此行为。使用 C# 对该模块进行编程需要将 mono 库加载到 DD-WRT 安装中。
选项2)在每台可以连接到无线网络的机器上安装“心跳监视器”。一旦与该网关建立连接,守护进程就会告诉其他监视器它现在已连接到网络。
如果您无法控制连接的设备,则选项 1 是最佳选择。如果您可以控制连接的设备,则选项 2 是最佳选择。
Option 1) depends on what your wireless connection device is (supposing a router or access point) and how programmable it is. For instance, if you have a Linksys WRT54GL, you could load DD-WRT or another OSS firmware and write your own modules to monitor this behavior. Programming that module in C# would require loading the mono libraries into the DD-WRT install.
Option 2) install a "heartbeat monitor" on each machine that could connect to the wireless network. Once the connection to that gateway has been made, the daemon tells other monitors that it is now connected to the network.
Option 1 is best if you have no control over what devices connect. Option 2 is best if you can control what devices connect.
从理论上讲,是的 - 如果您的无线路由器公开了一个 API,您可以连接该 API 以获取当前连接的客户端列表,那么您很可能可以用 C# 编写一些内容来轮询 API 的更改。
实际上,我不知道有任何无线路由器能够真正实现我上面建议的功能。话又说回来,我从来没有真正研究过它,所以谁知道呢!
In theory, yes - if your wireless router exposes an API that you can hook into to get the list of currently connected clients, then it's likely that you can write something in C# that will poll the API for changes.
Practically speaking, I'm not aware of any wireless router that actually does what I proposed above. Then again, I've never really looked into it so who knows!