Wireshark-dev: Re: [Wireshark-dev] Installing a new dissector

From: "Maynard, Chris" <Christopher.Maynard@xxxxxxxxx>
Date: Mon, 20 Oct 2008 10:07:58 -0400
While there have been many changes since Ethereal, the use of etype_vals and ethertype are not among them.  They are both declared in epan/dissectors/packet-ethertype.c and several other dissectors reference them with no problems, so there is another reason why Wang Jing encountered problems.  I made some quick changes to your dissectors to eliminate the warnings and it compiles and links just fine.

By the way, I suggest (re-)reading README.developer and the related README files in the doc/ directory if you want to know more about Wireshark specifics.

> -----Original Message-----
> From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-
> bounces@xxxxxxxxxxxxx] On Behalf Of Breno Jacinto
> Sent: Monday, October 20, 2008 8:19 AM
> To: Developer support list for Wireshark
> Subject: Re: [Wireshark-dev] Installing a new dissector
> 
> Hello,
> 
> 2008/10/19 WangJing <wj.vivian@xxxxxxxxx>:
> >
> > I fix this kind of error, and compile. But I still got the following
> error.
> > I think the code is used for Ethereal,
> > and the code is not compliant to Wireshark version..
> 
>    Yes, exactly, that is what I was suspecting from the beginning. The
> code was written for ethereal, so, there were changes in wireshark
> that made it incompatible somehow? Is there any documentation on what
> has changed and how to make Ethereal dissectors run on Wireshark?
> 
> 
> 
> >
> >         link -dll /out:adh.dll /NOLOGO /INCREMENTAL:no /MACHINE:I386
> /DEBUG
> > pack
> > et-adh.obj packet-adhctl.obj packet-adholsr.obj  plugin.obj
> > ..\..\epan\libwiresh
> > ark.lib  C:\wireshark-win32-libs\glib\lib\glib-2.0.lib
> > C:\wireshark-win32-libs\
> > glib\lib\gmodule-2.0.lib  C:\wireshark-win32-libs\glib\lib\gobject-
> 2.0.lib
> > adh.r
> > es
> >    Creating library adh.lib and object adh.exp
> > packet-adh.obj : error LNK2001: unresolved external symbol _etype_vals
> > packet-adh.obj : error LNK2019: unresolved external symbol _ethertype
> > referenced
> >  in function _dissect_adh
> > adh.dll : fatal error LNK1120: 2 unresolved externals
> > NMAKE : fatal error U1077: 'link' : return code '0x460'
> > Stop.
> >
> 
> 
> 
> Best regards,
> 
> --
> --
> :: Breno Jacinto ::
> :: breno - at - gprt.ufpe.br ::
> :: FingerPrint ::
>    2F15 8A61 F566 E442 8581
>    E3C0 EFF4 E202 74B7 7484
> :: Persistir no difícil é a única maneira de torná-lo fácil algum dia.  ::
> _______________________________________________
CONFIDENTIALITY NOTICE: The contents of this email are confidential
and for the exclusive use of the intended recipient. If you receive this
email in error, please delete it from your system immediately and 
notify us either by email, telephone or fax. You should not copy,
forward, or otherwise disclose the content of the email.