Wireshark-dev: Re: [Wireshark-dev] Adding Buffer Stream View
From: didier <dgautheron@xxxxxxxx>
Date: Wed, 22 Apr 2009 20:01:06 +0200
Hi,
Le mercredi 22 avril 2009 à 17:39 +0000, gogrady@xxxxxxxxx a écrit :
> Hello,
> 
> I cant figure out where it happens but i would to create another buffer view tab. For example, when tcp reassembles, it opens up a new tab with the full buffer of the complete packet. I want to take my own created buffer and open up a new tab for highlighting. Can anyone help or point me in the right direction?
> 
Look at packet-tcp.c around line 1600:

roughly

you create a new tvb with your data:
next_tvb = tvb_new_real_data(data, datalen, datalen);

attached it to the main tvb, mainly for house keeping (freeing and so
on):
tvb_set_child_real_data_tvbuff(tvb, next_tvb);

and then create a new data source:
add_new_data_source(pinfo, next_tvb, "my data");

Didier