Modification of pcap_stat function