On Dec 24, 2018, at 10:15 PM, Andrii Vladyka <a.vladyka@xxxxxxx> wrote:
> I have a protocol that works over ATM. I need to develop a sub-dissector that will be called by ATM dissector only when VPI/VCI pair matches specific values range, otherwise leave ATM payload undissected.
>
> Is there a way to register ATM sub-dissectors the same way we do it for UDP/TCP? I.e. when register sub-dissectors for TCP/UDP we call dissector_add_uint() specifying port number. Is there way to achieve the same for ATM using VPI/VCI values instead of port number?
Unfortunately, there currently isn't one.
A dissector table that takes a uint value that's ((VPI << 16) | VCI) could be added to the packet-atm.c dissector, with the dissector using that at the appropriate place.
So do you want the subdissector to be handed raw ATM cells, AAL5 packet payload, or something else?