Wireshark-bugs: [Wireshark-bugs] [Bug 5525] BT L2CAP dissector does not handle several BT conver
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5525
--- Comment #4 from Andrei Emeltchenko <andrei.emeltchenko.news@xxxxxxxxx> 2010-12-28 03:25:03 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > Quick review :
> > No use of C++ style comments allowed.
> > Please remove the debug code.
> >
> > specific to packet-btavdtp.c:
> > Replace xx2str() into using value_string and calls to str_to_val().
> > Please use descriptive labels in your case statements i.s.o. integers.
> > Why the extensive use of proto_tree_add_text()? This stops you from using
> > display filters. The most compact presentation isn't the best, use subtrees for
> > that, also for bitfields.
>
> Thanks for the review. I use proto_tree_add_text() also because of having many
> flags (bitfield). As I understood the way dealing with bitfields is to create
> many boolean variables. Can it be done other ways?
for example what is the way to dissect following string:
proto_tree_add_text(tree, tvb, offset, 1,
"%s%s%s%s",
(buf & 0x80)? "16kHz " : "",
(buf & 0x40)? "32kHz " : "",
(buf & 0x20)? "44.1kHz " : "",
(buf & 0x10)? "48kHz " : "");
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.