Wireshark-bugs: [Wireshark-bugs] [Bug 8174] Protocol dissectors are registered even if they are
Comment # 4
on bug 8174
from Evan Huus
(In reply to comment #3)
> Evan from your mail [1]:
>
> > The fundamental problem is that registration happens once right when
> the program starts, while protocols can be enabled/disabled
> arbitrarily while an instance is running. Triggering a reregistration
> on a protocol enable/disable would be painful.
I think I was wrong, this isn't really the root problem. A dissector should
still be registered if it is disabled, it just shouldn't interfere with other
dissectors.
> > A possible solution would be to store a linked list of dtbl_entries
> for each registration instead of the single entry we currently store.
> Then dissector_try_uint() can iterate through and try all of the
> dtbl_entries whose associated protocols are marked as enabled
I think this is basically the way to go. The simplest solution is for
registration to build a list for each port/string/whatever rather than
overwriting the old value, and then the dissector_try_* functions can iterate
through the list until it finds an enabled protocol that is (old-style OR
(new-style AND claims the packet)).
This has the benefit that multiple new-style dissectors can register on the
same port and it will Just Work (TM).
You are receiving this mail because:
- You are watching all bug changes.