Hello,
I am currently developing an dissector for an USB over network protocol.
Mostly it is different from raw USB packets, but some parts are the same,
so I want to dissect them with the already existing USB dissectors (e.g. "usbms").
I want to call them by
dissector_try_uint(...)
but I cannot register the
register_dissector_table("usb.bulk","USB bulk endpoint", FT_UINT8, BASE_DEC)
again because it is already done by the USB dissector itself.
So do you have any solution? Is there maybe a way to get the already registered dissector table from the USB plugin?
Thanks for your help.
Forgot something (maybe it is important):
My dissector is not named "usb", it is named "usbsrv". I just have to register "usb.bulk" because the needed dissectors are registered to this field.
asked 14 Oct '14, 02:09
lal12
36●7●7●12
accept rate: 33%
Ok now there is another Problem:
While Pascal Quantins solution seems to work, the subdissector does not start no matter whether I use the
dissector_try_uint(...)
or thecall_dissector(...)
function. There is just a new "Data" item after the tree of my dissector.Maybe I missed something, is there a good example of calling a subdissector?
Or could the problem be reasoned by the USBMS dissector?
As seen in the dissect_usb_ms_bulk() function, the dissector expects that the data parameter will contain a usb_conv_info_t structure (like what is done in epan/dissectors/packet-usb.c). If this is not the case, the packet will be rejected. You should look at what is done in packet-usb.c for creating the conversation info (get_usb_conv_info() function and its callers).