Hi
Is it possible to display variable length data using g_snprintf? For the 802.11k AP channel report, the channel list is dependent on the tag_len which is variable.
tag_data_ptr = tvb_get_ptr (tvb, offset, tag_len);
for (i = 0, n = 0; i < tag_len; i++) {
ret = g_snprintf (print_buff , SHORT_STR ,
"%02X ", tag_data_ptr[i]);
}
proto_tree_add_string (tree, hf_tag_channel_list, tvb, offset, tag_len, print_buff);
right now it is displaying as channel list: <and the last value it is holding>.
i want it to display all the supported channel list as channel list : 1 6 etc. depending on the tag_len.
Please suggest.
Thanks,
Soumya