Patch for pcap support and other port changes. (Credit: nox@)