I have set up an application that listens constantly to a port for network packets, and I would like to create another one that receives the same network packets ( for use as a test bed). Getting the packets sent to 2 different ports on the machine is not an option, so I was wondering if there is a way to set up a "port-mirror". Basically, is there an easy way to make all traffic received on port XXXXX also copy to port XXXXX + 1?
I know there is a similar question here, but I don't quite understand the suggested solution.
Barring that, is there another easy way to simulate network data to test some code with that I am overlooking?