Re-generate the CosNaming, CosEventComm, and Parlay dissectors from the

IDL (and re-insert an earlier bug fix into the CosNaming and
CosEventComm dissectors), and add a new check added to ethereal_gen.py
to the Tango dissector.

svn path=/trunk/; revision=14745
This commit is contained in:
Guy Harris 2005-06-24 12:43:32 +00:00
parent 3a4cc92b45
commit 447e5cb434
4 changed files with 5420 additions and 5410 deletions

View File

@ -11,19 +11,19 @@
* By Gerald Combs
* Copyright 1999 Gerald Combs
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -52,19 +52,19 @@ G_MODULE_EXPORT const gchar version[] = "0.0.1";
/* Struct prototype declaration Start */
/* Struct prototype declaration End */
/* Union prototype declaration Start */
/* Union prototype declaration End */
/* Initialise the protocol and subtree pointers */
@ -90,8 +90,8 @@ static guint32 boundary = GIOP_HEADER_SIZE; /* initial value */
/*
* IDL Operations Start
*/
static const char CosEventComm_PushConsumer_push_op[] = "push" ;
static const char CosEventComm_PushConsumer_disconnect_push_consumer_op[] = "disconnect_push_consumer" ;
static const char CosEventComm_PushSupplier_disconnect_push_supplier_op[] = "disconnect_push_supplier" ;
@ -103,40 +103,40 @@ static const char CosEventComm_PullConsumer_disconnect_pull_consumer_op[] = "dis
/*
* IDL Operations End
*/
/* Begin Exception (containing members) String Declare */
/* End Exception (containing members) String Declare */
/*
* IDL Attributes Start
*/
/*
* IDL Attributes End
*/
/*
* IDL Enums Start
*/
/*
* IDL Enums End
*/
/* Begin Exception Helper Functions */
/* End Exception Helper Functions */
@ -145,11 +145,13 @@ static const char CosEventComm_PullConsumer_disconnect_pull_consumer_op[] = "dis
* Main delegator for exception handling
*
*/
static gboolean decode_user_exception(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header, gchar *operation _U_ ) {
gboolean be _U_; /* big endianess */
static gboolean decode_user_exception(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header _U_, gchar *operation _U_ ) {
/*gboolean be _U_;*/ /* big endianess */
if (!header->exception_id)
return FALSE;
@ -157,12 +159,12 @@ static gboolean decode_user_exception(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
return FALSE; /* user exception not found */
}
/* Begin Attribute Helper Functions */
/* End Attribute Helper Functions */
@ -170,19 +172,19 @@ static gboolean decode_user_exception(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
/*
* IDL:omg.org/CosEventComm/PushConsumer/push:1.0
*/
static void decode_CosEventComm_PushConsumer_push(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header, gchar *operation _U_) {
gboolean stream_is_big_endian; /* big endianess */
/* Operation specific Variable declarations Begin */
/* Operation specific Variable declarations End */
stream_is_big_endian = is_big_endian(header);
switch(header->message_type) {
@ -200,7 +202,7 @@ static void decode_CosEventComm_PushConsumer_push(tvbuff_t *tvb _U_, packet_info
case NO_EXCEPTION:
/* Function returns void */
@ -216,26 +218,26 @@ static void decode_CosEventComm_PushConsumer_push(tvbuff_t *tvb _U_, packet_info
g_warning("Unknown Exception ");
break;
} /* switch(header->message_type) */
break;
break;
default:
/* Unknown GIOP Message */
g_warning("Unknown GIOP Message");
break;
} /* switch(header->message_type) */
} /* switch(header->message_type) */
}
@ -243,19 +245,19 @@ static void decode_CosEventComm_PushConsumer_push(tvbuff_t *tvb _U_, packet_info
/*
* IDL:omg.org/CosEventComm/PushConsumer/disconnect_push_consumer:1.0
*/
static void decode_CosEventComm_PushConsumer_disconnect_push_consumer(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header, gchar *operation _U_) {
gboolean stream_is_big_endian; /* big endianess */
/* Operation specific Variable declarations Begin */
/* Operation specific Variable declarations End */
stream_is_big_endian = is_big_endian(header);
switch(header->message_type) {
@ -270,7 +272,7 @@ static void decode_CosEventComm_PushConsumer_disconnect_push_consumer(tvbuff_t *
case NO_EXCEPTION:
/* Function returns void */
@ -286,26 +288,26 @@ static void decode_CosEventComm_PushConsumer_disconnect_push_consumer(tvbuff_t *
g_warning("Unknown Exception ");
break;
} /* switch(header->message_type) */
break;
break;
default:
/* Unknown GIOP Message */
g_warning("Unknown GIOP Message");
break;
} /* switch(header->message_type) */
} /* switch(header->message_type) */
}
@ -313,19 +315,19 @@ static void decode_CosEventComm_PushConsumer_disconnect_push_consumer(tvbuff_t *
/*
* IDL:omg.org/CosEventComm/PushSupplier/disconnect_push_supplier:1.0
*/
static void decode_CosEventComm_PushSupplier_disconnect_push_supplier(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header, gchar *operation _U_) {
gboolean stream_is_big_endian; /* big endianess */
/* Operation specific Variable declarations Begin */
/* Operation specific Variable declarations End */
stream_is_big_endian = is_big_endian(header);
switch(header->message_type) {
@ -340,7 +342,7 @@ static void decode_CosEventComm_PushSupplier_disconnect_push_supplier(tvbuff_t *
case NO_EXCEPTION:
/* Function returns void */
@ -356,26 +358,26 @@ static void decode_CosEventComm_PushSupplier_disconnect_push_supplier(tvbuff_t *
g_warning("Unknown Exception ");
break;
} /* switch(header->message_type) */
break;
break;
default:
/* Unknown GIOP Message */
g_warning("Unknown GIOP Message");
break;
} /* switch(header->message_type) */
} /* switch(header->message_type) */
}
@ -383,19 +385,19 @@ static void decode_CosEventComm_PushSupplier_disconnect_push_supplier(tvbuff_t *
/*
* IDL:omg.org/CosEventComm/PullSupplier/pull:1.0
*/
static void decode_CosEventComm_PullSupplier_pull(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header, gchar *operation _U_) {
gboolean stream_is_big_endian; /* big endianess */
/* Operation specific Variable declarations Begin */
/* Operation specific Variable declarations End */
stream_is_big_endian = is_big_endian(header);
switch(header->message_type) {
@ -425,26 +427,26 @@ static void decode_CosEventComm_PullSupplier_pull(tvbuff_t *tvb _U_, packet_info
g_warning("Unknown Exception ");
break;
} /* switch(header->message_type) */
break;
break;
default:
/* Unknown GIOP Message */
g_warning("Unknown GIOP Message");
break;
} /* switch(header->message_type) */
} /* switch(header->message_type) */
}
@ -452,20 +454,20 @@ static void decode_CosEventComm_PullSupplier_pull(tvbuff_t *tvb _U_, packet_info
/*
* IDL:omg.org/CosEventComm/PullSupplier/try_pull:1.0
*/
static void decode_CosEventComm_PullSupplier_try_pull(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header, gchar *operation _U_) {
gboolean stream_is_big_endian; /* big endianess */
/* Operation specific Variable declarations Begin */
guint8 u_octet1;
/* Operation specific Variable declarations End */
stream_is_big_endian = is_big_endian(header);
switch(header->message_type) {
@ -500,26 +502,26 @@ static void decode_CosEventComm_PullSupplier_try_pull(tvbuff_t *tvb _U_, packet_
g_warning("Unknown Exception ");
break;
} /* switch(header->message_type) */
break;
break;
default:
/* Unknown GIOP Message */
g_warning("Unknown GIOP Message");
break;
} /* switch(header->message_type) */
} /* switch(header->message_type) */
}
@ -527,19 +529,19 @@ static void decode_CosEventComm_PullSupplier_try_pull(tvbuff_t *tvb _U_, packet_
/*
* IDL:omg.org/CosEventComm/PullSupplier/disconnect_pull_supplier:1.0
*/
static void decode_CosEventComm_PullSupplier_disconnect_pull_supplier(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header, gchar *operation _U_) {
gboolean stream_is_big_endian; /* big endianess */
/* Operation specific Variable declarations Begin */
/* Operation specific Variable declarations End */
stream_is_big_endian = is_big_endian(header);
switch(header->message_type) {
@ -554,7 +556,7 @@ static void decode_CosEventComm_PullSupplier_disconnect_pull_supplier(tvbuff_t *
case NO_EXCEPTION:
/* Function returns void */
@ -570,26 +572,26 @@ static void decode_CosEventComm_PullSupplier_disconnect_pull_supplier(tvbuff_t *
g_warning("Unknown Exception ");
break;
} /* switch(header->message_type) */
break;
break;
default:
/* Unknown GIOP Message */
g_warning("Unknown GIOP Message");
break;
} /* switch(header->message_type) */
} /* switch(header->message_type) */
}
@ -597,19 +599,19 @@ static void decode_CosEventComm_PullSupplier_disconnect_pull_supplier(tvbuff_t *
/*
* IDL:omg.org/CosEventComm/PullConsumer/disconnect_pull_consumer:1.0
*/
static void decode_CosEventComm_PullConsumer_disconnect_pull_consumer(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int *offset _U_, MessageHeader *header, gchar *operation _U_) {
gboolean stream_is_big_endian; /* big endianess */
/* Operation specific Variable declarations Begin */
/* Operation specific Variable declarations End */
stream_is_big_endian = is_big_endian(header);
switch(header->message_type) {
@ -624,7 +626,7 @@ static void decode_CosEventComm_PullConsumer_disconnect_pull_consumer(tvbuff_t *
case NO_EXCEPTION:
/* Function returns void */
@ -640,26 +642,26 @@ static void decode_CosEventComm_PullConsumer_disconnect_pull_consumer(tvbuff_t *
g_warning("Unknown Exception ");
break;
} /* switch(header->message_type) */
break;
break;
default:
/* Unknown GIOP Message */
g_warning("Unknown GIOP Message");
break;
} /* switch(header->message_type) */
} /* switch(header->message_type) */
}
@ -667,16 +669,16 @@ static gboolean dissect_coseventcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tr
proto_item *ti = NULL;
proto_tree *tree = NULL; /* init later, inside if(tree) */
gboolean be; /* big endianess */
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "COSEVENTCOMM");
/*
* Do not clear COL_INFO, as nothing is being written there by
/*
* Do not clear COL_INFO, as nothing is being written there by
* this dissector yet. So leave it as is from the GIOP dissector.
* TODO: add something useful to COL_INFO
* TODO: add something useful to COL_INFO
* if (check_col(pinfo->cinfo, COL_INFO))
* col_clear(pinfo->cinfo, COL_INFO);
*/
@ -684,7 +686,7 @@ static gboolean dissect_coseventcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tr
if (ptree) {
ti = proto_tree_add_item(ptree, proto_coseventcomm, tvb, *offset, -1, FALSE);
tree = proto_item_add_subtree(ti, ett_coseventcomm);
}
}
be = is_big_endian(header); /* get endianess - TODO use passed in stream_is_big_endian instead ? */
@ -697,7 +699,7 @@ static gboolean dissect_coseventcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tr
}
switch(header->message_type) {
@ -705,7 +707,7 @@ static gboolean dissect_coseventcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tr
case Reply:
if (!operation)
THROW(ReportedBoundsError);
THROW(ReportedBoundsError);
if (!strcmp(operation, CosEventComm_PushConsumer_push_op )) {
decode_CosEventComm_PushConsumer_push(tvb, pinfo, tree, offset, header, operation);
@ -742,7 +744,7 @@ static gboolean dissect_coseventcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tr
return TRUE;
}
break;
case CancelRequest:
@ -777,7 +779,7 @@ void proto_register_giop_coseventcomm(void) {
static hf_register_info hf[] = {
/* no fields yet */
};
#endif
@ -788,14 +790,14 @@ void proto_register_giop_coseventcomm(void) {
};
/* Register the protocol name and description */
proto_coseventcomm = proto_register_protocol("Coseventcomm Dissector Using GIOP API" , "COSEVENTCOMM", "giop-coseventcomm" );
#if 0
proto_register_field_array(proto_coseventcomm, hf, array_length(hf));
#endif
proto_register_subtree_array(ett,array_length(ett));
}
@ -806,37 +808,7 @@ void proto_register_giop_coseventcomm(void) {
void proto_register_handoff_giop_coseventcomm(void) {
#if 0
/* Register for Explicit Dissection */
register_giop_user_module(dissect_coseventcomm, "COSEVENTCOMM", "CosEventComm/PullConsumer", proto_coseventcomm ); /* explicit dissector */
#endif
#if 0
/* Register for Explicit Dissection */
register_giop_user_module(dissect_coseventcomm, "COSEVENTCOMM", "CosEventComm/PushSupplier", proto_coseventcomm ); /* explicit dissector */
#endif
#if 0
/* Register for Explicit Dissection */
register_giop_user_module(dissect_coseventcomm, "COSEVENTCOMM", "CosEventComm/PushConsumer", proto_coseventcomm ); /* explicit dissector */
#endif
#if 0
/* Register for Explicit Dissection */
@ -846,11 +818,41 @@ void proto_register_handoff_giop_coseventcomm(void) {
#endif
#if 0
/* Register for Explicit Dissection */
register_giop_user_module(dissect_coseventcomm, "COSEVENTCOMM", "CosEventComm/PushConsumer", proto_coseventcomm ); /* explicit dissector */
#endif
#if 0
/* Register for Explicit Dissection */
register_giop_user_module(dissect_coseventcomm, "COSEVENTCOMM", "CosEventComm/PullConsumer", proto_coseventcomm ); /* explicit dissector */
#endif
#if 0
/* Register for Explicit Dissection */
register_giop_user_module(dissect_coseventcomm, "COSEVENTCOMM", "CosEventComm/PushSupplier", proto_coseventcomm ); /* explicit dissector */
#endif
/* Register for Heuristic Dissection */
register_giop_user(dissect_coseventcomm, "COSEVENTCOMM" ,proto_coseventcomm); /* heuristic dissector */
register_giop_user(dissect_coseventcomm, "COSEVENTCOMM" ,proto_coseventcomm); /* heuristic dissector */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -533,7 +533,9 @@ static gboolean decode_user_exception(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
gboolean be _U_; /* big endianess */
if (!header->exception_id)
return FALSE;
if (!strcmp(header->exception_id, user_exception_Tango_MultiDevFailed )) {
decode_ex_Tango_MultiDevFailed(tvb, pinfo, tree, offset, header, operation); /* IDL:Tango/MultiDevFailed:1.0 */