moving pcap code out into own source files