Ask Your Question

Revision history [back]

preference range

In my decoder, I have registered a uint preference using: prefs_register_uint_preference(...)
On the GUI it works fine, but it allows "-1" to be input, which Wireshark converts to 4294967295.
I could apply a limit in my decoder, but that would be hidden from the user.

How can I either:
1. Force the GUI to only take unsigned numbers (which it should do, being an uint type)
or
2. Register the preference with a range (i.e. 0 to 100 inclusive) for the GUI to implement.

Thanks for any help.

preference range

In my decoder, I have registered a uint preference using: prefs_register_uint_preference(...)

On the GUI it works fine, but it allows "-1" to be input, which Wireshark converts to 4294967295.

I could apply a limit in my decoder, but that would be hidden from the user.

How can I either:

1.
  1. Force the GUI to only take unsigned numbers (which it should do, being an uint type)
    type) or
  2. or
    2.
  3. Register the preference with a range (i.e. 0 to 100 inclusive) for the GUI to implement.

Thanks for any help.