Ethereal-dev: Re: [Ethereal-dev] Decode as

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Mon, 5 May 2003 11:56:46 -0700
On Mon, May 05, 2003 at 03:10:59PM +0200, andreas.sikkema@xxxxxxxxxxx wrote:
> I have a protocol in my plugin (the H.323 mother of all plugins) and I 
> can't get it in the list 
> for Decode As... So far I register it using the following code called from 
> plugin_init()
> 
>         h225Cont.h225_0.hf_proto_H225 = proto_register_protocol( "ITU-T 
> Recommendation H.225.0", "H.225.0", "h225" );
>         proto_register_field_array( h225Cont.h225_0.hf_proto_H225, hfh225, 
> array_length( hfh225 ) );
>         proto_register_subtree_array( etth225, array_length( etth225 ) );
>                 register_dissector( "h225", dissect_h225, 
> h225Cont.h225_0.hf_proto_H225 );
> 
> What do I have to do to get it in the list for decode as?

	xxx_handle = create_dissector_handle(my_dissector, 
	    h225Cont.h225_0.hf_proto_H225);
	dissector_add_handle("tcp.port", xxx_handle);

if, for example, it's to be used for TCP.