Hi
There seems to be fault or lack in code in ethereal_gen.py
IDL types defined like:
typedef enum yyyy_e
{
aa,
bb
} xxx_t;
are genereted to c code types with suffix _e, however code refers to _t.
-------------------------------------------------------------------------------------------------------------------------------------------------------
Example idls
testtypes.idl :
typedef enum Enum_type_e
{
FIRST_C,
SECOND_C
} Enum_type_t;
---------------
testi.idl :
//#ifndef PAGINGREQ_M_IDL
//#define PAGINGREQ_M_IDL
#pragma prefix "first.testing.com"
#include "testtypes.idl"
module TestModule
{
struct Upper_struct
{
Enum_type_t Enum_field;
};
};
//#endif
-------------------------------------------------------------------------------------------------------------------------------------------------------
generated type becomes "Enum_type_e":
=====================================
static const value_string Enum_type_e[] = {
{ 0, "FIRST_C" },
{ 1, "SECOND_C" },
{ 0, NULL },
};
call is to "Enum_type_t":
=========================
u_octet4 = get_CDR_enum(tvb,offset,stream_is_big_endian, boundary);
if (tree) {
proto_tree_add_text(tree,tvb,*offset-4,4,"Enum value = %u (%s)",u_octet4,val_to_str(\
u_octet4,Enum_type_t,"Unknown Enum Value"));
}
Mika