On Jan 26, 2004, at 3:42 PM, Chris Wilson wrote:
Are composite TVB's known to work?
No.
I can't find a dissector that uses them as an example.
...which makes it less likely that they work, as the code hasn't been
exercised much.
I'm using two subtree tvb's and trying to combine them into one
composite tvb:
tvbuff_t *ud_tvb = tvb_new_composite();
tvb_composite_append(ud_tvb, udh_tvb);
tvb_composite_append(ud_tvb, body_tvb);
tvb_composite_finalize(ud_tvb);
add_new_data_source(pinfo, ud_tvb, "GSM SMS UD");
call_dissector(gsm_sms_ud_handle, ud_tvb, pinfo, tree);
So is this a situation where you have two discontiguous parts of a
packet that should be dissected as a single unit? (I.e., you're not,
for example, using it to reassemble parts of *separate* packets?)
I do however manage to get the first byte decoded and have noticed
that the GUI doesn't automatically switch between the two data sources
as it should - is there somewhere in the GUI that asks a data source
whether it contains a tvb (and both data sources return true?).
The "add_new_data_source" mechanism is designed only to work with new
"real data" tvbuffs, not composite tvbuffs. It might be possible to
make it handle composite tvbuffs; can you send a dissector using
composite tvbuffs and a capture with which to test it?