How to control shared internet connection (ICS - Internet Connection Sharing) using LSP/SPI?

元气小坏坏 提交于 2019-12-13 05:19:51

问题


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:

  • I have two nics. First one is connected to internet and the other one is connected to network
  • I have enabled ICS (Internet Connection Sharing) in my own PC
  • Other computers (Laptops, iPads etc.) are connecting to internet using my PC
  • So my c works like a hotspot

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.

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.

Bests,


回答1:


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



来源:https://stackoverflow.com/questions/8319505/how-to-control-shared-internet-connection-ics-internet-connection-sharing-us

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!