Wireshark-dev: Re: [Wireshark-dev] mikey configuration option
From: Jeff Morriss <[email protected]>
Date: Tue, 02 Oct 2007 09:43:01 -0400
Oops, in fact I got it exactly wrong: you must _not_ have the dissector 
name and the "." in the preference name.  Sorry 'bout that.
Filippo Margiotta wrote:
Hi Jeff,
the error is the one you can see in attachment.

the code I use is the following.....

proto_mikey = proto_register_protocol("Multimedia Internet KEYing","MIKEY", "mikey");
    proto_register_field_array(proto_mikey, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

mikey_module = prefs_register_protocol(proto_mikey, proto_reg_handoff_mikey); prefs_register_uint_preference(mikey_module, "mikey.ltkmudpport", "LTKM UDP Port ", "LTKM UDP Port ", 10, &mikey_ltkmudpport); prefs_register_string_preference(mikey_module, " mikey.stkmaddress", "STKM Multicast Address", "STKM Multicast Address", &mikey_stkmmulticastaddress); prefs_register_uint_preference(mikey_module, "mikey.stkmport", "STKM Multicast Port", "STKM Multicast Port", 10, &mikey_stkmmulticastport); prefs_register_bool_preference(mikey_module, "mikey.dvbstkm", "Force Dvb","Force Dvb",&mikey_ForceDvb);
    new_register_dissector("mikey", dissect_mikey, proto_mikey);

Let me know please.

2007/10/2, Jeff Morriss <[email protected] <mailto:jef[email protected]>>:

    Filippo Margiotta wrote:
     > Hi All,
     > I would like to add a some configuration parameter like UDPPort,
     > Key2.... for the MIKEY dissector.
     > If I add instruction like.....
     > module_t *mikey_module;
     > mikey_module = prefs_register_protocol(proto_mikey,
     > proto_reg_handoff_mikey);
     > prefs_register_uint_preference(mikey_module, "UDPPort",
    "UDPPort", "UDP
     > Port (default 4369)", 10, &mikey_udpport);
     > during the compiling there are some assertion failing.
     > Could somebody help me on this please ?

    Well, what does the assertion say?

    One guess: the name of the preference should start with your protocol
    name.  It should be something like "mikey.UDPPort" instead of just
    Wireshark-dev mailing list
    [email protected] <mailto:[email protected]>



Wireshark-dev mailing list
[email protected]