Wireshark mailing list archives
Re: Dynamic value string
From: Sylvain Munaut <246tnt () gmail com>
Date: Fri, 9 Sep 2011 19:12:21 +0200
Hi,
Well, at least in 1.6.x and later (I don't know whether this was supported in 1.4.x), doc/README.developer says:
[ .... snip ....]
BASE_CUSTOM allows one to specify a callback function pointer that will
format the value. The function pointer of the same type as defined by
custom_fmt_func_t in epan/proto.h, specifically:
void func(gchar *, guint32);
The first argument is a pointer to a buffer of the ITEM_LABEL_LENGTH size
and the second argument is the value to be formatted.
Very interesting ... seems I missed that because in the SVN, the
_proto_tree_add_bits_ret_val function doesn't seem to support that
display style.
They call hfinfo_uint_format directly. But I think this function could
actually benefit from using fill_label_uint rather than reimplementing
the logic locally.
Cheers,
Sylvain
___________________________________________________________________________
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-request () wireshark org?subject=unsubscribe
Current thread:
- Dynamic value string Sylvain Munaut (Sep 09)
- Re: Dynamic value string Guy Harris (Sep 09)
- Re: Dynamic value string Sylvain Munaut (Sep 09)
- Re: Dynamic value string Guy Harris (Sep 09)
