Re: [tcpdump-workers] Has anyone got a clang-format for the tcpdump style?

2023-01-07 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Sat, Jan 7, 2023 at 12:38 PM Denis Ovsienko wrote: > On Wed, 4 Jan 2023 08:40:21 -0500 > Bill Fenner via tcpdump-workers > wrote: > > > Hi, > > > > I know the tcpdump style follows a bunch of bsd patterns, since it > > came from Berke

[tcpdump-workers] Has anyone got a clang-format for the tcpdump style?

2023-01-04 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- Hi, I know the tcpdump style follows a bunch of bsd patterns, since it came from Berkeley in the first place. Does anyone have a clang-format config that reflects these coding conventions? One of the problems I have in upstreaming Arista-developed tcpdump code is making sur

Re: [tcpdump-workers] [tcpdump] About struct in_addr / struct in6_addr

2022-07-17 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Sun, Jul 17, 2022 at 3:30 PM Guy Harris via tcpdump-workers < tcpdump-workers@lists.tcpdump.org> wrote: > > Should we care about it, or should we just drop support for OSes lacking > native IPv6 support in 5.0? IMO it is safe to drop support for OSes lacking native IPv6

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 a

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 pcap_setn

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 pcap_setn

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 the

[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 --- I'm helping to debug a system that uses many many pcap handles, and never calls pcap_loop - only ever pcap_next. We've found that each pcap handle has an associated eventfd, which is used to make sure to wake up when pcap_breakloop() is called. Since this code doesn't call p

Re: [tcpdump-workers] Any way to filter ether address when type is LINUX_SLL?

2021-01-21 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- It would be perfectly reasonable (and fairly straightforward) to update libpcap to be able to filter on the Ethernet address in DLT_LINUX_SLL or DLT_LINUX_SLL2 mode. There are already filters that match other offsets in the SLL or SLL2 header. However, I don't think it could

Re: [tcpdump-workers] libpcap detection and linking in tcpdump

2021-01-07 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Wed, Sep 9, 2020 at 12:08 PM Denis Ovsienko via tcpdump-workers < tcpdump-workers@lists.tcpdump.org> wrote: > Travis CI tcpdump builds have been failing for a while and I went to > see why. It is easy to see that only the jobs that have > "BUILD_LIBPCAP=yes CMAKE=yes" fail

Re: [tcpdump-workers] [tcpdump] After setjmp/longjmp update

2021-01-06 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Tue, Jan 5, 2021 at 8:10 PM Denis Ovsienko via tcpdump-workers < tcpdump-workers@lists.tcpdump.org> wrote: > Bill Fenner via tcpdump-workers > wrote: > > > I just wanted to share some of my thinking about how to proceed with > > the truncation-

Re: [tcpdump-workers] [tcpdump] After setjmp/longjmp update

2021-01-04 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- I just wanted to share some of my thinking about how to proceed with the truncation-related changes on the road to 5.0.0. 1. Improve code coverage for the printer that's being modified. (This ensures that the code being modified has a corresponding test pcap that can be used

Re: [tcpdump-workers] CVE-2020-8037: memory allocation in ppp decapsulator

2020-11-30 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Mon, Nov 30, 2020 at 12:59 PM Michael Richardson wrote: > Hi, CVE-2020-8037 causes a big amount of memory to be allocated (then > freed), > it does not cause an attack. That's helpful information. (On a low-memory device that actually requires memory at malloc time, it

[tcpdump-workers] CVE-2020-8037: memory allocation in ppp decapsulator

2020-11-30 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- I see that Red Hat/Fedora have released new packages to address CVE-2020-8037 in tcpdump. Does the tcpdump group have any message about this CVE? Is there a release from tcpdump.org with this CVE fixed? See https://bugzilla.redhat.com/show_bug.cgi?id=1895080 for details (po

Re: [tcpdump-workers] Using libnetdissect in other code, outside tcpdump source tree

2020-08-14 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- On Wed, Aug 12, 2020 at 6:22 PM Guy Harris wrote: > On Aug 12, 2020, at 1:31 PM, Guy Harris via tcpdump-workers < > tcpdump-workers@lists.tcpdump.org> wrote: > > > We should probably have an include/libnetdissect directory in which we > install netdissect.h and the headers i

[tcpdump-workers] Using libnetdissect in other code, outside tcpdump source tree

2020-08-12 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- Hi, Is there a plan for a public face for libnetdissect? I've tried teasing it out, and I ended up having to install: funcattrs.h print.h config.h netdissect.h ip.h ip6.h compiler-tests.h status-exit-codes.h in /usr/include/tcpdump/ in order to compile a libnetdissect-using

Re: [tcpdump-workers] Compile libpcap with DLT_LINUX_SLL2

2020-05-09 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- Since there's interest in SLL2 here, I'd like to raise the visibility of my libpcap pull request for filtering on ifindex: https://github.com/the-tcpdump-group/libpcap/pull/829 It filters on both live "any" captures (SLL or SLL2) and reading from a saved SLL2 pcap. Bill --

Re: [tcpdump-workers] Compile libpcap with DLT_LINUX_SLL2

2020-03-13 Thread Bill Fenner via tcpdump-workers
--- Begin Message --- The "-y" flag to tcpdump allows you to specify capturing with DLT_LINUX_SLL2. //tmp @fenner-t493.sjc% tcpdump -i any -y linux_sll2 udp port 53 tcpdump: data link type linux_sll2 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on any, li