I am playing around with a way to kick cheaters in Modern Warfare 2 (when you are the host). So far I have been able to use winpcap to sniff packages to identify the player names and their IPs.
The next thing I need is a way to block all traffic (or just the target IPs UDP traffic to my machine). Hence the player will timeout/lagout.
Does anyone know of an available library that lets me do this easily. I could go about doing this the hard way and install Windows DDK and mess around in C++ to create a low level NDIS driver, but being überly rusty on C++ and all the typical compile issues that comes when compiling template code for this, I really prefer some ready coded library for this.
Or maybe someone has a better idea that would work?
Solution: Use Windows Firewall. Easy API to create and remove rules on the fly. http://stackoverflow.com/questions/1242566/any-way-to-turn-the-internet-off-in-windows-using-c
And a a test program that does this now works. I kicked 2 people out of the game :))