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

Problem with call_dissector() on fix?

0

Hello,

from my protocol I call, depending on the data other protocols ... most of it eth or fix.

I made dissector handle

static dissector_handle_t data_handle_eth;
static dissector_handle_t data_handle_fix;

and used find_dissector on it.

data_handle_eth = find_dissector("eth");
data_handle_fix = find_dissector("fix");

when I do

 call_dissector(data_handle_eth, next_tvb, pinfo, tree)

everything is fine. The data is decoded as eth. But when I do

 call_dissector(data_handle_fix, next_tvb, pinfo, tree)

wireshark crashes with

 **
 ERROR:packet.c:1988:call_dissector_only: assertion failed: (handle != NULL)
 Aborted

It can not be a problem with the handler or other code parts from me because when I change

data_handle_fix = find_dissector("fix");

to tcp or another protocol

data_handle_fix = find_dissector("tcp");

it works fine with the data.

Is there a problem with the fix protocol? Any Ideas?

Thanks

asked 26 Nov '13, 10:00

Gatherer's gravatar image

Gatherer
16447
accept rate: 0%


2 Answers:

1

You are probably using a version of Wireshark where the fix dissector does not register by name. The fix dissector in trunk has

fix_handle = new_register_dissector("fix", dissect_fix, proto_fix);

Does that exist in the version you are buildng with?

answered 26 Nov '13, 12:32

Anders's gravatar image

Anders ♦
4.6k952
accept rate: 17%

edited 26 Nov '13, 14:24

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196

Not unless he's building against the trunk or, possibly, one of the development builds, as per my answer.

(26 Nov '13, 14:25) Guy Harris ♦♦

I will build against different versions ... from 1.2.x to latest stable ... depends on linux version it will run on ...

So I will try to get fix running by adding the line or some more (now I know the way)

another small question ... why is it so? Why not register the dissector? Is there a special reason?

(27 Nov '13, 02:36) Gatherer

No other reason than no one needed it before I suspect.

(27 Nov '13, 04:37) Anders ♦

thanks to all ... it is possible to add

 register_dissector("fix", dissect_fix, proto_fix);

in older versions and register fix so it can be found

(28 Nov '13, 09:08) Gatherer

1

Is there a problem with the fix protocol?

No, there's an inadequacy (for your purposes) in the Wireshark dissector for the FIX protocol.

Unless you're developing the dissector for your protocol to work with the version of Wireshark on the trunk of the SVN repository, or with the current development version of Wireshark, you will NOT be able to call the FIX dissector. Only on the trunk does it register itself by name, in the fashion mentioned by Anders; it does not do so in 1.10.x or in any earlier versions.

answered 26 Nov '13, 14:24

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%