Ethereal-dev: Re: [Ethereal-dev] proto.c: line 1400 (proto_tree_add_uint): should not be re
On Thu, Feb 14, 2002 at 10:43:35AM -0600, Gilbert Ramirez wrote:
> but hf_ucp_parm_NT is an FT_STRING field, not a FT_UINT8 field.
> Since there is a value_string for this field, vals_parm_NT, I am
> guessing that hf_ucp_parm_NT should really be a FT_UINT8 type.
> However, that value string is never used in the code.
>
> I'm checking in the attached change, to make hf_ucp_parm_NT a
> FT_UINT8 type, and for it to use vals_parm_NT.
...and to change the
UcpHandleByte(hf_ucp_parm_NT);
call to
UcpHandleString(hf_ucp_parm_NT);
which I'm not sure you wanted to do.
The spec appears to say that the Notification Type field is a "Num.
char.", i.e. a single numerical character, so I assume the old
UcpHandleByte(hf_ucp_parm_NT);
call was correct, as was your change to the hf_ucp_parm_NT to make it an
FT_UINT8.
> BTW, for those that maintain packet-ucp.c, the ucp_handle_byte()
> is confusing. Why is the guint8 returned by tvb_get_guint()
> checked to see if it's != '/' ?
The ETS 300 133-3 spec seems to say that fields in a message are
separated by slashes. (Section 8.2.4.1:
Each message, operation or result, shall consist of a main body
whose format shall be as follows:
START HEADER DATA CHECKSUM STOP
The start character shall be "STX" (02hex).
The stop character shall be "ETX" (03hex).
The header and the data field consists of parameters terminated
with the character "/" (2Fhex). A parameter may contain a list
of items. The items shall then be separated by a character ","
(2Chex).
No parameter terminator shall be sent between the STX and the
header, or between the checksum and the ETX.
The separators "/" (2Fhex) and "," (2Chex) are not allowed in
the content of every parameter. In every parameter the type of
characters refers to IA5. Numeric characters are between 0
(30hex) and 9 (39hex).
(IA5, as I remember, is telecomese either for ASCII or for what I
remember being the international subset of ISO 646; ASCII is the US
subset, and some of the code points in ISO 646 are used for different
characters in different national subsets, e.g. code points that are
used for special characters in the US subset may be used for accented
letters in other subsets).