Re: tcpdump follows incorrect alignment requirement rules

2014-12-09 Thread Christian Weisgerber
On 2014-12-03, Mike Belopuhov m...@belopuhov.com wrote: bpf aligns data following the datalink header (e.g. ethernet) on the BPF_ALIGNMENT boundary. Since rev1.41 of bpf.h it's uint32_t instead of a long. And also since then almost all packets become unaligned from the tcpdump perspective

Re: tcpdump follows incorrect alignment requirement rules

2014-12-09 Thread Mike Belopuhov
On 9 December 2014 at 19:00, Christian Weisgerber na...@mips.inka.de wrote: On 2014-12-03, Mike Belopuhov m...@belopuhov.com wrote: bpf aligns data following the datalink header (e.g. ethernet) on the BPF_ALIGNMENT boundary. Since rev1.41 of bpf.h it's uint32_t instead of a long. And also

Re: tcpdump follows incorrect alignment requirement rules

2014-12-08 Thread Mike Belopuhov
On Wed, Dec 03, 2014 at 14:56 +0100, Mike Belopuhov wrote: bpf aligns data following the datalink header (e.g. ethernet) on the BPF_ALIGNMENT boundary. Since rev1.41 of bpf.h it's uint32_t instead of a long. And also since then almost all packets become unaligned from the tcpdump perspective

tcpdump follows incorrect alignment requirement rules

2014-12-03 Thread Mike Belopuhov
bpf aligns data following the datalink header (e.g. ethernet) on the BPF_ALIGNMENT boundary. Since rev1.41 of bpf.h it's uint32_t instead of a long. And also since then almost all packets become unaligned from the tcpdump perspective and require costly copies into the internal buffer. Neither