Ethereal-dev: [Ethereal-dev] IDL file and matching GIOP log

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: Tue, 17 Jul 2001 10:31:26 -0500
Hi,

In order to introduce people to using idl2eth with
ethereal, I have attached the following.

1. echo.idl - an idl file with a few operations and typedefs etc.
2. je6.log - A logfile of some CORBA traffic, using this IDL file.
             You may want to rename this logfile 
             to eg:giop_echo.log 

Can we add these to the "logfiles" or "tutorial" department, so
people can see what ethereal can do for CORBA.

Plus new users can use it, to test that their environment is
ok, and get familar with idl2eth as well. ie: They can test
building a giop sudissector using this IDL file, and then
run it on the logfile I have attached.


/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).

Attachment: je6.log
Description: Binary data

//
// Basic IDL to excercise many IDL types.
//
//
// This will be used to test our GIOP API for
// the Ethereal Corba decoding engine.
//
//
// Copyright 2001 Frank Singleton
//
// Author: frank.singleton@xxxxxxxxxxxx
//
//


#ifndef __ECHO_IDL__
#define __ECHO_IDL__


module Penguin {


  interface Echo {

    // Some fixed types
    
    typedef fixed <5,3> fixed53_t;
    typedef fixed <6,3> fixed63_t;
    typedef fixed <31,3> fixed3103_t;
    typedef fixed <31,30> fixed3130_t;


	//  Enumeration, for echoEnum example.
    
	enum payrise {
	    small,
	    normal,
	    huge,
	    galactic
	};
	
	//
	// echo of simple types
	//
	
	// Short
	
	short echoShort(in short basic_short);
	unsigned short echoUShort(in unsigned short basic_UShort);
	
	// Long
	
	long  echoLong(in long basic_long);
	unsigned long  echoULong(in unsigned long basic_ULong);
	
	
	// IEEE float,double,longdouble
	
	float echoFloat(in float basic_Float);
	double echoDouble(in double basic_Double);

	//    long double echoLongDouble(in long double basic_Long_Double);

    
	boolean echoBoolean(in boolean basic_boolean);
    
	char echoChar(in char basic_Char);
    
	octet echoOctet(in octet basic_Octet);
    
	string echoString(in string mesg);

    // Fixed

	fixed53_t echoFixed53(in fixed53_t v53);

	fixed63_t echoFixed63(in fixed63_t v63);

	fixed3103_t echoFixed3103(in fixed3103_t v3103);

	fixed3130_t echoFixed3130(in fixed3130_t v3130);


	//
	// Just to be different, function returns a void, but populates
	// an out value.

	void echoEnum(in Penguin::Echo::payrise wanted, out Penguin::Echo::payrise actual  );

	//
	// Exceptions.
	//

	// Exception with no members  
    
	exception ex1{
	    // no members
	};
    
   
	// operation takes and returns no parameters, but can raise
	// an exception.

	void echo_ex1() raises(ex1);

	// Exception with some members  

	exception ex2{
	    short fcode;
	};
    
    
	void echo_ex2() raises(ex2);
     
	
	//
	// Some slightly harder examples, includes "wide" stuff
	//
	
	
	//
	// wide string and wide char
	//
	
	wstring echoWString(in wstring basic_wstring);
	
	wchar echoWChar(in wchar basic_wchar);
	
	
	
	//
	// Harder still
	//
	


	// Used for requesting "Any" types.
	
	enum req_type {
	    rt_random_type,    	// pick one at random, try me !
	    rt_char,
	    rt_wchar,
	    rt_octet,
	    rt_short,
	    rt_u_short,
	    rt_long,
	    rt_u_long,
	    // rt_long_long,
	    // rt_u_long_long,
	    rt_float,
	    rt_double,
	    // rt_long_double,
	    rt_boolean,
	    rt_enum,
	    rt_string,
	    rt_wstring,
        rt_any,
        rt_typecode,
        rt_max_req_type        // end marker
	    
	};
	
	
	//
	// Generic funtion returns an "Any" for a requested type.
	//
	
	any echoAny(in Penguin::Echo::req_type rt);
	
	
    };
    
};

#endif