Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 39143: /trunk/epan/dissectors/ /trun
From: Anders Broman <a.broman@xxxxxxxxxxxx>
Date: Mon, 26 Sep 2011 18:24:03 +0200
Maynard, Chris skrev 2011-09-26 17:21:
-----Original Message-----

  From me:
  Change ENC_NA to ENC_BIG_ENDIAN as i suppose this is a big endian
protocol and ENC_NA was erroneously used for irems bigger than i byte
in some cases.
This is a good example of the problem that can occur with using ENC_NA.

Are there any more thoughts to doing something about it?
a) Leave it as it is; it's fine.
b) Eliminate ENC_NA altogether.
c) Define ENC_NA differently from both ENC_LITTLE_ENDIAN and ENC_BIG_ENDIAN.
d) Use proto_tree_add_[type]_[endian]_item() macros instead.
e)<Insert brilliant idea here>

See: http://www.wireshark.org/lists/wireshark-dev/201107/msg00405.html
I'd vote for b, d sort of defies the purpose with proto_tree_add_item() where a general prototype is used
and FT defines the type of field added in my opinion.

Length checks on the different FT:s may be difficult as I think FT_(U)INT32 as example may be used for 1 - 4 byte values in some cases.

Regards
Anders
CONFIDENTIALITY NOTICE: The contents of this email are confidential
and for the exclusive use of the intended recipient. If you receive this
email in error, please delete it from your system immediately and
notify us either by email, telephone or fax. You should not copy,
forward, or otherwise disclose the content of the email.

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list<wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe