Basic sniffer sample code (from Chad Renfro)