Wireshark-users: Re: [Wireshark-users] saving "decode as" settings

From: "Douglas Pratley" <Douglas.pratley@xxxxxxxxxx>
Date: Wed, 14 Feb 2007 15:53:13 -0000
Hi Andy

> 
> 	Thanks. Took a look at the wishlist. Closest thing was 
> saving preference. I had a quick look through the Lua 
> bindings, but did see a way to set a dissector for a particular port.
> 

Sorry, but did you mean "didn't" here? I can't see an exact example
myself; I think there used to be one, but perhaps it has been moved.

Anyway, if you can get Lua working, the following snippet will set the
"user decode" for a udp port:

	my dissector = Dissectors.get("<my_dissector_name>")
	udp_table = DissectorTable.get("udp.port")
	udp_table:add(<port_number>, my_dissector)

Replace <my_dissector_name> with the name of the dissector you want to
use, and <port_number> with the number of the port.

This only works for dissectors that have been registered by name.
Normally a dissector is registered under the lower case name of its
associated protocol, e.g. the HTTP dissector is "http".

I still think this would be a useful feature, so I'm glad you've posted
to the dev list as well.

> 
> Thanks,
> 
> 	Andy
>

Cheers

Doug
 
> _______________________________________________
> Wireshark-users mailing list
> Wireshark-users@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-users
> 




This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.  The contents of this email may relate to dealings with other companies within the Detica Group plc group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.