Ethereal-dev: Re: [Ethereal-dev] Need help with protocol that spans multiple TVBs
On Tue, Apr 13, 2004 at 07:23:50AM +0000, Sid Sid wrote:
> I mean should we have some registration function inside ACSE dissector which
> will be called by FTAM/CMIP/MMS and so on dissectors ?
No.
The ACSE dissector would do something such as
application_context_dissector_table = register_dissector_table(
"acse.application_context", "Application context OID",
FT_STRING, BASE_NONE);
and the FTAM, CMIP, MMS, etc. dissectors would do something such as
ftam_handle = create_dissector_handle(dissect_ftam, proto_ftam);
dissector_add_string("acse.application_context", "1.0.8571.1.1",
ftam_handle);
(and would no longer register their dissectors by name), and, when
handling the application context OID, the ACSE dissector would do
something such as
app_handle = dissector_get_string_handle(
application_context_dissector_table, oid_string);
if (app_handle != NULL)
app_name = dissector_handle_get_short_name(app_handle);
else
app_name = NULL;
and "call_app_dissector()" would directly use "app_name" (and report
that it's unknown if null) rather than using "type_of_application".