Hello and good day.
My name is David and this is my first post in the list.
I am currently studying how to develop a dissector and currently building on top of an existing one.
The base I am using is an openflow dissector found here:
http://www.openflow.org/wp/downloads/#dissectorCreated by Mr. David Underhill.
Before proceeding, I would like to say that where possible, I try to strictly follow the developers guide:
www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.htmlI think the only difference in my case is that I am using MS Visual Studio 2010 instead of the Express edition.
My environment is now this:
[OS] WindowsXP Professional SP3 32bit
[Compiler] Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
[Wireshark Base] ver: 1.10.1
url:
http://www.wireshark.org/download/src/wireshark-1.10.1.tar.bz2Setup and compilation is ok with the wireshark sources as is.
But when I include the openflow dissector, I get this error (among others):
C:\wireshark-1.10.1\epan/etypes.h(541) : error C2133: 'etype_vals' : unknown size
I tried to work around this error by modifying epan/etypes.h like this:
+ #ifdef _WIN32
+ WS_DLL_PUBLIC const value_string *etype_vals;
+ #else
WS_DLL_PUBLIC const value_string etype_vals[];
+ #endif
After modifying this and working around other compile errors (not part of the topic), I have successfully built the plugin and wireshark.
I am a beginner in developing for windows as my experience is mostly in linux environments (GNU).
So I would like to ask for the opinions on the developers in this list if what I did was safe.
Is there a more 'correct' modification?
Is there a way around this error without modifying any wireshark codes?
Thank you very much,
David