3 * Routines for IDL dissection
5 * Autogenerated from idl2wrs
6 * Copyright 2001 Frank Singleton <frank.singleton@ericsson.com>
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
17 * SPDX-License-Identifier: GPL-2.0-or-later
24 #include <epan/packet.h>
25 #include <epan/proto.h>
26 #include "packet-giop.h"
27 #include <epan/expert.h>
28 #include <wsutil/array.h>
30 #include "ws_diag_control.h"
31 #include "ws_compiler_tests.h"
34 /* disable warning: "unreference local variable" */
35 #pragma warning(disable:4101)
38 /* XXX this should be autogenerated, or the warnings fixed in the generator */
39 DIAG_OFF(unused
-function
)
40 DIAG_OFF(unused
-variable
)
41 #if WS_IS_AT_LEAST_GNUC_VERSION(6,0)
42 DIAG_OFF(unused
-const-variable
)
45 void proto_register_giop_cosnaming(void);
46 void proto_reg_handoff_giop_cosnaming(void);
48 /* Initialise the protocol and subtree pointers */
49 static int proto_cosnaming
;
50 static int ett_cosnaming
;
51 static int ett_giop_struct
;
52 static int ett_giop_sequence
;
53 static int ett_giop_array
;
54 static int ett_giop_union
;
57 /* Initialise the initial Alignment */
58 static uint32_t boundary
= GIOP_HEADER_SIZE
; /* initial value */
60 static int hf_operationrequest
;/* Request_Operation field */
62 /* Operation filters */
63 static int hf_CosNaming_BindingIterator_next_n_return
;
64 static int hf_CosNaming_BindingIterator_next_n_how_many
;
65 static int hf_CosNaming_BindingIterator_next_n_bl_loop
;
66 static int hf_CosNaming_BindingIterator_next_one_return
;
67 static int hf_CosNaming_NamingContext_list_how_many
;
68 static int hf_CosNaming_NamingContext_list_bl_loop
;
69 static int hf_CosNaming_NamingContext_bind_new_context_n_loop
;
70 static int hf_CosNaming_NamingContext_unbind_n_loop
;
71 static int hf_CosNaming_NamingContext_resolve_n_loop
;
72 static int hf_CosNaming_NamingContext_rebind_context_n_loop
;
73 static int hf_CosNaming_NamingContext_bind_context_n_loop
;
74 static int hf_CosNaming_NamingContext_rebind_n_loop
;
75 static int hf_CosNaming_NamingContext_bind_n_loop
;
77 static int hf_CosNaming_Binding_binding_name_loop
;
78 static int hf_CosNaming_Binding_binding_type
;
79 static int hf_CosNaming_NameComponent_id
;
80 static int hf_CosNaming_NameComponent_kind
;
81 /* User exception filters */
82 static int hf_CosNaming_NamingContext_NotFound_why
;
83 static int hf_CosNaming_NamingContext_NotFound_rest_of_name_loop
;
84 static int hf_CosNaming_NamingContext_CannotProceed_cxt
;
85 static int hf_CosNaming_NamingContext_CannotProceed_rest_of_name_loop
;
86 /* Expert info filters */
87 static expert_field ei_cosnaming_unknown_giop_msg
;
88 static expert_field ei_cosnaming_unknown_exception
;
89 static expert_field ei_cosnaming_unknown_reply_status
;
92 static proto_tree
*start_dissecting(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ptree
, int *offset
);
95 /* Struct prototype declaration Start */
97 /* Struct = IDL:omg.org/CosNaming/Binding:1.0 */
98 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 char *operation _U_
, bool stream_is_big_endian _U_
);
100 /* Struct = IDL:omg.org/CosNaming/NameComponent:1.0 */
101 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 char *operation _U_
, bool stream_is_big_endian _U_
);
103 /* Struct prototype declaration End */
110 * Enum = IDL:omg.org/CosNaming/NamingContext/NotFoundReason:1.0
112 static const value_string CosNaming_NamingContext_NotFoundReason
[] = {
114 { 0, "missing_node" },
115 { 1, "not_context" },
121 * Enum = IDL:omg.org/CosNaming/BindingType:1.0
123 static const value_string CosNaming_BindingType
[] = {
134 /* Begin Exception Helper Functions */
137 /* Exception = IDL:omg.org/CosNaming/NamingContext/NotFound:1.0 */
139 decode_ex_CosNaming_NamingContext_NotFound(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, int *offset _U_
, MessageHeader
*header _U_
, const char *operation _U_
, bool stream_is_big_endian _U_
)
142 proto_item
*item
= wmem_new0(pinfo
->pool
, proto_item
);
144 /* Operation specific Variable declarations Begin */
146 uint32_t u_octet4_loop_CosNaming_NamingContext_NotFound_rest_of_name
;
147 uint32_t i_CosNaming_NamingContext_NotFound_rest_of_name
;
148 /* Operation specific Variable declarations End */
150 u_octet4
= get_CDR_enum(tvb
,offset
,stream_is_big_endian
, boundary
);
151 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_NotFound_why
, tvb
, *offset
-4, 4, u_octet4
);
153 u_octet4_loop_CosNaming_NamingContext_NotFound_rest_of_name
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
154 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_NotFound_rest_of_name_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_NotFound_rest_of_name
);
157 proto_tree
*tree_bak_09Tpe7TmnKrq
= tree
;
158 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_NotFound_rest_of_name");
159 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
++) {
161 { /* Begin struct "CosNaming_NameComponent" */
162 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
164 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
165 } /* End struct "CosNaming_NameComponent" */
167 tree
= tree_bak_09Tpe7TmnKrq
;
172 /* Exception = IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0 */
174 decode_ex_CosNaming_NamingContext_CannotProceed(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, int *offset _U_
, MessageHeader
*header _U_
, const char *operation _U_
, bool stream_is_big_endian _U_
)
177 proto_item
*item
= wmem_new0(pinfo
->pool
, proto_item
);
179 /* Operation specific Variable declarations Begin */
180 uint32_t u_octet4_loop_CosNaming_NamingContext_CannotProceed_rest_of_name
;
181 uint32_t i_CosNaming_NamingContext_CannotProceed_rest_of_name
;
182 /* Operation specific Variable declarations End */
184 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
186 u_octet4_loop_CosNaming_NamingContext_CannotProceed_rest_of_name
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
187 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_CannotProceed_rest_of_name_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_CannotProceed_rest_of_name
);
190 proto_tree
*tree_bak_JSHneL6pZlpo
= tree
;
191 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_CannotProceed_rest_of_name");
192 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
++) {
194 { /* Begin struct "CosNaming_NameComponent" */
195 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
197 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
198 } /* End struct "CosNaming_NameComponent" */
200 tree
= tree_bak_JSHneL6pZlpo
;
206 /* End Exception Helper Functions */
209 * Main delegator for exception handling
213 decode_user_exception(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*ptree _U_
, int *offset _U_
, MessageHeader
*header
, const char *operation _U_
, bool stream_is_big_endian _U_
)
215 proto_tree
*tree _U_
;
217 if (!header
->exception_id
)
220 if (strcmp(header
->exception_id
, "IDL:omg.org/CosNaming/NamingContext/NotFound:1.0") == 0) {
221 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
222 decode_ex_CosNaming_NamingContext_NotFound(tvb
, pinfo
, tree
, offset
, header
, operation
, stream_is_big_endian
); /* IDL:omg.org/CosNaming/NamingContext/NotFound:1.0 */
226 if (strcmp(header
->exception_id
, "IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0") == 0) {
227 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
228 decode_ex_CosNaming_NamingContext_CannotProceed(tvb
, pinfo
, tree
, offset
, header
, operation
, stream_is_big_endian
); /* IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0 */
233 return false; /* user exception not found */
237 * IDL:omg.org/CosNaming/BindingIterator/destroy:1.0
240 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 char *operation _U_
, bool stream_is_big_endian _U_
)
242 switch(header
->message_type
) {
246 switch(header
->rep_status
) {
248 /* Function returns void */
254 /* Unknown Exception */
255 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
257 } /* switch(header->rep_status) */
261 /* Unknown GIOP Message */
262 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
264 } /* switch(header->message_type) */
268 * IDL:omg.org/CosNaming/BindingIterator/next_n:1.0
271 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 char *operation _U_
, bool stream_is_big_endian _U_
)
273 /* Operation specific Variable declarations Begin */
274 uint32_t u_octet4_loop_CosNaming_BindingIterator_next_n_bl
;
275 uint32_t i_CosNaming_BindingIterator_next_n_bl
;
276 /* Operation specific Variable declarations End */
278 switch(header
->message_type
) {
280 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
));
284 switch(header
->rep_status
) {
286 proto_tree_add_boolean(tree
, hf_CosNaming_BindingIterator_next_n_return
, tvb
, *offset
-1, 1, get_CDR_boolean(tvb
,offset
));
288 u_octet4_loop_CosNaming_BindingIterator_next_n_bl
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
289 proto_tree_add_uint(tree
, hf_CosNaming_BindingIterator_next_n_bl_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_BindingIterator_next_n_bl
);
292 proto_tree
*tree_bak_E4cwUte8TciR
= tree
;
293 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_BindingIterator_next_n_bl");
294 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
++) {
296 { /* Begin struct "CosNaming_Binding" */
297 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_Binding");
299 decode_CosNaming_Binding_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
300 } /* End struct "CosNaming_Binding" */
302 tree
= tree_bak_E4cwUte8TciR
;
309 /* Unknown Exception */
310 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
312 } /* switch(header->rep_status) */
316 /* Unknown GIOP Message */
317 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
319 } /* switch(header->message_type) */
323 * IDL:omg.org/CosNaming/BindingIterator/next_one:1.0
326 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 char *operation _U_
, bool stream_is_big_endian _U_
)
328 switch(header
->message_type
) {
332 switch(header
->rep_status
) {
334 proto_tree_add_boolean(tree
, hf_CosNaming_BindingIterator_next_one_return
, tvb
, *offset
-1, 1, get_CDR_boolean(tvb
,offset
));
336 { /* Begin struct "CosNaming_Binding" */
337 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_Binding");
339 decode_CosNaming_Binding_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
340 } /* End struct "CosNaming_Binding" */
345 /* Unknown Exception */
346 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
348 } /* switch(header->rep_status) */
352 /* Unknown GIOP Message */
353 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
355 } /* switch(header->message_type) */
359 * IDL:omg.org/CosNaming/NamingContext/list:1.0
362 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 char *operation _U_
, bool stream_is_big_endian _U_
)
364 /* Operation specific Variable declarations Begin */
365 uint32_t u_octet4_loop_CosNaming_NamingContext_list_bl
;
366 uint32_t i_CosNaming_NamingContext_list_bl
;
367 /* Operation specific Variable declarations End */
369 switch(header
->message_type
) {
371 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
));
375 switch(header
->rep_status
) {
377 /* Function returns void */
379 u_octet4_loop_CosNaming_NamingContext_list_bl
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
380 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_list_bl_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_list_bl
);
383 proto_tree
*tree_bak_5xFdi4agCjhj
= tree
;
384 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_list_bl");
385 for (i_CosNaming_NamingContext_list_bl
=0; i_CosNaming_NamingContext_list_bl
< u_octet4_loop_CosNaming_NamingContext_list_bl
; i_CosNaming_NamingContext_list_bl
++) {
387 { /* Begin struct "CosNaming_Binding" */
388 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_Binding");
390 decode_CosNaming_Binding_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
391 } /* End struct "CosNaming_Binding" */
393 tree
= tree_bak_5xFdi4agCjhj
;
396 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
402 /* Unknown Exception */
403 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
405 } /* switch(header->rep_status) */
409 /* Unknown GIOP Message */
410 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
412 } /* switch(header->message_type) */
416 * IDL:omg.org/CosNaming/NamingContext/destroy:1.0
419 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 char *operation _U_
, bool stream_is_big_endian _U_
)
421 switch(header
->message_type
) {
425 switch(header
->rep_status
) {
427 /* Function returns void */
433 /* Unknown Exception */
434 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
436 } /* switch(header->rep_status) */
440 /* Unknown GIOP Message */
441 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
443 } /* switch(header->message_type) */
447 * IDL:omg.org/CosNaming/NamingContext/bind_new_context:1.0
450 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 char *operation _U_
, bool stream_is_big_endian _U_
)
452 /* Operation specific Variable declarations Begin */
453 uint32_t u_octet4_loop_CosNaming_NamingContext_bind_new_context_n
;
454 uint32_t i_CosNaming_NamingContext_bind_new_context_n
;
455 /* Operation specific Variable declarations End */
457 switch(header
->message_type
) {
459 u_octet4_loop_CosNaming_NamingContext_bind_new_context_n
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
460 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_bind_new_context_n_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_bind_new_context_n
);
463 proto_tree
*tree_bak_EvONX2gOyah6
= tree
;
464 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_bind_new_context_n");
465 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
++) {
467 { /* Begin struct "CosNaming_NameComponent" */
468 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
470 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
471 } /* End struct "CosNaming_NameComponent" */
473 tree
= tree_bak_EvONX2gOyah6
;
478 switch(header
->rep_status
) {
480 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
486 /* Unknown Exception */
487 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
489 } /* switch(header->rep_status) */
493 /* Unknown GIOP Message */
494 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
496 } /* switch(header->message_type) */
500 * IDL:omg.org/CosNaming/NamingContext/new_context:1.0
503 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 char *operation _U_
, bool stream_is_big_endian _U_
)
505 switch(header
->message_type
) {
509 switch(header
->rep_status
) {
511 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
517 /* Unknown Exception */
518 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
520 } /* switch(header->rep_status) */
524 /* Unknown GIOP Message */
525 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
527 } /* switch(header->message_type) */
531 * IDL:omg.org/CosNaming/NamingContext/unbind:1.0
534 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 char *operation _U_
, bool stream_is_big_endian _U_
)
536 /* Operation specific Variable declarations Begin */
537 uint32_t u_octet4_loop_CosNaming_NamingContext_unbind_n
;
538 uint32_t i_CosNaming_NamingContext_unbind_n
;
539 /* Operation specific Variable declarations End */
541 switch(header
->message_type
) {
543 u_octet4_loop_CosNaming_NamingContext_unbind_n
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
544 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_unbind_n_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_unbind_n
);
547 proto_tree
*tree_bak_5uqRsRwEVFim
= tree
;
548 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_unbind_n");
549 for (i_CosNaming_NamingContext_unbind_n
=0; i_CosNaming_NamingContext_unbind_n
< u_octet4_loop_CosNaming_NamingContext_unbind_n
; i_CosNaming_NamingContext_unbind_n
++) {
551 { /* Begin struct "CosNaming_NameComponent" */
552 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
554 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
555 } /* End struct "CosNaming_NameComponent" */
557 tree
= tree_bak_5uqRsRwEVFim
;
562 switch(header
->rep_status
) {
564 /* Function returns void */
570 /* Unknown Exception */
571 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
573 } /* switch(header->rep_status) */
577 /* Unknown GIOP Message */
578 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
580 } /* switch(header->message_type) */
584 * IDL:omg.org/CosNaming/NamingContext/resolve:1.0
587 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 char *operation _U_
, bool stream_is_big_endian _U_
)
589 /* Operation specific Variable declarations Begin */
590 uint32_t u_octet4_loop_CosNaming_NamingContext_resolve_n
;
591 uint32_t i_CosNaming_NamingContext_resolve_n
;
592 /* Operation specific Variable declarations End */
594 switch(header
->message_type
) {
596 u_octet4_loop_CosNaming_NamingContext_resolve_n
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
597 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_resolve_n_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_resolve_n
);
600 proto_tree
*tree_bak_RKEfOtemf4os
= tree
;
601 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_resolve_n");
602 for (i_CosNaming_NamingContext_resolve_n
=0; i_CosNaming_NamingContext_resolve_n
< u_octet4_loop_CosNaming_NamingContext_resolve_n
; i_CosNaming_NamingContext_resolve_n
++) {
604 { /* Begin struct "CosNaming_NameComponent" */
605 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
607 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
608 } /* End struct "CosNaming_NameComponent" */
610 tree
= tree_bak_RKEfOtemf4os
;
615 switch(header
->rep_status
) {
617 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
623 /* Unknown Exception */
624 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
626 } /* switch(header->rep_status) */
630 /* Unknown GIOP Message */
631 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
633 } /* switch(header->message_type) */
637 * IDL:omg.org/CosNaming/NamingContext/rebind_context:1.0
640 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 char *operation _U_
, bool stream_is_big_endian _U_
)
642 /* Operation specific Variable declarations Begin */
643 uint32_t u_octet4_loop_CosNaming_NamingContext_rebind_context_n
;
644 uint32_t i_CosNaming_NamingContext_rebind_context_n
;
645 /* Operation specific Variable declarations End */
647 switch(header
->message_type
) {
649 u_octet4_loop_CosNaming_NamingContext_rebind_context_n
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
650 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_rebind_context_n_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_rebind_context_n
);
653 proto_tree
*tree_bak_9TQVabcmASYc
= tree
;
654 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_rebind_context_n");
655 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
++) {
657 { /* Begin struct "CosNaming_NameComponent" */
658 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
660 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
661 } /* End struct "CosNaming_NameComponent" */
663 tree
= tree_bak_9TQVabcmASYc
;
666 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
670 switch(header
->rep_status
) {
672 /* Function returns void */
678 /* Unknown Exception */
679 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
681 } /* switch(header->rep_status) */
685 /* Unknown GIOP Message */
686 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
688 } /* switch(header->message_type) */
692 * IDL:omg.org/CosNaming/NamingContext/bind_context:1.0
695 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 char *operation _U_
, bool stream_is_big_endian _U_
)
697 /* Operation specific Variable declarations Begin */
698 uint32_t u_octet4_loop_CosNaming_NamingContext_bind_context_n
;
699 uint32_t i_CosNaming_NamingContext_bind_context_n
;
700 /* Operation specific Variable declarations End */
702 switch(header
->message_type
) {
704 u_octet4_loop_CosNaming_NamingContext_bind_context_n
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
705 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_bind_context_n_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_bind_context_n
);
708 proto_tree
*tree_bak_s91VIl9VUpG1
= tree
;
709 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_bind_context_n");
710 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
++) {
712 { /* Begin struct "CosNaming_NameComponent" */
713 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
715 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
716 } /* End struct "CosNaming_NameComponent" */
718 tree
= tree_bak_s91VIl9VUpG1
;
721 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
725 switch(header
->rep_status
) {
727 /* Function returns void */
733 /* Unknown Exception */
734 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
736 } /* switch(header->rep_status) */
740 /* Unknown GIOP Message */
741 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
743 } /* switch(header->message_type) */
747 * IDL:omg.org/CosNaming/NamingContext/rebind:1.0
750 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 char *operation _U_
, bool stream_is_big_endian _U_
)
752 /* Operation specific Variable declarations Begin */
753 uint32_t u_octet4_loop_CosNaming_NamingContext_rebind_n
;
754 uint32_t i_CosNaming_NamingContext_rebind_n
;
755 /* Operation specific Variable declarations End */
757 switch(header
->message_type
) {
759 u_octet4_loop_CosNaming_NamingContext_rebind_n
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
760 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_rebind_n_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_rebind_n
);
763 proto_tree
*tree_bak_UWooUkg0Qqpj
= tree
;
764 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_rebind_n");
765 for (i_CosNaming_NamingContext_rebind_n
=0; i_CosNaming_NamingContext_rebind_n
< u_octet4_loop_CosNaming_NamingContext_rebind_n
; i_CosNaming_NamingContext_rebind_n
++) {
767 { /* Begin struct "CosNaming_NameComponent" */
768 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
770 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
771 } /* End struct "CosNaming_NameComponent" */
773 tree
= tree_bak_UWooUkg0Qqpj
;
776 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
780 switch(header
->rep_status
) {
782 /* Function returns void */
788 /* Unknown Exception */
789 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
791 } /* switch(header->rep_status) */
795 /* Unknown GIOP Message */
796 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
798 } /* switch(header->message_type) */
802 * IDL:omg.org/CosNaming/NamingContext/bind:1.0
805 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 char *operation _U_
, bool stream_is_big_endian _U_
)
807 /* Operation specific Variable declarations Begin */
808 uint32_t u_octet4_loop_CosNaming_NamingContext_bind_n
;
809 uint32_t i_CosNaming_NamingContext_bind_n
;
810 /* Operation specific Variable declarations End */
812 switch(header
->message_type
) {
814 u_octet4_loop_CosNaming_NamingContext_bind_n
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
815 proto_tree_add_uint(tree
, hf_CosNaming_NamingContext_bind_n_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_NamingContext_bind_n
);
818 proto_tree
*tree_bak_3nWkRtOzQey4
= tree
;
819 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_NamingContext_bind_n");
820 for (i_CosNaming_NamingContext_bind_n
=0; i_CosNaming_NamingContext_bind_n
< u_octet4_loop_CosNaming_NamingContext_bind_n
; i_CosNaming_NamingContext_bind_n
++) {
822 { /* Begin struct "CosNaming_NameComponent" */
823 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
825 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
826 } /* End struct "CosNaming_NameComponent" */
828 tree
= tree_bak_3nWkRtOzQey4
;
831 get_CDR_object(tvb
, pinfo
, tree
, offset
, stream_is_big_endian
, boundary
);
835 switch(header
->rep_status
) {
837 /* Function returns void */
843 /* Unknown Exception */
844 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_exception
, "Unknown exception %d", header
->rep_status
);
846 } /* switch(header->rep_status) */
850 /* Unknown GIOP Message */
851 expert_add_info_format(pinfo
, item
, &ei_cosnaming_unknown_giop_msg
, "Unknown GIOP message %d", header
->message_type
);
853 } /* switch(header->message_type) */
856 /* Struct = IDL:omg.org/CosNaming/Binding:1.0 */
858 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 char *operation _U_
, bool stream_is_big_endian _U_
)
861 /* Operation specific Variable declarations Begin */
862 uint32_t u_octet4_loop_CosNaming_Binding_binding_name
;
863 uint32_t i_CosNaming_Binding_binding_name
;
865 /* Operation specific Variable declarations End */
867 u_octet4_loop_CosNaming_Binding_binding_name
= get_CDR_ulong(tvb
, offset
, stream_is_big_endian
, boundary
);
868 proto_tree_add_uint(tree
, hf_CosNaming_Binding_binding_name_loop
, tvb
,*offset
-4, 4, u_octet4_loop_CosNaming_Binding_binding_name
);
871 proto_tree
*tree_bak_pYEBTg0SDLpl
= tree
;
872 tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_sequence
, NULL
, "sequence CosNaming_Binding_binding_name");
873 for (i_CosNaming_Binding_binding_name
=0; i_CosNaming_Binding_binding_name
< u_octet4_loop_CosNaming_Binding_binding_name
; i_CosNaming_Binding_binding_name
++) {
875 { /* Begin struct "CosNaming_NameComponent" */
876 proto_tree
*struct_tree
= proto_tree_add_subtree(tree
, tvb
, *offset
, -1, ett_giop_struct
, NULL
, "struct CosNaming_NameComponent");
878 decode_CosNaming_NameComponent_st(tvb
, pinfo
, struct_tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
879 } /* End struct "CosNaming_NameComponent" */
881 tree
= tree_bak_pYEBTg0SDLpl
;
884 u_octet4
= get_CDR_enum(tvb
,offset
,stream_is_big_endian
, boundary
);
885 proto_tree_add_uint(tree
, hf_CosNaming_Binding_binding_type
, tvb
, *offset
-4, 4, u_octet4
);
889 /* Struct = IDL:omg.org/CosNaming/NameComponent:1.0 */
891 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 char *operation _U_
, bool stream_is_big_endian _U_
)
894 giop_add_CDR_string(tree
, tvb
, offset
, stream_is_big_endian
, boundary
, hf_CosNaming_NameComponent_id
);
896 giop_add_CDR_string(tree
, tvb
, offset
, stream_is_big_endian
, boundary
, hf_CosNaming_NameComponent_kind
);
901 * Called once we accept the packet as being for us; it sets the
902 * Protocol and Info columns and creates the top-level protocol
906 start_dissecting(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ptree
, int *offset
)
909 proto_item
*ti
= NULL
;
910 proto_tree
*tree
= NULL
; /* init later, inside if(tree) */
912 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "COSNAMING");
915 * Do not clear COL_INFO, as nothing is being written there by
916 * this dissector yet. So leave it as is from the GIOP dissector.
917 * TODO: add something useful to COL_INFO
918 * col_clear(pinfo->cinfo, COL_INFO);
922 ti
= proto_tree_add_item(ptree
, proto_cosnaming
, tvb
, *offset
, tvb_reported_length_remaining(tvb
, *offset
), ENC_NA
);
923 tree
= proto_item_add_subtree(ti
, ett_cosnaming
);
929 process_RequestOperation(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ptree
, MessageHeader
*header
, const char *operation
)
932 if(header
->message_type
== Reply
) {
933 /* fill-up info column */
934 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " op = %s",operation
);
936 /* fill-up the field */
937 pi
=proto_tree_add_string(ptree
, hf_operationrequest
, tvb
, 0, 0, operation
);
938 proto_item_set_generated(pi
);
943 dissect_cosnaming(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ptree
, int *offset
, MessageHeader
*header
, const char *operation
, char *idlname
)
945 proto_item
*item _U_
;
946 proto_tree
*tree _U_
;
947 bool stream_is_big_endian
= is_big_endian(header
); /* get endianess */
949 /* If we have a USER Exception, then decode it and return */
950 if ((header
->message_type
== Reply
) && (header
->rep_status
== USER_EXCEPTION
)) {
951 return decode_user_exception(tvb
, pinfo
, ptree
, offset
, header
, operation
, stream_is_big_endian
);
954 switch(header
->message_type
) {
959 if (strcmp(operation
, "destroy") == 0
960 && (!idlname
|| strcmp(idlname
, "CosNaming/BindingIterator") == 0)) {
961 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
962 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
963 decode_CosNaming_BindingIterator_destroy(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
967 if (strcmp(operation
, "next_n") == 0
968 && (!idlname
|| strcmp(idlname
, "CosNaming/BindingIterator") == 0)) {
969 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
970 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
971 decode_CosNaming_BindingIterator_next_n(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
975 if (strcmp(operation
, "next_one") == 0
976 && (!idlname
|| strcmp(idlname
, "CosNaming/BindingIterator") == 0)) {
977 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
978 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
979 decode_CosNaming_BindingIterator_next_one(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
983 if (strcmp(operation
, "list") == 0
984 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
985 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
986 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
987 decode_CosNaming_NamingContext_list(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
991 if (strcmp(operation
, "destroy") == 0
992 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
993 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
994 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
995 decode_CosNaming_NamingContext_destroy(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
999 if (strcmp(operation
, "bind_new_context") == 0
1000 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
1001 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
1002 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
1003 decode_CosNaming_NamingContext_bind_new_context(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
1007 if (strcmp(operation
, "new_context") == 0
1008 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
1009 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
1010 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
1011 decode_CosNaming_NamingContext_new_context(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
1015 if (strcmp(operation
, "unbind") == 0
1016 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
1017 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
1018 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
1019 decode_CosNaming_NamingContext_unbind(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
1023 if (strcmp(operation
, "resolve") == 0
1024 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
1025 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
1026 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
1027 decode_CosNaming_NamingContext_resolve(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
1031 if (strcmp(operation
, "rebind_context") == 0
1032 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
1033 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
1034 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
1035 decode_CosNaming_NamingContext_rebind_context(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
1039 if (strcmp(operation
, "bind_context") == 0
1040 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
1041 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
1042 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
1043 decode_CosNaming_NamingContext_bind_context(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
1047 if (strcmp(operation
, "rebind") == 0
1048 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
1049 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
1050 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
1051 decode_CosNaming_NamingContext_rebind(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
1055 if (strcmp(operation
, "bind") == 0
1056 && (!idlname
|| strcmp(idlname
, "CosNaming/NamingContext") == 0)) {
1057 item
= process_RequestOperation(tvb
, pinfo
, ptree
, header
, operation
); /* fill-up Request_Operation field & info column */
1058 tree
= start_dissecting(tvb
, pinfo
, ptree
, offset
);
1059 decode_CosNaming_NamingContext_bind(tvb
, pinfo
, tree
, item
, offset
, header
, operation
, stream_is_big_endian
);
1068 case CloseConnection
:
1071 return false; /* not handled yet */
1074 return false; /* not handled yet */
1081 } /* End of main dissector */
1084 /* Register the protocol with Wireshark */
1085 void proto_register_giop_cosnaming(void)
1087 /* setup list of header fields */
1088 static hf_register_info hf
[] = {
1089 /* field that indicates the currently ongoing request/reply exchange */
1090 {&hf_operationrequest
, {"Request_Operation","giop-cosnaming.Request_Operation",FT_STRING
,BASE_NONE
,NULL
,0x0,NULL
,HFILL
}},
1091 /* Operation filters */
1092 {&hf_CosNaming_BindingIterator_next_n_return
, {"Return value","giop-cosnaming.BindingIterator.next_n.return",FT_BOOLEAN
,8,NULL
,0x01,NULL
,HFILL
}},
1093 {&hf_CosNaming_BindingIterator_next_n_how_many
, {"how_many","giop-cosnaming.BindingIterator.next_n.how_many",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1094 {&hf_CosNaming_BindingIterator_next_n_bl_loop
, {"Seq length of bl","giop-cosnaming.BindingIterator.next_n.bl.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1095 {&hf_CosNaming_BindingIterator_next_one_return
, {"Return value","giop-cosnaming.BindingIterator.next_one.return",FT_BOOLEAN
,8,NULL
,0x01,NULL
,HFILL
}},
1096 {&hf_CosNaming_NamingContext_list_how_many
, {"how_many","giop-cosnaming.NamingContext.list.how_many",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1097 {&hf_CosNaming_NamingContext_list_bl_loop
, {"Seq length of bl","giop-cosnaming.NamingContext.list.bl.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1098 {&hf_CosNaming_NamingContext_bind_new_context_n_loop
, {"Seq length of n","giop-cosnaming.NamingContext.bind_new_context.n.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1099 {&hf_CosNaming_NamingContext_unbind_n_loop
, {"Seq length of n","giop-cosnaming.NamingContext.unbind.n.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1100 {&hf_CosNaming_NamingContext_resolve_n_loop
, {"Seq length of n","giop-cosnaming.NamingContext.resolve.n.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1101 {&hf_CosNaming_NamingContext_rebind_context_n_loop
, {"Seq length of n","giop-cosnaming.NamingContext.rebind_context.n.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1102 {&hf_CosNaming_NamingContext_bind_context_n_loop
, {"Seq length of n","giop-cosnaming.NamingContext.bind_context.n.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1103 {&hf_CosNaming_NamingContext_rebind_n_loop
, {"Seq length of n","giop-cosnaming.NamingContext.rebind.n.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1104 {&hf_CosNaming_NamingContext_bind_n_loop
, {"Seq length of n","giop-cosnaming.NamingContext.bind.n.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1105 /* Attribute filters */
1106 /* Struct filters */
1107 {&hf_CosNaming_Binding_binding_name_loop
, {"Seq length of Binding_binding_name","giop-cosnaming.Binding.binding_name.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1108 {&hf_CosNaming_Binding_binding_type
, {"Binding_binding_type","giop-cosnaming.Binding.binding_type",FT_UINT32
,BASE_DEC
,VALS(CosNaming_BindingType
),0x0,NULL
,HFILL
}},
1109 {&hf_CosNaming_NameComponent_id
, {"NameComponent_id","giop-cosnaming.NameComponent.id",FT_STRING
,BASE_NONE
,NULL
,0x0,NULL
,HFILL
}},
1110 {&hf_CosNaming_NameComponent_kind
, {"NameComponent_kind","giop-cosnaming.NameComponent.kind",FT_STRING
,BASE_NONE
,NULL
,0x0,NULL
,HFILL
}},
1111 /* User exception filters */
1112 {&hf_CosNaming_NamingContext_NotFound_why
, {"NotFound_why","giop-cosnaming.NamingContext.NotFound_why",FT_UINT32
,BASE_DEC
,VALS(CosNaming_NamingContext_NotFoundReason
),0x0,NULL
,HFILL
}},
1113 {&hf_CosNaming_NamingContext_NotFound_rest_of_name_loop
, {"Seq length of NotFound_rest_of_name","giop-cosnaming.NamingContext.NotFound_rest_of_name.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1114 {&hf_CosNaming_NamingContext_CannotProceed_rest_of_name_loop
, {"Seq length of CannotProceed_rest_of_name","giop-cosnaming.NamingContext.CannotProceed_rest_of_name.size",FT_UINT32
,BASE_DEC
,NULL
,0x0,NULL
,HFILL
}},
1119 static ei_register_info ei
[] = {
1120 { &ei_cosnaming_unknown_giop_msg
, { "giop-cosnaming.unknown_giop_msg", PI_PROTOCOL
, PI_WARN
, "Unknown GIOP message", EXPFILL
}},
1121 { &ei_cosnaming_unknown_exception
, { "giop-cosnaming.unknown_exception", PI_PROTOCOL
, PI_WARN
, "Unknown exception", EXPFILL
}},
1122 { &ei_cosnaming_unknown_reply_status
, { "giop-cosnaming.unknown_reply_status", PI_PROTOCOL
, PI_WARN
, "Unknown reply status", EXPFILL
}},
1125 /* setup protocol subtree array */
1127 static int *ett
[] = {
1135 expert_module_t
* expert_cosnaming
;
1138 /* Register the protocol name and description */
1139 proto_cosnaming
= proto_register_protocol("Cosnaming Dissector Using GIOP API" , "GIOP/COSNAMING", "giop-cosnaming" );
1140 proto_register_field_array(proto_cosnaming
, hf
, array_length(hf
));
1141 proto_register_subtree_array(ett
, array_length(ett
));
1143 expert_cosnaming
= expert_register_protocol(proto_cosnaming
);
1144 expert_register_field_array(expert_cosnaming
, ei
, array_length(ei
));
1147 /* register me as handler for these interfaces */
1148 void proto_reg_handoff_giop_cosnaming(void)
1150 /* Register for Explicit Dissection */
1151 register_giop_user_module(dissect_cosnaming
, "COSNAMING", "CosNaming/BindingIterator", proto_cosnaming
); /* explicit dissector */
1153 /* Register for Explicit Dissection */
1154 register_giop_user_module(dissect_cosnaming
, "COSNAMING", "CosNaming/NamingContext", proto_cosnaming
); /* explicit dissector */
1156 /* Register for Heuristic Dissection */
1157 register_giop_user(dissect_cosnaming
, "COSNAMING" ,proto_cosnaming
); /* heuristic dissector */
1162 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1167 * indent-tabs-mode: nil
1170 * ex: set shiftwidth=4 tabstop=8 expandtab:
1171 * :indentSize=4:tabSize=8:noTabs=true: