https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5907
--- Comment #3 from Bill Meier <wmeier@xxxxxxxxxxx> 2011-05-13 22:58:34 EDT ---
Some comments:
- Are the stdio.h, stdlib.h & string.h #includes actually needed ?
- The 'if (initted)' & etc around the code in proto_reg_handoff is not needed
in this case.
- if (check_col(pinfo->cinfo, COL_PROTOCOL)) test not needed;
- probably best to combine the col_set_str & col_add_fstr to a single
col_add_str
Leaving this within a check_col is OK in this case since the code within is
"complex"(does some work to format the string).
- Subdissector must be called whether or not 'if(tree)'
also: 'offset' returned by dissect_cnip will be different depending upon
'if(tree)'.
See the doc/README.developer section 1.2 Skeleton code
starting with "A protocol dissector may be called in 2 different ways "
for a discussion about how to handle this
- 'if (len < packet_len) {...}' not needed;
a. The "actual" length (aka "captured" length) may be short if the capture
was done with a "snaplen"
(ie: a limit on the number of bytes to be captured from a packet).
b. In general, the idea is just to dissect. If bytes are missing
Wireshark will throw an exception and show an error message.
- use tvb_new_subset_remaining(tvb, offset) iso tvb_new_subset;
I think tis means no fetching of lengths, reported lengths, etc will be
required.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.