it called a packet sniffer, you will probably need to be on a hub for it to work fully. However, you can see all the physicall packets entering and leaving your box. This will allow you to debug your program.

You might need to read up on a TCP/IP packets.