It appears that for an attempt to set a non-existent preference, Wireshark and TShark don't report it as a non-existent preference, they report it as a "Syntax error in preference" in the preferences file and as an "Invalid -o flag" on the command line.
prefs_register_uint_preference()
takes, as its first argument, a pointer to a module_t
, so you must have referenced a preferences module. The prefs_register_module()
call takes a name
argument, so the module has a name; the full name for your preference includes the module name, so, if your preference module's name is "my_protocol", your preference's name would be "my_protocol.ls_payload_display_len", and you would have to use that full name in the preferences file and on the command line, e.g.
my_protocol.ls_payload_display_len: 20
and
tshark -o my_protocol.ls_payload_display_len:80