如何使用 LSP/SPI 控制共享 Internet 连接(ICS - Internet 连接共享)? [英] How to control shared internet connection (ICS - Internet Connection Sharing) using LSP/SPI?

查看:153
本文介绍了如何使用 LSP/SPI 控制共享 Internet 连接(ICS - Internet 连接共享)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为自己编写一个应用程序来学习东西并在我自己的办公室中使用.我想写的是:

I am trying to write an application for myself to learn things and to use in my own office. What I am trying to write is:

  • 我有两个网卡.第一个连接到互联网,另一个连接到网络
  • 我在自己的 PC 中启用了 ICS(Internet 连接共享)
  • 其他电脑(笔记本电脑、iPad 等)正在使用我的电脑连接到互联网
  • 所以我的 c 就像一个热点

我正在尝试查看他们连接到的位置并记录他们的 IP 和 MAC 地址.如果可以的话,我以后也会增加登录功能.

I am trying to see where they are connecting to and log their IP and MAC address. If I can do this, I will also add sign-in function at future.

实际上,我的 LSP 支持 TCP、UDP 和 RAW 协议.它适用于 x86 和 x64 Windows 操作系统(在 Windows 7 上测试).但是,当我使用 iPad 通过这台 PC 连接到互联网时,它似乎不起作用.WSPStartup 从未调用过.

Actually, my LSP supports TCP, UDP and RAW protocols. It works both on x86 and x64 Windows OS (Tested on Windows 7). However, when I connect to internet through this PC using my iPad, it doesn't seem working. WSPStartup never called.

如果您有任何想法,我会非常高兴.

If you have any idea, I will be more than happy.

最佳,

推荐答案

您需要使用 NDIS,像 WinPCAP 这样的库可以完成这项工作.

You need to use NDIS, a library like WinPCAP would do the work.

这篇关于如何使用 LSP/SPI 控制共享 Internet 连接(ICS - Internet 连接共享)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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