Wireshark-bugs: [Wireshark-bugs] [Bug 2556] patch to support WSA, WSMP, WRSS packets
Date: Tue, 20 May 2008 11:33:22 -0700 (PDT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2556





--- Comment #9 from Jaap Keuter <jaap.keuter@xxxxxxxxx>  2008-05-20 11:32:44 PDT ---
Keeping packet-wsmp.c a separate file is very much oke. Compiling it into a
separate plugin seems not needed. The suggestion was to place it in
epan/dissectors/ and add it to Makefile.common there. Saves a lot of files,
extra work on the installers, etc etc.

This stuff:
--------------8<------------
#include <gmodule.h>
#include <glib.h>
#include "moduleinfo.h"

/*#ifndef ENABLE_STATIC 
  G_MODULE_EXPORT const gchar version[] = VERSION;
#endif*/
--------------8<------------
is old style and has no place in a new dissector.

You retrieve the length, like so: wsmlength = tvb_get_letohs( tvb, offset); and
then just add it as a uint. That is unclean style, use proto_tree_add_item()
with the proper headerfield.

You then use it for a string presentation, while FT_UINT_STRING will to the
same.

Have a look at doc/README.developer for further info on these things.


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.