Wireshark-bugs: [Wireshark-bugs] [Bug 8070] Patch for packet-coap.c
Date: Tue, 19 Mar 2013 06:48:27 +0000

Comment # 10 on bug 8070 from
(In reply to comment #6)
> (In reply to comment #3)
> > > - You replace some proto_tree_add_item calls with proto_tree_add_text.
> > > This is generally discouraged as the values can no longer be filtered
> > > on this way (there are some cases where it is unavoidable, unfortunately).
> > > Is there a particular reason you replaced these, or can they be left as is?
> > > New code should try to use proto_tree_add_item where possible, for the same
> > > reason.
> > 
> > The encoding rule of CoAP is not simple and is complicated comparingwith the
> > things supported by proto_tree_add_item().if the length field of some of
> > options is zero, it means null, some mean zero.
> > some length fields have a semantic to decode the folloging field.
> > So, I decide to use proto_tree_add_text() instead stick to use add_item().
> 
> An additional option is to fetch the values yourself and then add them to
> the protocol tree with proto_tree_add_uint(), proto_tree_add_string(), etc. 
> That way, you can fetch values according to encoding rules more complicated
> than the rules proto_tree_add_item() allows, but still have the values be
> named fields that can be filtered on, reported with "-T fields", etc.

Agreed.  See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8070#c9


You are receiving this mail because:
  • You are watching all bug changes.