diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-07-08 01:00:46 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-07-08 01:00:46 +0000 |
commit | 659cf0527ae9e16da3670e224f22b942b0c0a4a3 (patch) | |
tree | a6ac5357f9edc209679c8192f54da09f4fd5ad72 /epan/oids.c | |
parent | 1b1fbd24e72bb8cce69867f33f41ade6f3354384 (diff) |
UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).
The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not. It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.
Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist". Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.
Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.
svn path=/trunk/; revision=43603
Diffstat (limited to 'epan/oids.c')
-rw-r--r-- | epan/oids.c | 96 |
1 files changed, 55 insertions, 41 deletions
diff --git a/epan/oids.c b/epan/oids.c index 058174b3a7..13b284398e 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -740,47 +740,61 @@ void oid_pref_init(module_t *nameres) "Some errors can be ignored. If unsure, set to false.", &suppress_smi_errors); - smi_paths_uat = uat_new("SMI Paths", - sizeof(smi_module_t), - "smi_paths", - FALSE, - (void*)&smi_paths, - &num_smi_paths, - UAT_CAT_GENERAL, - "ChSNMPSMIPaths", - smi_mod_copy_cb, - NULL, - smi_mod_free_cb, - restart_needed_warning, - smi_paths_fields); - - prefs_register_uat_preference(nameres, - "smi_paths", - "SMI (MIB and PIB) paths", - "Search paths for SMI (MIB and PIB) modules. You must\n" - "restart Wireshark for these changes to take effect.", - smi_paths_uat); - - smi_modules_uat = uat_new("SMI Modules", - sizeof(smi_module_t), - "smi_modules", - FALSE, - (void*)&smi_modules, - &num_smi_modules, - UAT_CAT_GENERAL, - "ChSNMPSMIModules", - smi_mod_copy_cb, - NULL, - smi_mod_free_cb, - restart_needed_warning, - smi_fields); - - prefs_register_uat_preference(nameres, - "smi_modules", - "SMI (MIB and PIB) modules", - "List of enabled SMI (MIB and PIB) modules. You must\n" - "restart Wireshark for these changes to take effect.", - smi_modules_uat); + smi_paths_uat = uat_new("SMI Paths", + sizeof(smi_module_t), + "smi_paths", + FALSE, + (void*)&smi_paths, + &num_smi_paths, + /* affects dissection of packets (as the MIBs and PIBs affect the + interpretation of e.g. SNMP variable bindings), but not set of + named fields + + XXX - if named fields are generated from the MIBs and PIBs + for particular variable bindings, this *does* affect the set + of named fields! */ + UAT_AFFECTS_DISSECTION, + "ChSNMPSMIPaths", + smi_mod_copy_cb, + NULL, + smi_mod_free_cb, + restart_needed_warning, + smi_paths_fields); + + prefs_register_uat_preference(nameres, + "smi_paths", + "SMI (MIB and PIB) paths", + "Search paths for SMI (MIB and PIB) modules. You must\n" + "restart Wireshark for these changes to take effect.", + smi_paths_uat); + + smi_modules_uat = uat_new("SMI Modules", + sizeof(smi_module_t), + "smi_modules", + FALSE, + (void*)&smi_modules, + &num_smi_modules, + /* affects dissection of packets (as the MIBs and PIBs affect the + interpretation of e.g. SNMP variable bindings), but not set of + named fields + + XXX - if named fields are generated from the MIBs and PIBs + for particular variable bindings, would this affect the set + of named fields? */ + UAT_AFFECTS_DISSECTION, + "ChSNMPSMIModules", + smi_mod_copy_cb, + NULL, + smi_mod_free_cb, + restart_needed_warning, + smi_fields); + + prefs_register_uat_preference(nameres, + "smi_modules", + "SMI (MIB and PIB) modules", + "List of enabled SMI (MIB and PIB) modules. You must\n" + "restart Wireshark for these changes to take effect.", + smi_modules_uat); #else prefs_register_static_text_preference(nameres, "load_smi_modules_static", |