Attached are patches to the crc16 and crc32 files.
The new functions/changes I added are:
1) To be able to compute crc's using a different seed than the ccitt
default seed of (-1). This allows you to do things such as compute a crc
spanning multiple buffers by feeding the partial crc back in and
continuing the calculation on the next buffer.
2) To allow a crc calculation to be done on only part of the tvb, by
allowing an offset to be specified.
3) Documented the headers for usage, format shamelessly stolen from proto.h.
As this is my first patch submission, I hope this is the correct format.
- Chris
-----Original Message-----
From: ethereal-dev-bounces@xxxxxxxxxxxx
[mailto:ethereal-dev-bounces@xxxxxxxxxxxx] On Behalf Of Richard van der Hoff
Sent: Tuesday, July 27, 2004 1:36 PM
To: Ethereal development
Subject: Re: [Ethereal-dev] CRC wish list
On Tue, Jul 20, 2004 at 02:29:32PM -0400, Maynard, Chris wrote:
> First, thanks to Richard van der Hoff for adding the crc16 routines.
You're welcome :)
> <snip suggestions for additional funtionality>
Chris, these all seem entirely reasonable suggestions. Certainly, it
would seem to make sense to factor out the 32-bit CRC functions so that
you can run them on an arbitrary buffer.
But, as with all new utility functions, they're going to get added as and
when
they're needed. I'm not going to do it, because I don't need them and
don't have anything to test them against. If you want the functionality,
I suggest you submit a patch :)
--
Richard van der Hoff <richardv@xxxxxxxxxxxxx>
Systems Analyst
Tel: +44 (0) 845 666 7778
http://www.mxtelecom.com
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev
-----------------------------------------
This email may contain confidential and privileged material for the sole
use of the intended recipient(s). Any review, use, retention, distribution
or disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message. Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.
Attachment:
crc32diff.h
Description: Binary data
Attachment:
crc16diff.c
Description: Binary data
Attachment:
crc16diff.h
Description: Binary data
Attachment:
crc32diff.c
Description: Binary data