Wireshark-bugs: [Wireshark-bugs] [Bug 5270] diff for a new dissector for COAP (draft-ietf-core-c

Date: Wed, 20 Oct 2010 13:46:28 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5270

--- Comment #23 from Jeff Morriss <jeff.morriss.ws@xxxxxxxxx> 2010-10-20 13:46:27 PDT ---
(In reply to comment #19)
> Created an attachment (id=5337)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=5337) [details]
> new patch to dissect the more COAP options for svn 34581

BTW patches (even with review_for_checkin set) generally don't get looked at on
resolved bugs.  Better to open new bugs or at least reopen this one.

> I made a patch to support more COAP options.
> some options includes variable length field.
> so I couldn't find the way not to use proto_tree_add_text().
> any suggestion ?

I'd suggest using proto_tree_add_uint() or proto_tree_add_uint_format().  Then
you could do something like:

dissect_coap_opt_time(tvb, subtree, offset, opt_length, hf_coap_max_age);

and in dissect_coap_opt_time( ... int hf_time):
[...]
proto_tree_add_uint(subtree, hf_time, tvb, offset, opt_length, time);


Anyway, the latest patch was checked in.

BTW, checkhf.pl indicates that there are 2 unused hf entries:

hf_coap_opt_type
hf_coap_opt_opaque_bytes

Not sure if they will soon be used or if it's an oversight.

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