static PAirpcapHandle pcap_get_airpcap_handle_win32(pcap_t *p) { #ifdef HAVE_AIRPCAP_API struct pcap_win *pw = p->priv; return (PacketGetAirPcapHandle(pw->adapter)); #else return (NULL); #endif /* HAVE_AIRPCAP_API */ }
PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p) { #ifdef HAVE_AIRPCAP_API if (p->adapter == NULL) { sprintf(p->errbuf, "wrong interface type. A physical interface is needed"); return NULL; } return PacketGetAirPcapHandle(p->adapter); #else return NULL; #endif /* HAVE_AIRPCAP_API */ }