Re: [tcpdump-workers] pcap_lookupdev returning NULL

2020-11-04 Thread Guy Harris via tcpdump-workers
--- Begin Message --- On Nov 4, 2020, at 10:26 PM, Vaughan Wickham wrote: > 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,

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 termina

Re: [tcpdump-workers] pcap_lookupdev returning NULL

2020-11-04 Thread Guy Harris via tcpdump-workers
--- Begin Message --- On Nov 4, 2020, at 9:18 PM, Vaughan Wickham wrote: > Version: libpcap version 1.5.3 That's an older version (CentOS, proudly trailing-edge!), and only returns interfaces that the program can open. Capturing on Linux generally requires, at minimum, the CAP_NET_RAW privileg

Re: [tcpdump-workers] pcap_lookupdev returning NULL

2020-11-04 Thread Guy Harris via tcpdump-workers
--- Begin Message --- What happens if you put printf("Version: %s\n", pcap_lib_version()); before the pcap_lookupdev() call? It won't fix the pcap_lookupdev() call not to return NULL, but it'll indicate what version of libpcap your program is using, which might help determine what the

[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[]) {