2012/10/11 Mike Morrin <morrinm...@gmail.com>

> On 11/10/2012 06:26, Pascal Quantin wrote:
>
>> Le 11/10/2012 05:10, mman...@netscape.net a écrit :
>>
>>> Pascal,
>>> Did you settle on the value, value+1?  I think I have the exact same
>>> problem in bug 7728
>>> (https://bugs.wireshark.org/**bugzilla/show_bug.cgi?id=7768<https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7768>
>>> )
>>>
>> Hi,
>>
>> right now I'm displaying the value like what we would do with a
>> value_string array: computed value and raw value in parenthesis. It is
>> the best trade-off I could think to so far:
>>              oct = tvb_get_guint8(tvb, curr_offset) & 0x0f;
>>              proto_tree_add_uint_format_**value(tf_tree,
>> hf_gsm_a_sm_tft_pkt_flt_id, tvb, curr_offset, 1, oct, "%d (%d)", oct+1,
>> oct);
>> Any other idea is welcome.
>>
>>  Why not use an hf with BASE_CUSTOM and write a custom display function
> to format the string?
>

Hi Mike,

you are right I could have used it. Given the low complexity of my display
and the fact that it is called twice in the code, I'm not sure it is worth
it though. But I should think more often to the existence of BASE_CUSTOM.

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

Reply via email to