Ethereal-dev: [Ethereal-dev] "decode as" within a dissector

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

From: Frank Singleton <frank.singleton@xxxxxxxxxxxx>
Date: Wed, 10 Oct 2001 09:20:28 -0500
Hi,

Still hacking away with GIOP stuff here..
Going to improve the "operation name collision"
point in the TODO list.

Anyway, wanted to pass an idea along and see what
people think.

When I do heuristic dissection in a GIOP plugin,
I may get an operation name collision.

eg: IDL defines say

   void fred(in string s)

and then in another interface namespace we might get

   short fred(in string s, out long t)

So, I could handle this a number of ways.

1. Decode the first, rewind *offset, decode the 2nd etc.

2. Implement "Decode As" WITHIN a dissector, rather than
   between dissectors as we have now.

   decode as "Module_A_Interface_B_fred()" or
   decode as "Module_C_Interface_D_fred()"  etc.

   idl2eth already generates these functions, so I just
   need to user to be able to chose which one they wish
   to decode as via GUI selection.

3. In GIOP GUI panel, add buttons to disable the offending 
   operation decode function(s). GIOP plugins must register
   operation decode function that can collide.

With 1, and as long as I catch any exceptions, then
the "rewind and try next operation with same name" procedure
may work. 

Item 2 or 3 may be the better way to go .

Item 2 is probably the nicest towards the end user as well.

/Frank..
   

-- 
EUS/SV/Z Frank Singleton      ASO Americas BSS
Office : +1 972 583 3251      ECN 800 33251  
Mobile : +1 214 228 0874      Amateur Radio: VK3FCS/KM5WS   
Email : frank.singleton@xxxxxxxxxxxx

Hardware: HP Omnibook 4150 running Redhat Linux 7.1 (2.4.3-12 kernel).