use iterators to read pcap