From 659cf0527ae9e16da3670e224f22b942b0c0a4a3 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 8 Jul 2012 01:00:46 +0000 Subject: 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 --- asn1/snmp/packet-snmp-template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'asn1/snmp') diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index 498e483374..7af883917a 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -2236,7 +2236,7 @@ void proto_register_snmp(void) { TRUE, (void*)&ueas, &num_ueas, - UAT_CAT_CRYPTO, + UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */ "ChSNMPUsersSection", snmp_users_copy_cb, snmp_users_update_cb, @@ -2257,7 +2257,7 @@ void proto_register_snmp(void) { TRUE, (void*) &specific_traps, &num_specific_traps, - UAT_CAT_GENERAL, + UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */ "ChSNMPEnterpriseSpecificTrapTypes", snmp_specific_trap_copy_cb, NULL, -- cgit v1.2.3