How to control shared internet connection (ICS - Internet Connection Sharing) using LSP/SPI?
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.
You need to use NDIS, a library like WinPCAP would do the work.