Ethereal-dev: Re: [Ethereal-dev] Searching for packets with incorrect checksums

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Michael Tuexen <Michael.Tuexen@xxxxxxxxxxxxxxxxx>
Date: Tue, 18 Dec 2001 22:55:29 +0100
Dear Guy,

thank you very much for the help. It really does what I want.

Best regards
Michael

On Tuesday, December 18, 2001, at 10:39 PM, Guy Harris wrote:

    proto_tree_add_item(sctp_tree, hf_sctp_checksum_correct, tvb,
CHECKSUM_OFFSET, CHECKSUM_LENGTH, checksum_correct);

That call says that there's a field, at an offset of CHECKSUM_OFFSET in
the tvbuff "tvb", with a length of CHECKSUM_LENGTH. amd that it's
big-endian if "checksum_correct" is false and little-endian if
"checksum_correct" is true.

If, in fact, you want to have the value come from a variable, rather
than from the tvbuff, you want to do

	proto_tree_add_boolean(sctp_tree, hf_sctp_checksum_correct, tvb,
	    CHECKSUM_OFFSET, CHECKSUM_LENGTH, checksum_correct);


Michael.Tuexen@xxxxxxxxxxxxxxxxx