Re: [tcpdump-workers] pcap_lookupdev returning NULL

2020-11-04 Thread Vaughan Wickham via tcpdump-workers
--- Begin Message ---
content filtering: check whitelisting

Hello Guy,

In regards to your latest comments regarding

sudo setcap cap_net_raw,cap_net_admin+eip {your program}

Are you saying that I need to compile my program and then start the compiled 
version with these arguments, from a terminal?

Or is there a way that I can pass these arguments within the IDE?

Alternatively, while I've been happy using CentOS as a development environment 
up until now. As I'm planning on doing some work with pcap; if there is a 
"better" distro for doing pcap development I'm more than happy to build another 
development system using whatever flavour is easiest to develop with.

Basically I would like to be able build and execute within the IDE.

Regards,
Vaughan
--- End Message ---
___
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


[tcpdump-workers] pcap_lookupdev returning NULL

2020-11-04 Thread Vaughan Wickham via tcpdump-workers
--- Begin Message ---
Hello,

I am a pcap newbie, so this is certain to be a mistake on my part; I'm just 
looking for advice on where to look.

When I run the following code:

#include 
#include 
#include 

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);
}

dev == NULL

dev should be eth0

I'm using CentOS v7

The following packages are installed


  *   libpcap.x86_64
  *   libpcap-devel.x86_64

Would appreciate suggestions on what else to check / try?

Regards,
Vaughan
--- End Message ---
___
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Re: [tcpdump-workers] pcap_lookupdev returning NULL

2020-11-05 Thread Vaughan Wickham via tcpdump-workers
--- Begin Message ---
content filtering: check whitelisting

Hello Guy,

Appreciate all the info that you have provided.

Although it probably doesn't look like it from my questions; I did actually 
read some tutorials prior to posting my initial question; and none made 
reference to the need for:
sudo setcap cap_net_raw,cap_net_admin+eip {your program} 

So I'm wondering if you can suggest some reading that I should review to 
understand the basics of using libpcap.

Also, where can I find an overview of the key differences between version 1.5.3 
and the current release?

Regards,
Vaughan
--- End Message ---
___
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers