implement those pcap function both supported by winpcap and libpcap