tcpdump mailing list archives

Re: Modular arithmetic


From: Guy Harris <guy () alum mit edu>
Date: Wed, 5 Sep 2012 16:19:11 -0700


On Sep 5, 2012, at 2:39 PM, George Bakos wrote:

I don't see any discussion regarding adding modular operations to
pcap, i.e. "header[offset:width] % 4 != 0". I've put together a patch
that compiles & honors that (at least on the few systems I've tried),

Does it work if the right-hand side of the % operator isn't a constant power of 2 (e.g., by dividing the LHS by the 
RHS, multiplying the result by the RHS, and subtracting the result from the LHS)?
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: