raw icon indicating copy to clipboard operation
raw copied to clipboard

Parse the BPF header for length

Open arktos opened this issue 6 years ago • 1 comments

Instead of hard-coding the length of the BPF header, this pull-request casts the header into a Go struct and gets the length of the header from that struct. This neatly solves a problem where the header length varies not only with the OS, but also by the architecture.

This solution works without further hacks on FreeBSD and OpenBSD. I haven't had time to test this on NetBSD as raw doesn't build there yet due to the structure of its timeval.

arktos avatar May 25 '19 11:05 arktos

Apologies for the delay. Could you please rebase this on master as well? Thanks.

mdlayher avatar Jun 06 '19 13:06 mdlayher