Wednesday, August 28, 2002 04:08 PM
I cannot help you with any code but I can say that writing a Java program to intercept all
TCP packets at such a low level is not easy. Unless you code hooks into the lower layers of the TCP/IP stack, the TCP requests and responses will just fly you by.
Your best hope is probably to rephrase your assignment a bit. You could write a Java proxy server which can control traffic if the traffic is directed through this proxy. There are plenty of examples on the Net that should get you started on this.