I have been developing a Download(+upload) Usage Monitor on and off since the beginning of this year, and obviously wish to filter out all loopback and LAN traffic so that my monitor only counts what is used by the internet.
I only need these two bits of info:
- Where each packet came from/is going to (either LAN, LoopBack, or Internet)(Local/Remote)
- How many bytes in that packet (If from the Internet/Remote)
I partially solved the problem for XP (With Admin) by using a Raw socket, and examening the IP info and packet size in the Packet's header, though this method only works for download, and I read that Raw Sockets were disabled
or something in Vista and 7.
I was wandering how to go about creating a Filter (or seperate filters depednind on operarating system) that can work for download and upload on xp/vista/7? surely this should be simple since there is no manipulation...just
looking/monitoring, but all I can find that 'may' do the job is Windows Filtering Platform, which seems ridiculously overkill for what such a simple job, and possibly doesnt even work with VB! Any ideas?
Here is an Example of the download only 'filter' code I use with my RAW Socket...
View Complete Post