Wireshark-bugs: [Wireshark-bugs] [Bug 11952] Create API to more easily have fields copied to hig

Date: Sun, 04 Dec 2016 00:57:28 +0000

Comment # 4 on bug 11952 from
This enhancement probably started with an eye towards TLVs, but I also had the
"wanting to copy value to parent tree" case in mind.
I think a proto_tree_add_tlv could be a possibility, but I was also thinking
about something like proto_item_append_field.

Rough signature:
enum field_data {
PI_FIELD_COMPLETE, PI_FIELD_VALUE, PI_FIELD_VS_ONLY};

void proto_item_append_field(proto_item* parent_item, proto_item* field_item,
enum field_data);

Pseudocode:
parent = proto_tree_add_item(tree, hf, tvb, offset, 2, ENC_BIG_ENDIAN);
item = proto_tree_add_item(tree, hf_other, tvb, offset, 2, ENC_BIG_ENDIAN);
/* Add value to parent */
proto_item_append_field(parent, item, PI_FIELD_VALUE


You are receiving this mail because:
  • You are watching all bug changes.