2002-01-30 18:55:39 +00:00
/* packet-cosnaming.c
2008-05-09 07:07:50 +00:00
*
* $ Id $
*
2001-07-19 21:30:17 +00:00
* Routines for IDL dissection
*
2006-05-31 00:23:01 +00:00
* Autogenerated from idl2wrs
2001-07-19 21:30:17 +00:00
* Copyright 2001 Frank Singleton < frank . singleton @ ericsson . com >
*/
/*
2006-05-21 05:12:17 +00:00
* Wireshark - Network traffic analyzer
2001-07-19 21:30:17 +00:00
* By Gerald Combs
2012-07-08 03:29:49 +00:00
* Copyright 1999 - 2012 Gerald Combs
2001-07-19 21:30:17 +00:00
*/
2005-06-25 18:20:13 +00:00
2001-07-19 21:30:17 +00:00
/*
* 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 .
2005-06-25 18:20:13 +00:00
*
2001-07-19 21:30:17 +00:00
* 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 .
2005-06-25 18:20:13 +00:00
*
2001-07-19 21:30:17 +00:00
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
2012-06-28 22:56:06 +00:00
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA .
2001-07-19 21:30:17 +00:00
*/
2012-09-20 02:03:38 +00:00
# include "config.h"
2001-07-19 21:30:17 +00:00
# include <gmodule.h>
# include <string.h>
# include <glib.h>
2002-01-21 07:37:49 +00:00
# include <epan/packet.h>
# include <epan/proto.h>
2004-07-18 18:06:47 +00:00
# include <epan/dissectors/packet-giop.h>
2012-08-08 03:29:51 +00:00
# include <epan/expert.h>
2001-07-19 21:30:17 +00:00
2007-03-28 03:56:24 +00:00
# ifdef _MSC_VER
2007-03-27 02:47:09 +00:00
/* disable warning: "unreference local variable" */
# pragma warning(disable:4101)
# endif
2001-07-19 21:30:17 +00:00
2011-11-18 12:34:16 +00:00
2012-11-05 03:36:07 +00:00
/* Initialise the protocol and subtree pointers */
static int proto_cosnaming = - 1 ;
static gint ett_cosnaming = - 1 ;
/* Initialise the initial Alignment */
static guint32 boundary = GIOP_HEADER_SIZE ; /* initial value */
2012-10-11 14:42:33 +00:00
static int hf_operationrequest = - 1 ; /* Request_Operation field */
/* Operation filters */
static int hf_CosNaming_NamingContext_bind_n = - 1 ;
static int hf_CosNaming_NamingContext_bind_obj = - 1 ;
static int hf_CosNaming_NamingContext_rebind_n = - 1 ;
static int hf_CosNaming_NamingContext_rebind_obj = - 1 ;
static int hf_CosNaming_NamingContext_bind_context_n = - 1 ;
static int hf_CosNaming_NamingContext_bind_context_nc = - 1 ;
static int hf_CosNaming_NamingContext_rebind_context_n = - 1 ;
static int hf_CosNaming_NamingContext_rebind_context_nc = - 1 ;
static int hf_CosNaming_NamingContext_resolve_return = - 1 ;
static int hf_CosNaming_NamingContext_resolve_n = - 1 ;
static int hf_CosNaming_NamingContext_unbind_n = - 1 ;
static int hf_CosNaming_NamingContext_new_context_return = - 1 ;
static int hf_CosNaming_NamingContext_bind_new_context_return = - 1 ;
static int hf_CosNaming_NamingContext_bind_new_context_n = - 1 ;
static int hf_CosNaming_NamingContext_list_how_many = - 1 ;
static int hf_CosNaming_NamingContext_list_bl = - 1 ;
static int hf_CosNaming_NamingContext_list_bi = - 1 ;
static int hf_CosNaming_BindingIterator_next_one_return = - 1 ;
static int hf_CosNaming_BindingIterator_next_one_b = - 1 ;
static int hf_CosNaming_BindingIterator_next_n_return = - 1 ;
static int hf_CosNaming_BindingIterator_next_n_how_many = - 1 ;
static int hf_CosNaming_BindingIterator_next_n_bl = - 1 ;
/* Struct filters */
static int hf_CosNaming_NameComponent_id = - 1 ;
static int hf_CosNaming_NameComponent_kind = - 1 ;
static int hf_CosNaming_Binding_binding_name = - 1 ;
static int hf_CosNaming_Binding_binding_type = - 1 ;
/* User exception filters */
static int hf_CosNaming_NamingContext_NotFound_why = - 1 ;
static int hf_CosNaming_NamingContext_NotFound_rest_of_name = - 1 ;
static int hf_CosNaming_NamingContext_CannotProceed_cxt = - 1 ;
static int hf_CosNaming_NamingContext_CannotProceed_rest_of_name = - 1 ;
2013-05-24 18:09:57 +00:00
/* Expert info filters */
static expert_field ei_cosnaming_unknown_giop_msg = EI_INIT ;
static expert_field ei_cosnaming_unknown_exception = EI_INIT ;
static expert_field ei_cosnaming_unknown_reply_status = EI_INIT ;
2012-10-11 14:42:33 +00:00
2005-06-25 18:20:13 +00:00
static proto_tree * start_dissecting ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * ptree , int * offset ) ;
2002-01-30 18:55:39 +00:00
/* Struct prototype declaration Start */
/* Struct = IDL:omg.org/CosNaming/NameComponent:1.0 */
2012-12-26 10:28:03 +00:00
static void decode_CosNaming_NameComponent_st ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header _U_ , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ ) ;
2002-01-30 18:55:39 +00:00
/* Struct = IDL:omg.org/CosNaming/Binding:1.0 */
2012-12-26 10:28:03 +00:00
static void decode_CosNaming_Binding_st ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header _U_ , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ ) ;
2002-01-30 18:55:39 +00:00
/* Struct prototype declaration End */
2005-06-25 18:20:13 +00:00
2002-01-30 18:55:39 +00:00
/*
* IDL Enums Start
*/
2012-07-08 03:29:49 +00:00
2002-01-30 18:55:39 +00:00
/*
* Enum = IDL : omg . org / CosNaming / BindingType : 1.0
*/
static const value_string CosNaming_BindingType [ ] = {
2012-07-08 03:29:49 +00:00
{ 0 , " nobject " } ,
{ 1 , " ncontext " } ,
2002-01-30 18:55:39 +00:00
{ 0 , NULL } ,
} ;
2005-06-25 18:20:13 +00:00
2002-01-30 18:55:39 +00:00
/*
* Enum = IDL : omg . org / CosNaming / NamingContext / NotFoundReason : 1.0
*/
static const value_string CosNaming_NamingContext_NotFoundReason [ ] = {
2012-07-08 03:29:49 +00:00
{ 0 , " missing_node " } ,
{ 1 , " not_context " } ,
{ 2 , " not_object " } ,
2002-01-30 18:55:39 +00:00
{ 0 , NULL } ,
} ;
2005-06-25 18:20:13 +00:00
2002-01-30 18:55:39 +00:00
/*
* IDL Enums End
*/
2012-07-08 03:29:49 +00:00
2001-07-19 21:30:17 +00:00
/* Begin Exception Helper Functions */
/* Exception = IDL:omg.org/CosNaming/NamingContext/NotFound:1.0 */
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_ex_CosNaming_NamingContext_NotFound ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , int * offset _U_ , MessageHeader * header _U_ , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2012-11-05 03:36:07 +00:00
proto_item * item _U_ ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
guint32 u_octet4 ;
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_NotFound_rest_of_name ;
guint32 i_CosNaming_NamingContext_NotFound_rest_of_name ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
u_octet4 = get_CDR_enum ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_NotFound_why , tvb , * offset - 4 , 4 , u_octet4 ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_NotFound_rest_of_name = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_NotFound_rest_of_name , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_NotFound_rest_of_name ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_NotFound_rest_of_name = 0 ; i_CosNaming_NamingContext_NotFound_rest_of_name < u_octet4_loop_CosNaming_NamingContext_NotFound_rest_of_name ; i_CosNaming_NamingContext_NotFound_rest_of_name + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
}
/* Exception = IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0 */
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_ex_CosNaming_NamingContext_CannotProceed ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , int * offset _U_ , MessageHeader * header _U_ , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2012-11-05 03:36:07 +00:00
proto_item * item _U_ ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_CannotProceed_rest_of_name ;
guint32 i_CosNaming_NamingContext_CannotProceed_rest_of_name ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_CannotProceed_rest_of_name = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_CannotProceed_rest_of_name , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_CannotProceed_rest_of_name ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_CannotProceed_rest_of_name = 0 ; i_CosNaming_NamingContext_CannotProceed_rest_of_name < u_octet4_loop_CosNaming_NamingContext_CannotProceed_rest_of_name ; i_CosNaming_NamingContext_CannotProceed_rest_of_name + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
}
2005-06-25 18:20:13 +00:00
2001-07-19 21:30:17 +00:00
/* End Exception Helper Functions */
/*
* Main delegator for exception handling
*
*/
2012-07-08 03:29:49 +00:00
static gboolean
2012-12-26 10:28:03 +00:00
decode_user_exception ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * ptree _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2005-06-25 18:20:13 +00:00
proto_tree * tree _U_ ;
2002-08-28 20:41:00 +00:00
2005-05-30 16:03:24 +00:00
if ( ! header - > exception_id )
2005-06-24 12:43:32 +00:00
return FALSE ;
2012-07-08 03:29:49 +00:00
if ( strcmp ( header - > exception_id , " IDL:omg.org/CosNaming/NamingContext/NotFound:1.0 " ) = = 0 ) {
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2011-11-18 12:39:35 +00:00
decode_ex_CosNaming_NamingContext_NotFound ( tvb , pinfo , tree , offset , header , operation , stream_is_big_endian ) ; /* IDL:omg.org/CosNaming/NamingContext/NotFound:1.0 */
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( header - > exception_id , " IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0 " ) = = 0 ) {
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2011-11-18 12:39:35 +00:00
decode_ex_CosNaming_NamingContext_CannotProceed ( tvb , pinfo , tree , offset , header , operation , stream_is_big_endian ) ; /* IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0 */
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
return FALSE ; /* user exception not found */
}
2005-06-25 18:20:13 +00:00
2001-07-19 21:30:17 +00:00
/*
* IDL : omg . org / CosNaming / NamingContext / bind : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_bind ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_bind_n ;
guint32 i_CosNaming_NamingContext_bind_n ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_bind_n = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_bind_n , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_bind_n ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_bind_n = 0 ; i_CosNaming_NamingContext_bind_n < u_octet4_loop_CosNaming_NamingContext_bind_n ; i_CosNaming_NamingContext_bind_n + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
/* Function returns void */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / NamingContext / rebind : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_rebind ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_rebind_n ;
guint32 i_CosNaming_NamingContext_rebind_n ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_rebind_n = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_rebind_n , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_rebind_n ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_rebind_n = 0 ; i_CosNaming_NamingContext_rebind_n < u_octet4_loop_CosNaming_NamingContext_rebind_n ; i_CosNaming_NamingContext_rebind_n + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
/* Function returns void */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / NamingContext / bind_context : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_bind_context ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_bind_context_n ;
guint32 i_CosNaming_NamingContext_bind_context_n ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_bind_context_n = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_bind_context_n , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_bind_context_n ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_bind_context_n = 0 ; i_CosNaming_NamingContext_bind_context_n < u_octet4_loop_CosNaming_NamingContext_bind_context_n ; i_CosNaming_NamingContext_bind_context_n + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
/* Function returns void */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / NamingContext / rebind_context : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_rebind_context ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_rebind_context_n ;
guint32 i_CosNaming_NamingContext_rebind_context_n ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_rebind_context_n = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_rebind_context_n , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_rebind_context_n ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_rebind_context_n = 0 ; i_CosNaming_NamingContext_rebind_context_n < u_octet4_loop_CosNaming_NamingContext_rebind_context_n ; i_CosNaming_NamingContext_rebind_context_n + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
/* Function returns void */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2002-08-28 20:41:00 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2002-08-28 20:41:00 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2002-08-28 20:41:00 +00:00
}
2001-07-19 21:30:17 +00:00
/*
* IDL : omg . org / CosNaming / NamingContext / resolve : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_resolve ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_resolve_n ;
guint32 i_CosNaming_NamingContext_resolve_n ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_resolve_n = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_resolve_n , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_resolve_n ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_resolve_n = 0 ; i_CosNaming_NamingContext_resolve_n < u_octet4_loop_CosNaming_NamingContext_resolve_n ; i_CosNaming_NamingContext_resolve_n + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / NamingContext / unbind : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_unbind ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_unbind_n ;
guint32 i_CosNaming_NamingContext_unbind_n ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_unbind_n = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_unbind_n , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_unbind_n ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_unbind_n = 0 ; i_CosNaming_NamingContext_unbind_n < u_octet4_loop_CosNaming_NamingContext_unbind_n ; i_CosNaming_NamingContext_unbind_n + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
/* Function returns void */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / NamingContext / new_context : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_new_context ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / NamingContext / bind_new_context : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_bind_new_context ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_bind_new_context_n ;
guint32 i_CosNaming_NamingContext_bind_new_context_n ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_bind_new_context_n = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_bind_new_context_n , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_bind_new_context_n ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_bind_new_context_n = 0 ; i_CosNaming_NamingContext_bind_new_context_n < u_octet4_loop_CosNaming_NamingContext_bind_new_context_n ; i_CosNaming_NamingContext_bind_new_context_n + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / NamingContext / destroy : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_destroy ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
/* Function returns void */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / NamingContext / list : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NamingContext_list ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_NamingContext_list_bl ;
guint32 i_CosNaming_NamingContext_list_bl ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_list_how_many , tvb , * offset - 4 , 4 , get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
/* Function returns void */
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_NamingContext_list_bl = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_NamingContext_list_bl , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_NamingContext_list_bl ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_NamingContext_list_bl = 0 ; i_CosNaming_NamingContext_list_bl < u_octet4_loop_CosNaming_NamingContext_list_bl ; i_CosNaming_NamingContext_list_bl + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_Binding" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_Binding_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_Binding" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
get_CDR_object ( tvb , pinfo , tree , offset , stream_is_big_endian , boundary ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / BindingIterator / next_one : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_BindingIterator_next_one ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
2012-10-11 14:42:33 +00:00
proto_tree_add_boolean ( tree , hf_CosNaming_BindingIterator_next_one_return , tvb , * offset - 1 , 1 , get_CDR_boolean ( tvb , offset ) ) ;
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_Binding" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_Binding_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_Binding" */
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / BindingIterator / next_n : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_BindingIterator_next_n ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_BindingIterator_next_n_bl ;
guint32 i_CosNaming_BindingIterator_next_n_bl ;
2001-07-19 21:30:17 +00:00
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
2012-10-11 14:42:33 +00:00
proto_tree_add_uint ( tree , hf_CosNaming_BindingIterator_next_n_how_many , tvb , * offset - 4 , 4 , get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ) ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
2012-10-11 14:42:33 +00:00
proto_tree_add_boolean ( tree , hf_CosNaming_BindingIterator_next_n_return , tvb , * offset - 1 , 1 , get_CDR_boolean ( tvb , offset ) ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_BindingIterator_next_n_bl = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_BindingIterator_next_n_bl , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_BindingIterator_next_n_bl ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_BindingIterator_next_n_bl = 0 ; i_CosNaming_BindingIterator_next_n_bl < u_octet4_loop_CosNaming_BindingIterator_next_n_bl ; i_CosNaming_BindingIterator_next_n_bl + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_Binding" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_Binding_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_Binding" */
2001-07-19 21:30:17 +00:00
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
/*
* IDL : omg . org / CosNaming / BindingIterator / destroy : 1.0
*/
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_BindingIterator_destroy ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2001-07-19 21:30:17 +00:00
switch ( header - > message_type ) {
case Request :
break ;
case Reply :
switch ( header - > rep_status ) {
case NO_EXCEPTION :
/* Function returns void */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
case USER_EXCEPTION :
break ;
default :
2012-10-11 14:42:33 +00:00
/* Unknown Exception */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_exception , " Unknown exception %d " , header - > rep_status ) ;
2001-07-19 21:30:17 +00:00
break ;
2012-11-05 03:36:07 +00:00
} /* switch(header->rep_status) */
2002-08-28 20:41:00 +00:00
2005-06-25 18:20:13 +00:00
break ;
2001-07-19 21:30:17 +00:00
default :
2012-10-11 14:42:33 +00:00
/* Unknown GIOP Message */
2013-05-24 18:09:57 +00:00
expert_add_info_format_text ( pinfo , item , & ei_cosnaming_unknown_giop_msg , " Unknown GIOP message %d " , header - > message_type ) ;
2001-07-19 21:30:17 +00:00
break ;
2005-06-25 18:20:13 +00:00
} /* switch(header->message_type) */
2001-07-19 21:30:17 +00:00
}
2002-01-30 18:55:39 +00:00
/* Struct = IDL:omg.org/CosNaming/NameComponent:1.0 */
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_NameComponent_st ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header _U_ , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2002-01-30 18:55:39 +00:00
2012-11-05 03:36:07 +00:00
giop_add_CDR_string ( tree , tvb , offset , stream_is_big_endian , boundary , hf_CosNaming_NameComponent_id ) ;
2006-04-19 05:17:46 +00:00
2012-11-05 03:36:07 +00:00
giop_add_CDR_string ( tree , tvb , offset , stream_is_big_endian , boundary , hf_CosNaming_NameComponent_kind ) ;
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
}
/* Struct = IDL:omg.org/CosNaming/Binding:1.0 */
2012-07-08 03:29:49 +00:00
static void
2012-12-26 10:28:03 +00:00
decode_CosNaming_Binding_st ( tvbuff_t * tvb _U_ , packet_info * pinfo _U_ , proto_tree * tree _U_ , proto_item * item _U_ , int * offset _U_ , MessageHeader * header _U_ , const gchar * operation _U_ , gboolean stream_is_big_endian _U_ )
2012-07-08 03:29:49 +00:00
{
2002-01-30 18:55:39 +00:00
/* Operation specific Variable declarations Begin */
2012-10-11 14:42:33 +00:00
guint32 u_octet4_loop_CosNaming_Binding_binding_name ;
guint32 i_CosNaming_Binding_binding_name ;
2002-01-30 18:55:39 +00:00
guint32 u_octet4 ;
/* Operation specific Variable declarations End */
2002-08-28 20:41:00 +00:00
2013-05-24 18:09:57 +00:00
( void ) item ; /* Avoid coverity param_set_but_unused parse warning */
2012-10-11 14:42:33 +00:00
u_octet4_loop_CosNaming_Binding_binding_name = get_CDR_ulong ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_Binding_binding_name , tvb , * offset - 4 , 4 , u_octet4_loop_CosNaming_Binding_binding_name ) ;
2002-08-28 20:41:00 +00:00
2012-10-11 14:42:33 +00:00
for ( i_CosNaming_Binding_binding_name = 0 ; i_CosNaming_Binding_binding_name < u_octet4_loop_CosNaming_Binding_binding_name ; i_CosNaming_Binding_binding_name + + ) {
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
/* Begin struct "CosNaming_NameComponent" */
2012-11-05 03:36:07 +00:00
decode_CosNaming_NameComponent_st ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2002-01-30 18:55:39 +00:00
/* End struct "CosNaming_NameComponent" */
}
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
u_octet4 = get_CDR_enum ( tvb , offset , stream_is_big_endian , boundary ) ;
2013-01-19 10:54:09 +00:00
/* coverity[returned_pointer] */
2012-11-05 03:36:07 +00:00
item = proto_tree_add_uint ( tree , hf_CosNaming_Binding_binding_type , tvb , * offset - 4 , 4 , u_octet4 ) ;
2002-08-28 20:41:00 +00:00
2002-01-30 18:55:39 +00:00
}
2005-06-25 18:20:13 +00:00
/*
* Called once we accept the packet as being for us ; it sets the
* Protocol and Info columns and creates the top - level protocol
* tree item .
*/
2012-07-08 03:29:49 +00:00
static proto_tree *
start_dissecting ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * ptree , int * offset )
{
2001-07-19 21:30:17 +00:00
proto_item * ti = NULL ;
proto_tree * tree = NULL ; /* init later, inside if(tree) */
2009-08-09 06:26:46 +00:00
col_set_str ( pinfo - > cinfo , COL_PROTOCOL , " COSNAMING " ) ;
2005-06-25 18:20:13 +00:00
/*
* 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
* col_clear ( pinfo - > cinfo , COL_INFO ) ;
*/
2002-01-30 18:55:39 +00:00
2001-07-19 21:30:17 +00:00
if ( ptree ) {
2010-05-24 06:06:17 +00:00
ti = proto_tree_add_item ( ptree , proto_cosnaming , tvb , * offset , - 1 , ENC_NA ) ;
2005-06-25 18:20:13 +00:00
tree = proto_item_add_subtree ( ti , ett_cosnaming ) ;
}
return tree ;
}
2001-07-19 21:30:17 +00:00
2012-10-11 14:42:33 +00:00
static proto_item *
2012-12-26 10:28:03 +00:00
process_RequestOperation ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * ptree , MessageHeader * header , const gchar * operation )
2012-09-05 12:45:54 +00:00
{
proto_item * pi ;
if ( header - > message_type = = Reply ) {
/* fill-up info column */
col_append_fstr ( pinfo - > cinfo , COL_INFO , " op = %s " , operation ) ;
2012-11-05 03:36:07 +00:00
}
2012-09-05 12:45:54 +00:00
/* fill-up the field */
2012-10-11 14:42:33 +00:00
pi = proto_tree_add_string ( ptree , hf_operationrequest , tvb , 0 , 0 , operation ) ;
2012-09-05 12:45:54 +00:00
PROTO_ITEM_SET_GENERATED ( pi ) ;
2012-10-11 14:42:33 +00:00
return pi ;
2012-09-05 12:45:54 +00:00
}
2012-07-08 03:29:49 +00:00
static gboolean
2012-12-26 10:28:03 +00:00
dissect_cosnaming ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * ptree , int * offset , MessageHeader * header , const gchar * operation , gchar * idlname )
2012-07-08 03:29:49 +00:00
{
2012-10-11 14:42:33 +00:00
proto_item * item _U_ ;
2005-06-25 18:20:13 +00:00
proto_tree * tree _U_ ;
2012-11-05 03:36:07 +00:00
gboolean stream_is_big_endian = is_big_endian ( header ) ; /* get endianess */
2001-07-19 21:30:17 +00:00
/* If we have a USER Exception, then decode it and return */
if ( ( header - > message_type = = Reply ) & & ( header - > rep_status = = USER_EXCEPTION ) ) {
2011-11-18 12:39:35 +00:00
return decode_user_exception ( tvb , pinfo , ptree , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
}
switch ( header - > message_type ) {
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
case Request :
case Reply :
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " bind " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_bind ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " rebind " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_rebind ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " bind_context " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_bind_context ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " rebind_context " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_rebind_context ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " resolve " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_resolve ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " unbind " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_unbind ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " new_context " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_new_context ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " bind_new_context " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_bind_new_context ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " destroy " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_destroy ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " list " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/NamingContext " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_NamingContext_list ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " next_one " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/BindingIterator " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_BindingIterator_next_one ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " next_n " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/BindingIterator " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_BindingIterator_next_n ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2012-07-08 03:29:49 +00:00
if ( strcmp ( operation , " destroy " ) = = 0
2006-04-17 18:10:23 +00:00
& & ( ! idlname | | strcmp ( idlname , " CosNaming/BindingIterator " ) = = 0 ) ) {
2012-10-11 14:42:33 +00:00
item = process_RequestOperation ( tvb , pinfo , ptree , header , operation ) ; /* fill-up Request_Operation field & info column */
2005-06-25 18:20:13 +00:00
tree = start_dissecting ( tvb , pinfo , ptree , offset ) ;
2012-10-11 14:42:33 +00:00
decode_CosNaming_BindingIterator_destroy ( tvb , pinfo , tree , item , offset , header , operation , stream_is_big_endian ) ;
2001-07-19 21:30:17 +00:00
return TRUE ;
}
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
break ;
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
case CancelRequest :
case LocateRequest :
case LocateReply :
case CloseConnection :
case MessageError :
case Fragment :
return FALSE ; /* not handled yet */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
default :
return FALSE ; /* not handled yet */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
} /* switch */
2002-08-28 20:41:00 +00:00
2001-07-19 21:30:17 +00:00
return FALSE ;
} /* End of main dissector */
2007-01-02 13:36:45 +00:00
/* Register the protocol with Wireshark */
2012-11-05 03:36:07 +00:00
void proto_register_giop_cosnaming ( void )
{
2001-07-19 21:30:17 +00:00
/* setup list of header fields */
static hf_register_info hf [ ] = {
2011-11-29 19:36:53 +00:00
/* field that indicates the currently ongoing request/reply exchange */
2012-08-08 03:37:05 +00:00
{ & hf_operationrequest , { " Request_Operation " , " giop-cosnaming.Request_Operation " , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL } } ,
2012-10-11 14:42:33 +00:00
/* Operation filters */
{ & hf_CosNaming_NamingContext_bind_n , { " Seq length of n " , " giop-cosnaming.NamingContext.bind.n " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_rebind_n , { " Seq length of n " , " giop-cosnaming.NamingContext.rebind.n " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_bind_context_n , { " Seq length of n " , " giop-cosnaming.NamingContext.bind_context.n " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_rebind_context_n , { " Seq length of n " , " giop-cosnaming.NamingContext.rebind_context.n " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_resolve_n , { " Seq length of n " , " giop-cosnaming.NamingContext.resolve.n " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_unbind_n , { " Seq length of n " , " giop-cosnaming.NamingContext.unbind.n " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_bind_new_context_n , { " Seq length of n " , " giop-cosnaming.NamingContext.bind_new_context.n " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_list_how_many , { " how_many " , " giop-cosnaming.NamingContext.list.how_many " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_list_bl , { " Seq length of bl " , " giop-cosnaming.NamingContext.list.bl " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_BindingIterator_next_one_return , { " Return value " , " giop-cosnaming.BindingIterator.next_one.return " , FT_BOOLEAN , 8 , NULL , 0x01 , NULL , HFILL } } ,
{ & hf_CosNaming_BindingIterator_next_n_return , { " Return value " , " giop-cosnaming.BindingIterator.next_n.return " , FT_BOOLEAN , 8 , NULL , 0x01 , NULL , HFILL } } ,
{ & hf_CosNaming_BindingIterator_next_n_how_many , { " how_many " , " giop-cosnaming.BindingIterator.next_n.how_many " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_BindingIterator_next_n_bl , { " Seq length of bl " , " giop-cosnaming.BindingIterator.next_n.bl " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
/* Attribute filters */
/* Struct filters */
{ & hf_CosNaming_NameComponent_id , { " NameComponent_id " , " giop-cosnaming.NameComponent.id " , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NameComponent_kind , { " NameComponent_kind " , " giop-cosnaming.NameComponent.kind " , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_Binding_binding_name , { " Seq length of Binding_binding_name " , " giop-cosnaming.Binding.binding_name " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_Binding_binding_type , { " Binding_binding_type " , " giop-cosnaming.Binding.binding_type " , FT_UINT32 , BASE_DEC , VALS ( CosNaming_BindingType ) , 0x0 , NULL , HFILL } } ,
/* User exception filters */
{ & hf_CosNaming_NamingContext_NotFound_why , { " NotFound_why " , " giop-cosnaming.NamingContext.NotFound_why " , FT_UINT32 , BASE_DEC , VALS ( CosNaming_NamingContext_NotFoundReason ) , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_NotFound_rest_of_name , { " Seq length of NotFound_rest_of_name " , " giop-cosnaming.NamingContext.NotFound_rest_of_name " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
{ & hf_CosNaming_NamingContext_CannotProceed_rest_of_name , { " Seq length of CannotProceed_rest_of_name " , " giop-cosnaming.NamingContext.CannotProceed_rest_of_name " , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL } } ,
/* Union filters */
2005-06-25 18:20:13 +00:00
2001-07-19 21:30:17 +00:00
} ;
2013-05-24 18:09:57 +00:00
static ei_register_info ei [ ] = {
{ & ei_cosnaming_unknown_giop_msg , { " giop-cosnaming.unknown_giop_msg " , PI_PROTOCOL , PI_WARN , " Unknown GIOP message " , EXPFILL } } ,
{ & ei_cosnaming_unknown_exception , { " giop-cosnaming.unknown_exception " , PI_PROTOCOL , PI_WARN , " Unknown exception " , EXPFILL } } ,
{ & ei_cosnaming_unknown_reply_status , { " giop-cosnaming.unknown_reply_status " , PI_PROTOCOL , PI_WARN , " Unknown reply status " , EXPFILL } } ,
} ;
2001-07-19 21:30:17 +00:00
/* setup protocol subtree array */
static gint * ett [ ] = {
& ett_cosnaming ,
} ;
2013-05-24 18:09:57 +00:00
expert_module_t * expert_cosnaming ;
2001-07-19 21:30:17 +00:00
/* Register the protocol name and description */
proto_cosnaming = proto_register_protocol ( " Cosnaming Dissector Using GIOP API " , " COSNAMING " , " giop-cosnaming " ) ;
proto_register_field_array ( proto_cosnaming , hf , array_length ( hf ) ) ;
2013-05-24 18:09:57 +00:00
proto_register_subtree_array ( ett , array_length ( ett ) ) ;
expert_cosnaming = expert_register_protocol ( proto_cosnaming ) ;
expert_register_field_array ( expert_cosnaming , ei , array_length ( ei ) ) ;
2001-07-19 21:30:17 +00:00
}
/* register me as handler for these interfaces */
2012-11-05 03:36:07 +00:00
void proto_reg_handoff_giop_cosnaming ( void )
{
2005-06-24 12:43:32 +00:00
2001-07-19 21:30:17 +00:00
/* Register for Explicit Dissection */
2005-06-24 12:43:32 +00:00
register_giop_user_module ( dissect_cosnaming , " COSNAMING " , " CosNaming/BindingIterator " , proto_cosnaming ) ; /* explicit dissector */
2001-07-19 21:30:17 +00:00
/* Register for Explicit Dissection */
2005-06-24 12:43:32 +00:00
register_giop_user_module ( dissect_cosnaming , " COSNAMING " , " CosNaming/NamingContext " , proto_cosnaming ) ; /* explicit dissector */
2001-07-19 21:30:17 +00:00
/* Register for Heuristic Dissection */
2005-06-25 18:20:13 +00:00
register_giop_user ( dissect_cosnaming , " COSNAMING " , proto_cosnaming ) ; /* heuristic dissector */
2001-07-19 21:30:17 +00:00
}