pcap programming