Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] tvbuff questions and conclusions...

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

From: Diwakar Shetty <diwakar@xxxxxxxxxxxxxx>
Date: Mon, 12 Mar 2001 10:36:44 +0600
hi

In order to transfer the existing code from 0.8.9 to 0.8.16......i went
through the tvbuff.c and tvbuff.h files to understand the working of
tvbuff. This had to be done because personally I found the documentation
about the interfaces to tvbuff (in tvbuff.h) to be not that thorough
which I expected...

so I have come to some conclusions and also some doubths....

please let me know if i am wrong in the conclusions....

Conclusion No. 1: traversal down the tvb tree is done by the "used_in"
field of "struct tvbuff"

Conclusion No. 2: traversal up the tvb tree is done by the "subset"
field of "struct tvbuff"

Doubth No.1  : Why two "len" fields are required (one of which is in
"struct tvbuff" and another in the "subset" field of "struct tvbuff") .
I am asking because both of them are set to the same value in the
function "tvb_set_subset()"

Doubth No. 2 : Why is  "used_in" field of "struct tvbuff" a pointer to a
list. Shouldn't it be just a pointer to "struct tvbuff". I am asking
because upon going through the code , one finds that "used_in" points
just to one entry i.e the "new_subset".

thanks

diwakar