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

I'm trying to develop my own dissector for some protocol I've analysed. I took skeleton dissector from README.developer and filled it. Now that I'm trying to compile it I get following error, and cannot figure out what's wrong:

/home/andrey/grive/wireshark-dissector-template/packet-intl.c: In function     ‘proto_reg_handoff_intl’:
/home/andrey/grive/wireshark-dissector-template/packet-intl.c:370:58: warning: passing argument 1 of ‘new_create_dissector_handle’ from incompatible pointer type [enabled by default]
                                                      proto_intl);
                                                      ^
In file included from /home/andrey/grive/wireshark-dissector-template/packet-intl.c:46:0:
/usr/include/wireshark/epan/packet.h:322:34: note: expected ‘new_dissector_t’ but argument is of type ‘int (*)(struct tvbuff_t *, struct packet_info *, struct proto_tree *)’
WS_DLL_PUBLIC dissector_handle_t new_create_dissector_handle(new_dissector_t dissector,

asked 03 Jul '13, 02:25

Andrey's gravatar image

Andrey
21447
accept rate: 50%


Presumably you're building from trunk, the dissector function now has four parameters which the skeleton code hasn't caught up with yet.

You'll need to append a void * to the parameter list for your dissector function, the usual format is void *data _U_. The signature of a dissector function is defined in epan\packet.h as:

typedef int (*new_dissector_t)(tvbuff_t *, packet_info *, proto_tree *, void *);

permanent link

answered 03 Jul '13, 02:42

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Thanks, it helped

(03 Jul '13, 03:47) Andrey
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×173
×41
×8

question asked: 03 Jul '13, 02:25

question was seen: 2,766 times

last updated: 03 Jul '13, 03:47

p​o​w​e​r​e​d by O​S​Q​A