On Dec 24, 2013, at 5:30 AM, [email protected] wrote:

> Isn't it simple enough to add a proto_tree_add_gsm_sms_item (or similar) API

We already have tvbuff and proto_tree_ routines that take bit offsets and bit 
counts, so this may be another case where the regular routines don't work; a 
routine to handle TS 23.038 encoding, taking a *bit* offset and a count of 
*characters*, might be the best solution here.

I'd vote for proto_tree_add_ts_23_038_item(), though - that encoding isn't used 
only in the GSM/3GPP/LTE version of SMS.

> and enforce the hf_ variables have ENC_3GPP_TS_23_038 encoding?

I'm not sure what you mean by "enforce the hf_ variables have 
ENC_3GPP_TS_23_038 encoding"; named fields don't have an encoding, so you can't 
enforce that a named field (which is what an hf_ variable refers to) have a 
particular encoding.

> I don't think the meaning of the length field of proto_tree_add_item should 
> be different based on encoding,

It shouldn't be based on the encoding.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to