Wireshark-bugs: [Wireshark-bugs] [Bug 7639] Bluetooth minor enhancement
Date: Fri, 21 Sep 2012 04:50:41 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7639

--- Comment #78 from Anders Broman <anders.broman@xxxxxxxxxxxx> 2012-09-21 04:50:40 PDT ---
(In reply to comment #77)
> (In reply to comment #74)
> > Comment on attachment 9175 [details]
> > [PATCH 12] Bluetooth: Use p_*_proto_data APIs for protocols
> > 
> > Hi,
> > per_proto_data has session scope e.g the memory will be keept around as long as
> > th capture file is open. You can't use ep alloced memmory inside the struct and
> > you must be careful of the memory consumtion penalty of storing per packet
> > data.
> Right. But, is there any way to do that in way like this? 
> Example:
> There is one frame with 6 protocols. 
> P1 -> P2 -> P3 -> P4 -> P5 -> P6
> How to obtain data (field?) from P1 in P5? For now I only see put data in all
> protocols by pinfo->private_data. This is not flexible, because (P2-P4) does
> not use it, but must implement adding data to own private_data structure (I
> guess pass along previous private_data is not allowed).
> Maybe we should create similar API for that case? This will avoid mixing
> protocols data (P3 should not know about that data)

Coulden't the newly added feature of adding data to the protocol calls usable
in this case? P2 - P4 would have to "know" that data is (to be) passed
But as was disscused the data structure and magic number is defined in packet.h
that wouldn't be a problem - would it?
The data part could be void* and casted to  p1_data_t at the end points
P2 - P4 should perhaps check the magic number

Anders

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.