Question

Locked

Why won't libpcap find my device?

By sanks4545 ·
Hello,

I have just started using libpcap, the C library for network monitoring but it won't even recognize my device!

#include stdio.h
#include pcap.h

int main(int argc, char *argv[])
{
char *dev, errbuf[PCAP_ERRBUF_SIZE];

dev = pcap_lookupdev(errbuf);
if (dev == NULL) {
fprintf(stderr, "Couldn't find default device: %s\n", errbuf);
return(2);
}
printf("Device: %s\n", dev);
return(0);
}

Any hints? I have both an ethernet jack and a wireless card (Using a macbook pro late 2010)

Many Thanks!

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Software Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums