Wireshark-bugs: [Wireshark-bugs] [Bug 6764] New: Improve 11.10.6.1. ProtoField.new(name, abbr, t
Date: Tue, 24 Jan 2012 13:54:39 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764

           Summary: Improve 11.10.6.1. ProtoField.new(name, abbr, type,
                    [voidstring], [base], [mask], [descr])
           Product: Wireshark
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Low
         Component: Documentation
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: dvice_null@xxxxxxxxx


Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--
In
http://www.wireshark.org/docs/wsug_html_chunked/lua_module_Proto.html#lua_class_Pref

11.10.6.1. ProtoField.new(name, abbr, type, [voidstring], [base], [mask],
[descr]) has this:
base (optional)
    The representation BASE_*. 

While 11.10.6.2. ProtoField.uint8(abbr, [name], [base], [valuestring], [mask],
[desc]) has this:
base (optional)
    One of base.DEC, base.HEX or base.OCT 

What is BASE_*? Is it even correct? If it is correct, why two so similar
functions are using so different values? Should the new() be changed to use
base.DEC, base.HEX or base.OCT also? Or should uint8 be changed to use BASE_*?
IMHO one of these should be picked and both should use it to be consistent.

If it is decided that both should use BASE_*, then the documentation needs to
be updated to list all the alternatives instead of just "*".

Same problem in:
11.10.2.1. DissectorTable.new(tablename, [uiname], [type], [base])

And then there is also this:
type
    Field Type (FT_*). 

And this:
type (optional)
    Either FT_UINT* or FT_STRING (defaults to FT_UINT32) 

Again, get rid of the "*". If it is difficult to write the alternatives, it
will be difficult to write code based on documentation that doesn't even list
the alternatives.

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