Add input parameter to tshark/sharkd
I want to add an input parameter to tshark command line and to sharkd as json.
For example:
tshark -new_param_name=new_param_value
In sharkd it will be a new parameter in json file
I want to be able to use these new_param_name/new_param_value in a dissector code ( for example epan/dissectors/packet-gsm_map.c)
What is the correct way to add this parameter in wireshark code? Is there an include file with all global parameters, or special struct defined for this purpose?
Answer: I found that this is the way to send the parameter from command line tshark -o "gsm_sms.new_parameter_name: TRUE"
And in code for example in dissector packet-gsm_map.c prefs_register_bool_preference(gsm_sms_module, "new_parameter_name", "new parameter name", "new parameter description", &global_variable_definition);
My new question is how do i add a parameter that is available by all dissectors ?
I want to pass tshark -o "new_parameter_name: TRUE"
without the dissector so it can be used by different dissector, it is relevant to different dissector