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

Add basic dissector :cmake for .dll error

0

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's gravatar image

kenhero
6568
accept rate: 0%

edited 07 Jun '16, 02:03

grahamb's gravatar image

grahamb ♦
19.8k330206

this is my output after debug solution. my dissector is pvs

Microsoft (R) Build Engine versione 12.0.31101.0
[Microsoft .NET Framework versione 4.0.30319.42000]
Copyright (C) Microsoft Corporation. Tutti i diritti riservati.

<SNIPPED for brevity as irrelevant >

Compilazione NON RIUSCITA.

"C:\development2\wsbuild64\Wireshark.sln" (destinazione predefinita) (1) -> "C:\development2\wsbuild64\ALL_BUILD.vcxproj.metaproj" (destinazione predefinita) (2) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj.metaproj" (destinazione predefinita) (110) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj" (destinazione predefinita) (111) -> (destinazione: ClCompile) -> c:\development2\wireshark\epan\proto.h(863): warning C4228: nonstandard extension used : qualifiers after comma in declarator list are ignored [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(905): warning C4228: nonstandard extension used : qualifiers after comma in declarator list are ignored [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj]

"C:\development2\wsbuild64\Wireshark.sln" (destinazione predefinita) (1) -> "C:\development2\wsbuild64\ALL_BUILD.vcxproj.metaproj" (destinazione predefinita) (2) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj.metaproj" (destinazione predefinita) (110) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj" (destinazione predefinita) (111) -> (destinazione: ClCompile) -> c:\development2\wireshark\epan\proto.h(123): error C2054: expected '(' to follow 'WS_NORETURN' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(123): error C2085: 'proto_report_dissector_bug' : not in formal parameter list [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(505): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(506): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(507): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(508): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(509): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(510): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(511): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(519): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(522): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(523): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(524): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(525): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(528): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(531): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(532): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(533): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(535): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(535): error C2085: 'field_display_e' : not in formal parameter list [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(559): error C2085: 'hf_ref_type' : not in formal parameter list [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(562): error C2085: 'header_field_info' : not in formal parameter list [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(581): error C2061: syntax error : identifier 'hf_ref_type' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(583): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(584): error C2059: syntax error : '}' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(603): error C2061: syntax error : identifier 'header_field_info' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(604): error C2059: syntax error : '}' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(617): error C2016: C requires that a struct or union has at least one member [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(617): error C2061: syntax error : identifier 'header_field_info' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(627): error C2059: syntax error : '}' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(705): error C2061: syntax error : identifier 'field_info' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(707): error C2059: syntax error : '}' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(710): error C2061: syntax error : identifier 'proto_tree' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(710): error C2059: syntax error : ';' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(712): error C2061: syntax error : identifier 'proto_item' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(712): error C2059: syntax error : ';' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(805): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(805): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(805): error C2059: syntax error : ',' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(805): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(806): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(806): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(806): error C2059: syntax error : ',' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(806): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(808): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(808): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(809): error C2146: syntax error : missing ';' before identifier 'func' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(809): error C2059: syntax error : 'type' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(809): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(811): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(811): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(812): error C2146: syntax error : missing ';' before identifier 'func' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(812): error C2059: syntax error : 'type' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(812): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(857): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(857): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(857): error C2059: syntax error : 'type' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(857): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(863): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(863): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(863): error C2370: 'gint' : redefinition; different storage class [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(863): error C2146: syntax error : missing ';' before identifier 'idx' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(863): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(868): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(868): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(868): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(873): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(873): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(873): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(879): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(879): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(879): error C2059: syntax error : 'type' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(879): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(885): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(885): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(885): error C2059: syntax error : 'type' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(885): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(892): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(892): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(892): error C2059: syntax error : 'type' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(892): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(899): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(899): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(899): error C2059: syntax error : 'type' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(899): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(905): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(905): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(905): error C2370: 'gint' : redefinition; different storage class [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(905): error C2146: syntax error : missing ';' before identifier 'length' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(905): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(917): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(917): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(917): error C2371: 'tvbuff_t' : redefinition; different basic types [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(917): error C2143: syntax error : missing ';' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(917): error C2370: 'gint' : redefinition; different storage class [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(917): error C2146: syntax error : missing ';' before identifier 'end' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(917): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(923): error C2143: syntax error : missing ')' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(923): error C2143: syntax error : missing '{' before '' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(923): error C2059: syntax error : ')' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(929): error C2143: syntax error : missing '{' before '*' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(929): fatal error C1003: error count exceeds 100; stopping compilation [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj]

Avvisi: 2
Errori: 102

Tempo trascorso 00:00:21.47

(06 Jun ‘16, 11:36) kenhero


One Answer:

1

Thank you for your voluminous output, usually I have to ask for more, not in this case.

Things start going wrong around here:

"C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj.metaproj" (destinazione predefinita) (110) ->
"C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj" (destinazione predefinita) (111) ->
(destinazione: ClCompile) ->
  c:\development2\wireshark\epan\proto.h(863): warning C4228: nonstandard extension used : qualifiers after comma in declarator list are ignored [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj]
  c:\development2\wireshark\epan\proto.h(905): warning C4228: nonstandard extension used : qualifiers after comma in declarator list are ignored [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj]

"C:\development2\wsbuild64\Wireshark.sln" (destinazione predefinita) (1) -> "C:\development2\wsbuild64\ALL_BUILD.vcxproj.metaproj" (destinazione predefinita) (2) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj.metaproj" (destinazione predefinita) (110) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj" (destinazione predefinita) (111) -> (destinazione: ClCompile) -> c:\development2\wireshark\epan\proto.h(123): error C2054: expected '(' to follow 'WS_NORETURN' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(123): error C2085: 'proto_report_dissector_bug' : not in formal parameter list [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(505): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(506): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(507): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(508): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(509): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(510): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(511): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] c:\development2\wireshark\epan\proto.h(519): error C2057: expected constant expression [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj]

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's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

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)

Compilazione NON RIUSCITA.

"C:\development2\wsbuild64\Wireshark.sln" (destinazione predefinita) (1) -> "C:\development2\wsbuild64\ALL_BUILD.vcxproj.metaproj" (destinazione predefinita) (2) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj.metaproj" (destinazione predefinita) (110) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj" (destinazione predefinita) (111) -> (destinazione: ClCompile) -> C:\development2\wireshark\plugins\pvs\packet-pvs.c(80): warning C4113: 'void (__cdecl *)(tvbuff_t *,packet_info *,proto_tree *)' differs in parameter lists from 'dissector_t' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] C:\development2\wireshark\plugins\pvs\packet-pvs.c(80): warning C4133: 'function' : incompatible types - from 'void (__cdecl *)(tvbuff_t *,packet_info *,proto_tree *)' to 'dissector_t' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] C:\development2\wireshark\plugins\pvs\packet-pvs.c(81): warning C4013: 'dissector_add' undefined; assuming extern returning int [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] C:\development2\wireshark\plugins\pvs\packet-pvs.c(123): warning C4113: 'void (__cdecl *)(tvbuff_t *,packet_info *,proto_tree *)' differs in parameter lists from 'dissector_t' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] C:\development2\wireshark\plugins\pvs\packet-pvs.c(123): warning C4133: 'function' : incompatible types - from 'void (__cdecl *)(tvbuff_t *,packet_info *,proto_tree *)' to 'dissector_t' [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj] C:\development2\wireshark\plugins\pvs\packet-pvs.c(138): warning C4013: 'check_col' undefined; assuming extern returning int [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj]

"C:\development2\wsbuild64\Wireshark.sln" (destinazione predefinita) (1) -> "C:\development2\wsbuild64\ALL_BUILD.vcxproj.metaproj" (destinazione predefinita) (2) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj.metaproj" (destinazione predefinita) (110) -> "C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj" (destinazione predefinita) (111) -> (destinazione: ClCompile) -> C:\development2\wireshark\plugins\pvs\packet-pvs.c(80): error C2220: warning treated as error - no 'object' file generated [C:\development2\wsbuild64\plugins\pvs\pvs.vcxproj]

(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 dissector_add_uint() call to register with a udp port, and then remove the call to tcp_dissect_pdus() as you’re no longer using tcp. Instead, using the gryphon dissector as an example, you should just call return dissect_gryphon_pdu(tvb, pinfo, tree, data);

(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 proto_item.

(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 proto_tree_add_item show a void return or mention void as a return value.

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