Wireshark mailing list archives

Add computed bytes of different length


From: Kevin Cox <kevincox () kevincox ca>
Date: Wed, 04 Jun 2014 10:09:11 -0400

Hello,

Please forgive me if I am missing something obvious.  I am trying to add
some computed bytes to the proto_tree and wish them to be filterable.
However, the proto_tree_add_bytes and similar functions only have one
length argument that is used for both the tvb and the value pointer.
The problem is that my bytestring is not directly from the tvb and is a
different length.  I was wondering how I could add this to the tree.

Currently I see only the following options:
- Add it with the correct length for the value and have the output show
the string coming from the wrong place in the packet.  This also has the
problem that I can extend past the end of the tvb possibly raising
exceptions.
- Use a FT_NONE and don't add the value byte string.  However this
removes the option of filtering on the value of the field.

Any advise would be appreciated,
Kevin

Attachment: signature.asc
Description: OpenPGP digital signature

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: