Ethereal-dev: Re: [Ethereal-dev] register_dissector_table from within a plugin

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Anand V. Narwani" <anarwani@xxxxxxxxx>
Date: Mon, 05 Aug 2002 14:18:36 -0400
Bryant,
When the DOCSIS dissector was added to the current tree, register_dissector_table and a number of other routines were added to the plugin api. You can either wait until 0.9.6 is released on Ethereal.com or you can get the source tree via CVS.
I'm sure if I've missed something, someone will correct me.

I hope this helps,
Anand
At 11:33 AM 8/5/2002 -0600, Bryant Eastham wrote:
I apologize if this is too trivial, but I couldn't see any answers in the
docs or a quick review of the archives. I am using ethereal 0.9.5 on win32
with visual c++ 6.

I have created two dissectors for some TCP/IP-based protocols that we use.
The first protocol includes the ability to carry other protocols, based on a
Protocol Identifier. I am trying to convert these dissectors to plugins, and
have found that not all the routines I use are supported.

My code includes the following in my proto_reg_handoff routine for the main
protocol:

        dissector_add("tcp.port", global_eps_tcp_port, eps_handle);
        sub_dissector = register_dissector_table(
"eps.presentation.protocol", "EMIT Protocol Stack", FT_UINT8, 0 );

And the following in the proto_reg_handoff routine for the sub-protocol:

        dissector_add("eps.presentation.protocol", global_oap_eps_protocol,
oap_handle);

This worked perfectly when compiled directly into ethereal, but the
"register_dissector_table" is not included in the plugin-api.

Is there a reason for its absence? Is there a better way of hooking the
protocols together? I desire each of my protocols to be a plugin.

Thanks for any ideas, including "You're stupid - do it this way...".

Bryant Eastham
Chief Architect
emWare, Inc.
6322 South 3000 East, Suite 250, Salt Lake City, Utah  84121
Phone :  801.993.7124   Email: beastham@xxxxxxxxxx
Fax: 801.993.7460               Web:  http://www.emware.com


_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev

--
Anand V. Narwani,  CCIE 3892
Advanced Engineering Services
Cisco Systems, Inc.
Direct/Fax: 919.392.3404
Email: anarwani@xxxxxxxxx

"Meddle not in the affairs of dragons, for you are crunchy and taste good with ketchup"