Hi,
Frankly I feel a bit stupid asking this but I've been trying to figure it out for about 6 hours and I think I need help. I have a dissector which I register like this:
static int tmsvc_port = 0;
void
proto_register_tmsvc(void)
{
module_t *tmsvc_module;
proto_tmsvc = proto_register_protocol("TM Syncro Service",
"TmSyncro",
"tmsvc");
tmsvc_module = prefs_register_protocol(proto_tmsvc, NULL);
prefs_register_uint_preference(tmsvc_module, "port",
"TmSyncro service port",
"When set to a value greater than 0 the TmSyncro service is started and accessible via the port number"
10,
&tmsvc_port);
}
Immediately after the prefs_register_uint_preference call I check the tmsvc_port value and its still 0 (and I've tried other initialisation values and they remain unchanged). I was expecting tmsvc_port to be set to the value I last set
by editing the preferences through the Wireshark menu system.
If I check with Menu -> Edit -> Preferences -> Protocols -> TmSyncro sure enough the value I last set is there.
When does my variable get updated? Or alternatively, how can I retrieve the saved preference value?
Thanks and regards...Paul
Paul Offord FBCS CITP
Chief Technical Officer
Advance7
Phone: 01279 211 668
Mobile: 07764 931 431
Email: paul.offord@xxxxxxxxxxxx
LinkedIn: https://uk.linkedin.com/in/paulofford