This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

convert_proto_tree_add_text.pl failure

0
  1. I am trying to use convert_proto_tree_add_text.pl for a dissector that has:

proto_tree_add_text(tl_tree, tvb, offset, -1, "Data (%d bytes)", tvb_reported_length_remaining(tvb, offset));

generate gave me:

1;1;tl_tree;hf_tl_data_(%d_bytes)";tvb;offset;-1;encoding;Data (%d bytes)";fieldtype;tl.data_(%d_bytes)";BASE_DEC;NULL;0x0

however fixall fails:

C:\Development\wireshark\tools>convert_proto_tree_add_text.pl ../epan/dissectors /packet-tl.c --action=fix-all --encoding=ENC_BIG_ENDIAN

1: Encoding value 'encoding' unknown!

1: Field type 'fieldtype' unknown! Aborting conversion.

Should the replacement be like: proto_tree_add_item(tl_tree, hf_tl_data, tvb, offset, -1, ENC_BIG_ENDIAN);

{&hf_tl_data,
{ "Data", "tl.data",  
FT_UINT16, BASE_DEC, NULL, 0x0,
"Data", HFILL } }

I am not sure what the FT value should be here.

2.When debugging using printf, how to I get the console when using windows interface. In 2.x wireshark version I am not seeing the "open console" option.

Thanks

asked 16 Mar '17, 21:27

erin's gravatar image

erin
6112
accept rate: 0%

Under advanced , found the gui.console_open and updated it to Always. However console level log is set to 28 by default. Will prints show up on console with this logging level?

(16 Mar '17, 22:06) erin