tcpdump mailing list archives

Re: Modular arithmetic


From: "David Laight" <David.Laight () ACULAB COM>
Date: Mon, 10 Sep 2012 09:41:02 +0100

On Fri, Sep 07, 2012 at 07:49:10AM +0000, George Bakos wrote:
Gents,
Any fundamental reason why the following (, etc.) shouldn't be
included in net/core/filter.c?

                case BPF_S_ALU_MOD_X:
                        if (X == 0)
                                return 0;
                        A %= X;
                        continue;

Copying netdev.

In principle no reason against it, but you may need to update
the various BPF JITs too that Linux now has too.

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

        David    (dsl () netbsd org)




_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: