pcap_top_gen function improved.