Wireshark-bugs: [Wireshark-bugs] [Bug 5317] Add dissector for Tektronix Teklink Protocol

Date: Tue, 19 Oct 2010 10:08:29 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5317

--- Comment #2 from Bill Meier <wmeier@xxxxxxxxxxx> 2010-10-19 13:08:28 EDT ---
One comment:

You've a number of "unterminated" value_string arrays which will need to be
fixed (eg: teklink_vtc_srcnames).

Also: Fairly recently functions to handle "extended value strings" were added
to Wireshark.

Essentially they are an optimization to allow value-strings to be accessed
directly (indexed) or via a binary search with the determination made at
run-time the first time an extended value-string is used.

Extended value-strings could be used instead of code like 
  src > ARRAY_SIZE(teklink_vtc_srcnames) ? "Source unknown" : 
                                            teklink_vtc_srcnames[src].strptr,

All the details are handled for you.

See a recent README.developer.

Also see packet-e212.c (in SVN) for an example of the use of extended
calue-strings

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