Ethereal-dev: [Ethereal-dev] tvbuff composite question

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

From: Shao Zhang <shaoz@xxxxxxxxxxxxx>
Date: Tue, 30 Jul 2002 12:01:15 +1000
Hi,

I would thought the following code will give me the same result:

header = tvb_get_guint8(tvb, offset);

vs.

tvbuff_t *stp_tvbuff = tvb_new_composite();
tvb_composite_append(stp_tvbuff, tvb);
tvb_composite_finalize(stp_tvbuff);
header = tvb_get_guint8(stp_tvbuff, offset);

But it did not. I am writing for an application protocol that has
fragmentation on top of TCP. So I would like to use tvb_composite_* to
queue up all the tvbuffs before actually dissecting.

I found little documentation and code examples so far, any help will be greatly
appreciated. Please also let me know if there are better ways to
approach this.

Thanks for any help in advance. (Please CC me)

Regards,

Shao.