Re: [tcpdump-workers] What's the correct new API to request pcap_linux to not open an eventfd

2022-07-05 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- Hi Denis, Thanks for pointing out the manpage update. I had old man pages (my work is being done in the context of the 1.10 release). What confused me is the asymmetry of the API. If you call pcap_setnonblock() on an un-activated socket, it sets a flag and doesn't return

Re: [tcpdump-workers] What's the correct new API to request pcap_linux to not open an eventfd

2022-07-05 Thread Denis Ovsienko via tcpdump-workers
--- Begin Message --- On Fri, 1 Jul 2022 13:55:30 -0400 Bill Fenner via tcpdump-workers wrote: > If we set > pcap_nonblock after pcap_create and before pcap_activate, we get -3 - > which I don't get at all, unless, -3 means "you didn't activate the > pcap yet". My naive reading of the Linux

Re: [tcpdump-workers] What's the correct new API to request pcap_linux to not open an eventfd

2022-07-01 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Fri, May 20, 2022 at 6:10 PM Bill Fenner wrote: > On Fri, May 20, 2022 at 12:36 PM Guy Harris wrote: > >> If it's putting them in non-blocking mode, and using some >> select/poll/epoll/etc. mechanism in a single event loop, then the right >> name for the API is

Re: [tcpdump-workers] What's the correct new API to request pcap_linux to not open an eventfd

2022-06-01 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Fri, May 20, 2022 at 6:10 PM Bill Fenner wrote: > On Fri, May 20, 2022 at 12:36 PM Guy Harris wrote: > >> If it's putting them in non-blocking mode, and using some >> select/poll/epoll/etc. mechanism in a single event loop, then the right >> name for the API is

Re: [tcpdump-workers] What's the correct new API to request pcap_linux to not open an eventfd

2022-05-20 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Fri, May 20, 2022 at 12:36 PM Guy Harris wrote: > If it's putting them in non-blocking mode, and using some > select/poll/epoll/etc. mechanism in a single event loop, then the right > name for the API is pcap_setnonblock(). There's no need for an eventfd to > wake up

Re: [tcpdump-workers] What's the correct new API to request pcap_linux to not open an eventfd

2022-05-20 Thread Guy Harris via tcpdump-workers
--- Begin Message --- On May 20, 2022, at 10:56 AM, Bill Fenner via tcpdump-workers wrote: > I'm helping to debug a system that uses many many pcap handles, and never > calls pcap_loop - only ever pcap_next. Both pcap_loop() and pcap_next() ultimately go to the same place. Note, BTW, that