Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Problem in building Plugin

From: Helge Kruse <Helge.Kruse-nospam@xxxxxxx>
Date: Thu, 22 Sep 2011 13:10:28 +0200
Am 22.09.2011 10:27, schrieb Rajesh P S:
Sorry. Problem is with struct fragment_items  as this has undergone some
changes between 1.2.6 to 1.6.2. Earlier there was only 6 fields now they
have added two more. Its working fine.

Ok, you updated your dissector code to the new Wireshark interface version 1.6.

But I am facing another issue where in when I try to run wireshark.exe I am
getting this run time error.

[image: image.png]
Besides some changes in the interface (e.g. structure layout, renamed functions, removed functions, added functions) there are also some functional changes. While you could pass an array to an uninitialized ett array the new version checks for initialization.

The function proto_register_subtree_arrray has one out parameter. It's an array identified by an address and a count. If you don't try to pass the same array multiple times to the function, you probably have not initializes this array. The old code

  int m_ettHeader;
  int m_ettBody;
  int* tree[2] = { &m_ettHeader, m_ettBody };
  proto_register_subtree_arrray(tree, 2);

must be changed:

  int m_ettHeader = -1;
  int m_ettBody = -1;
  ...

BTW: This is told in the message box you've sent.

Regards,
Helge