tcpdump mailing list archives

Re: Modular arithmetic


From: Guy Harris <guy () alum mit edu>
Date: Mon, 10 Sep 2012 10:50:30 -0700


On Sep 10, 2012, at 3:41 AM, "David Laight" <David.Laight () ACULAB COM> wrote:

What about the other OS - eg all the BSDs?
I had a vague idea that BPF was supposed to be reasonable portable.

Yes, does it mean BPF is frozen ?

Or is BSD so hard to update these days ?

Not really - but it some other places that need updating in order
to make this useful for cross-platform tools (like tcpdump).

The 'real fun (tm)' happens when NetBSD tries to run Linux binaries
that include the Linux libpcap.

Additional fun happens when a Linux system with a kernel that doesn't have the mod instruction tries to run Linux 
binaries that include a Linux libpcap that generates code using the mod instruction; this is not a BSD-vs.-Linux issue, 
it's a "kernel that lacks the mod instruction vs. libpcap that generates code that includes the mod instruction" issue.

BSD/OS X, Linux, Solaris, and the WinPcap driver need, if they adopt new BPF instructions, to have a mechanism by which 
libpcap (or anything else using BPF filtering) can inquire about the capabilities of the OS BPF interpreter; libpcap 
would use that to determine what code to generate if generating code for the in-kernel BPF interpreter.

(Please reply to tcpdump-workers () lists tcpdump org as well as to netdev () vger kernel org, so that people not on 
both of those lists can follow the discussion.  Messages from non-members of tcpdump-workers to tcpdump-workers 
shouldn't bounce, but they do need to be approved by a moderator; Michael, if you want to at least temporarily turn the 
flood on for my e-mail address, so I can help moderate, go ahead.)
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: