Hi,i try to create my own dissector and i copy all file needed from gryphon plugin dissector and change gryphon name in makefile with my own dissector name but if i use cmake i hade error: this is my cmakeoutput.txt <snipped for="" brevity="" as="" irrelevant=""> asked 06 Jun '16, 09:14 kenhero edited 07 Jun '16, 02:03 grahamb ♦ |
One Answer:
Thank you for your voluminous output, usually I have to ask for more, not in this case. Things start going wrong around here:
The initial warnings in proto.h are odd, and the subsequent errors in proto.h leads me to believe you’ve defined something in your plugin that has broken subsequent compilation. What do you have in the plugin code before the #include that brings in proto.h? You might not be including it directly, but via another include, e.g. epan/packet.h. answered 06 Jun ‘16, 12:33 grahamb ♦ Only 1 error now in my build but i think actually the problem is that wireshark guide says to take “gryphon plugin” as reference but i have to understand that gryphon dissector is a udp dissector while my dissector is tcp dissector and there are difference . this is where build failed (the last part of build.txt lol file)
(06 Jun ‘16, 15:35) kenhero Your issue is still with the code in your dissector, unless you show it to us, e.g. github or similar, we’re just guessing. To make the dissector use udp instead of tcp you’ll need to modify the (07 Jun ‘16, 02:00) grahamb ♦ i try to follow this link link text even if i merged this guide with wireshark 9.2 guide because,for example,i can use nmake with last wireshark version to creat a dissector .dll (07 Jun ‘16, 02:08) kenhero @kenhero Yet again I’ve converted your “answer” to a comment, please read the site FAQ for more info. That link is hopelessly out of date, most external articles about wireshark are never updated after they’re written while the wireshark project moves on. Use the current Wireshark Developers Guide if you’re building with sources from master (or 2.0). (07 Jun ‘16, 02:54) grahamb ♦ Finally i solved the issue and build without errors. Btw I can’t follow the wireshark developer guide completely because,for example, it defines in chapter 9.2.2. Dissecting the details of the protocol: static void dissect_foo(tvbuff_t tvb, packet_info pinfo, proto_tree *tree) instead of static int dissect_pvs(tvbuff_t tvb, packet_info pinfo, proto_tree tree, void data) (08 Jun ‘16, 09:06) kenhero Thanks for the report, I updated the developer’s guide to update the sample code: https://code.wireshark.org/review/#/c/15783 (08 Jun ‘16, 13:29) Pascal Quantin Another error: Example 9.8. Wrapping up the packet dissection. void proto_tree_add_item(foo_tree, hf_foo_pdu_type, tvb, offset, 1, ENC_BIG_ENDIAN); It’s now : proto_item proto_tree_add_item(proto_tree tree, int hfindex, tvbuff_t tvb, const gint start, gint length, const guint encoding); (09 Jun ‘16, 08:56) kenhero I don’t see the issue in Example 9.8, the calls that use the returned value assign it to a variable of type (09 Jun ‘16, 09:33) grahamb ♦ yes but in the guide proto_tree_add_item returns void (09 Jun ‘16, 12:51) kenhero I’ve searched the current Developers Guide asciidoc sources and the on-line version and none of the 16 references to Are you looking at the latest version of the Developers guide, and if so can you please show the exact excerpt where you see the problem? (10 Jun ‘16, 02:32) grahamb ♦ @kenhero I am also having the same Errors, how did you solve the Errors?? (10 Nov ‘16, 05:55) xaheen showing 5 of 11 show 6 more comments |
this is my output after debug solution. my dissector is pvs