Wireshark-bugs: [Wireshark-bugs] [Bug 6797] proto: Add proto_tree_add_split_{uint, int} helpers

Date: Mon, 6 Feb 2012 12:21:40 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6797

--- Comment #1 from Anders Broman <anders.broman@xxxxxxxxxxxx> 2012-02-06 12:21:39 PST ---
(In reply to comment #0)
> Created attachment 7777 [details]
> proto: Add proto_tree_add_split_{uint,int} helpers for non contiguous int
> fields
> 
> Build Information:
> Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
> -v", or "tshark -v".
> --
> This adds a helper in proto.c to display fields where you have to go grab bits
> at several places (within a 32 bits word) to make the value.
> 
> This doesn't recover the value of the field itself, it just takes care of the
> formating and displaying of 'bit fields' in the common format to display such
> things.
> 
> (thing like  ....110...1100...1 = 0xd9)
> 
> This will be used in the GMR-1 RR dissector among others where some fields have
> been split into small values (i.e. MSB at one place, LSB at another).
> 
> If you don't think this belongs in proto and should be somewhere else, I can
> prefix it with gmr1_ and place it in gmr1_common.c (it does need to be exported
> in the global namespace tough because it's used in several gmr1 files).

Hi,
- We would need a write up of the function in README.developer as well.
- You should probably post to the developers list to get more feedback.
- Would it be feasible to have proto_tree_add_split_item() instead/as well
  and have all the magic done internally? Would it be better to go for 64bits?
Regards
Anders

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