separated pcap functionality in a separate file