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

Constructing the HF declarations dynamically

0

Hi all,

I have a requirement to build some of the Wireshark data structures dynamically, like the HF Info data. I tried to do this and build the data structure and passed the same while registering the protocol. Everything went fine, compilation and installation as well. But, when i execute i could see the dissection happening, but when the select the fields under that protocol Wireshark crashes. It throws the following.

Unhandled exception ("proto.c:4567: failed assertion "hfinfo->type==FT_PROTOCOL"", group=1, code=4)

can we build these data structures dynamically, and if at all where should it be stored, is there any constraint.

One more questions with curiosity, is there any way Wireshark can read XML file which contains protocol information and generate plugin which can be used to dissect the incoming data.

Thanks in advance.

-Regards Kiran Kumar G

asked 14 Nov '13, 10:22

Kiran%20Kumar%20G's gravatar image

Kiran Kumar G
21111415
accept rate: 0%

1

For which version of wireshark do you get Unhandled exception ("proto.c:4567: failed assertion "hfinfo->type==FT_PROTOCOL"", group=1, code=4? Check the lan in proto.c it might give you an idea of what goes wrong.

packet-diameter.c builds dynamic hf:s look there, it also reads XML.

(14 Nov '13, 12:31) Anders ♦

I am using Wireshark version 1.6.1

(15 Nov '13, 00:22) Kiran Kumar G

One Answer:

0

is there any way Wireshark can read XML file which contains protocol information and generate plugin which can be used to dissect the incoming data

No, but there is the Wireshark Generic Dissector plugin, which lets you give protocol information in a syntax that doesn't suck the way XML would. :-)

answered 15 Nov '13, 01:19

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%