I'm trying to write a short program that listens in on all the traffic coming into and leaving my computer via the dialup network connection. I want to store the complete packets (IP headers etc...) and be able to view them later. I've been playing around with the socket module functions but can't seem to bind the sockets I open to any ports (really I'm not even sure if this is the right way to go). My setup is mod_perl 1.23 running under Apache 1.3.12 for Windows 98SE with a Diamond SupraMAX 56i Voice PCI modem.

Any suggestions?