Error in use of the pcap_findalldevs_ex Function in c++
问题 Below this program to retrieve the list of adapters and print it on the screen : #include <stdio.h> #include <pcap.h> int main() { pcap_if_t *alldevs; pcap_if_t *d; int i=0; char errbuf[PCAP_ERRBUF_SIZE]; if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) { fprintf(stderr,"Error in pcap_findalldevs_ex: %s/n", errbuf); exit(1); } for(d= alldevs; d != NULL; d= d->next) { printf("%d. %s", ++i, d->name); if (d->description) printf(" (%s)/n", d->description); else printf("