Add a call to pcap_dump_flush to after each pcap_dump call.