Wireshark-dev: [Wireshark-dev] Wireshark Custom Dissector Problems. Windows and Linux
From: "Gregory OGrady" <gogrady@xxxxxxxxxxxx>
Date: Fri, 16 Jan 2009 13:52:04 -0500

Hi,

 

I’m trying to create my own custom dissector. However I’m new to all this stuff so I’ve been following 2 tutorials:

http://www.codeproject.com/KB/IP/custom_dissector.aspx for Windows

http://www.protomatics.com/wireshark_dissector.html for Linux

 

I’m working on a Windows XP machine with wireshark 1.0.5 source and MS Visual 9.0

I’m also on a virtual machine server running CentOS 5

 

While following the windows tutorial, after getting to the nmake –f Makefile.nmake all step, I get a strange error. I was hoping maybe someone could help me fix it because I have no idea.
 
Creating library libwireshark.lib and object libwireshark.exp
dissectors.lib(packet-ncp.obj) : error LNK2001: unresolved external symbol _ncp_echo_file
dissectors.lib(packet-ncp.obj) : error LNK2001: unresolved external symbol _ncp_echo_server
dissectors.lib(packet-ncp.obj) : error LNK2001: unresolved external symbol _ncp_echo_err
dissectors.lib(packet-ncp.obj) : error LNK2001: unresolved external symbol _ncp_echo_conn
dissectors.lib(packet-ncp.obj) : error LNK2001: unresolved external symbol _nds_echo_eid
dissectors.lib(packet-ncp.obj) : error LNK2001: unresolved external symbol _ncp_newstyle
dissectors.lib(packet-ncp.obj) : error LNK2001: unresolved external symbol _nds_defragment
dissectors.lib(packet-ncp.obj) : error LNK2019: unresolved external symbol _dissect_ncp_reply referenced in function _dissect_ncp_common
dissectors.lib(packet-ncp.obj) : error LNK2019: unresolved external symbol _nds_defrag referenced in function _dissect_ncp_common
dissectors.lib(packet-ncp.obj) : error LNK2019: unresolved external symbol _dissect_ping_req referenced in function _dissect_ncp_common
dissectors.lib(packet-ncp.obj) : error LNK2019: unresolved external symbol _dissect_nds_request referenced in function _dissect_ncp_common
dissectors.lib(packet-ncp.obj) : error LNK2019: unresolved external symbol _dissect_ncp_request referenced in function _dissect_ncp_common
libwireshark.dll : fatal error LNK1120: 12 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.
 
 

Also, after talking with someone from the linux tutorial, and getting a modified ‘makefile’, I was able to create the packet-foo.so file. However, there was no common directory for .so files. After downloading version 1.0.3, I found that there was a common .so folder at /usr/lib/wireshark/plugins/1.0.3 and I was able to load my plugin in v1.0.3. But v1.0.5 doesn’t have this folder but has the .so files under /root/wireshark-1.0.5/plugins/gryphon/.libs instead for each individual plugin. So it confuses me how plugins are now loaded in v1.0.5 and I was wondering how I should go about creating dissectors or where to go from here.

 

Thanks for any help,

 

Gregory O'Grady
Software Developer

 

PlantCML

260 Saint-Raymond Boulevard
Gatineau, QC J8Z 3G4
Direct 819.776.2425 x 520
Fax    819.772.8905
www.plantcml.com