Ethereal-dev: [Ethereal-dev] IDL Ideas

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: Fri, 03 Nov 2000 09:04:28 -0600
Hi,


Well I thought I would toss some ideas into the arena
and see what happens :-) 

I have been thinking about Corba/IDL/CDR for ethereal
and had some thoughts I wanted to share. They are in
no particular order (this may change :-)


Wishlist/Ideas
--------------

1. File/Load/IDL via menu (wow, load IDL at runtime).
    Cool :-)

2. libIDL usage from GNOME.
   Handles IDL to C mapping, as a shared lib to link against.
   Yeah, another lib to link against. 
  
3. Mapping CDR to  ethereal constructs.
     This may not be too bad. CDR is well defined, (see
     CDR Transfer Syntax, chp15.3 of CORBAv2.3.1)
    "..CDR .. is the format in which the GIOP represents OMG IDL
     data types in an octet stream"

     There are "primitive" types like "short" , "char" "float",
    etc, which should be ok to map. Then there are things like 
    OMG IDL constructed types etc..

     Create some c code to map IDL via CDR into
     things that ethereal understands. eg: idl2C program
     
4.  Add code like tvb_get_idl_float(tvbuff..) etc . Is this going to 
    swamp our namespace of existing functions :()



I have taken a look at packet-giop.c and for some  things
a memcpy onto a struct seems a useful technique.

As a start, I was thinking about just using
some idl2C tool to generate C header/structs/enums
etc and then look at the above memcpy trick to
suck out the individual components.

There will be some endian stuff to copy with, of course.

There also appears to be alignment issues.See Chap 15.3.1.1
of Corba v2.3.1 CDR Transfer SYntax.

"..any primitive of size N octets must start at an octet
steam index that is a multiple of  N. In CDR, N is one 
of 1,2,4,8...."

Any thoughts / comments.


Cheers / Frank..

-- 
EUS/SV/Z Frank Singleton      ASO Americas BSS
Office : +1 972 583 3251      ECN 800 33251  
Pager  : +1 800 651 1184      Email : eusfrsi@xxxxxxxxxxxxxxx 
Amateur Radio: VK3FCS/KM5WS   Email : frank.singleton@xxxxxxxxxxxx

Hardware: HP Omnibook 4150 running Redhat Linux 6.2 (2.2.16 kernel).