Wireshark-dev: Re: [Wireshark-dev] runtime error using plugin with prefs_register_enum_preferen

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Wed, 22 Oct 2008 12:09:10 -0400
david.castleford@xxxxxxxxxxxxxxxxxx wrote:
Hi,
The code is here:
#define PROTO_TAG_ISMACRYP_11 "ISMACRYP 1.1"
#define PROTO_TAG_ISMACRYP_20 "ISMACRYP 2.0"
..... /* The ISMACryp protocol version set in preferences menu */
static gint version_type = 11; /* ISMACryp 1.1 */
....... static enum_val_t version_types[] = {
  {PROTO_TAG_ISMACRYP_11, PROTO_TAG_ISMACRYP_11, 11},
  {PROTO_TAG_ISMACRYP_20, PROTO_TAG_ISMACRYP_20, 20},
  {NULL, NULL, 0}        <- some dissectors have -1 here instead of 0
but makes no difference

 };
........ prefs_register_enum_preference(ismacryp_module, "ismacryp_encoding",
            "ISMACryp version",
            "ISMACryp version",
            &version_type, version_types, FALSE);


To get the simple question out of the way first :)

Did you do a prefs_register_protocol ?

(At first glance I don't see anything obviously wrong with the above code).

Bill