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

I wrote a plugin for wireshark 1.7.1 which was working fine then. When i tried same source with 1.9.0 , it gives me following error while make install.

packet-extl2.c: In function 'proto_reg_handoff_extl2':
packet-extl2.c:265: error: passing argument 1 of 'new_create_dissector_handle' from incompatible pointer type
packet-extl2.c:266: error: implicit declaration of function 'dissector_add'
make[3]: [packet-extl2.lo] Error 1
make[3]: Leaving directory /root/wireshark/wireshark-1.9.0/plugins/extl2' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory/root/wireshark/wireshark-1.9.0/plugins'
[install-recursive] Error 1
make[1]: Leaving directory `/root/wireshark/wireshark-1.9.0'
make: *** [install] Error 2
[[email protected] wireshark-1.9.0]$

Here is my function which is creating problems:

dissector_handle_t extl2_handle;
ip_handle = find_dissector("ip");
extl2_handle = new_create_dissector_handle(dissect_extl2,proto_extl2);
dissector_add("ethertype", 0x0800,extl2_handle);

I am not sure what's wrong. dissect_extl2 returns "tvb_length" and has return type of static int. And also what header i am missing to get "implicit declaration of dissector_add" . Any help appreciated.

Thanks for your time.

asked 28 Feb '13, 06:00

yogeshg's gravatar image

accept rate: 0%

edited 28 Feb '13, 06:11

I think the problem you're experiencing is that the prototype for the dissectors' top-level dissection routine has changed. Here's how I get around it with my (private) dissector (which I compile on into Wireshark versions before and after this change):

static int
dissect_XXX(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
dissect_XXX(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
permanent link

answered 28 Feb '13, 06:40

JeffMorriss's gravatar image

JeffMorriss ♦
accept rate: 27%

at least error is not coming now , thank you.

(28 Feb '13, 07:34) yogeshg

Try changing dissector_add() to dissector_add_uint().

permanent link

answered 28 Feb '13, 06:33

Anders's gravatar image

Anders ♦
accept rate: 17%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 28 Feb '13, 06:00

question was seen: 2,775 times

last updated: 28 Feb '13, 07:34

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