aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/giop
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-01-30 18:55:39 +0000
committerGuy Harris <guy@alum.mit.edu>2002-01-30 18:55:39 +0000
commita2e6d3175a77c06781941a8bb51e27428e282fd3 (patch)
tree1868b1ff7c23b2e40dae31a36d1d717da0f532c7 /plugins/giop
parent7b4403d361e282183b0794d6037c2847ac1944ad (diff)
Updated GIOP plugins, from Frank Singleton.
svn path=/trunk/; revision=4631
Diffstat (limited to 'plugins/giop')
-rw-r--r--plugins/giop/packet-coseventcomm.c52
-rw-r--r--plugins/giop/packet-cosnaming.c583
2 files changed, 286 insertions, 349 deletions
diff --git a/plugins/giop/packet-coseventcomm.c b/plugins/giop/packet-coseventcomm.c
index 7eb0e0aac6..7988b3560b 100644
--- a/plugins/giop/packet-coseventcomm.c
+++ b/plugins/giop/packet-coseventcomm.c
@@ -72,6 +72,22 @@ G_MODULE_EXPORT const gchar version[] = "0.0.1";
+/* Struct prototype declaration Start */
+
+
+
+/* Struct prototype declaration End */
+
+
+
+/* Union prototype declaration Start */
+
+
+
+/* Union prototype declaration End */
+
+
+
/* Initialise the protocol and subtree pointers */
static int proto_coseventcomm = -1;
@@ -117,6 +133,27 @@ static const char CosEventComm_PullConsumer_disconnect_pull_consumer_op[] = "dis
/* End Exception (containing members) String Declare */
+/*
+ * IDL Attributes Start
+ */
+
+
+
+/*
+ * IDL Attributes End
+ */
+
+
+/*
+ * IDL Enums Start
+ */
+
+
+/*
+ * IDL Enums End
+ */
+
+
/* Begin Exception Helper Functions */
@@ -143,6 +180,13 @@ static gboolean decode_user_exception(tvbuff_t *tvb, packet_info *pinfo, proto_t
}
+/* Begin Attribute Helper Functions */
+
+
+
+/* End Attribute Helper Functions */
+
+
/*
* IDL:omg.org/CosEventComm/PushConsumer/push:1.0
@@ -651,6 +695,14 @@ static gboolean dissect_coseventcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tr
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "COSEVENTCOMM");
+/*
+ * Do not clear COL_INFO, as nothing is being written there by
+ * this dissector yet. So leave it as is from the GIOP dissector.
+ * TODO: add something useful to COL_INFO
+ * if (check_col(pinfo->cinfo, COL_INFO))
+ * col_clear(pinfo->cinfo, COL_INFO);
+ */
+
if (ptree) {
ti = proto_tree_add_item(ptree, proto_coseventcomm, tvb, *offset, tvb_length(tvb) - *offset, FALSE);
tree = proto_item_add_subtree(ti, ett_coseventcomm);
diff --git a/plugins/giop/packet-cosnaming.c b/plugins/giop/packet-cosnaming.c
index 32282594f9..0f5c60a4a7 100644
--- a/plugins/giop/packet-cosnaming.c
+++ b/plugins/giop/packet-cosnaming.c
@@ -1,5 +1,4 @@
-/*
- * packet-cosnaming-idl.c
+/* packet-cosnaming.c
* Routines for IDL dissection
*
* Autogenerated from idl2eth
@@ -73,6 +72,36 @@ G_MODULE_EXPORT const gchar version[] = "0.0.1";
+/* Struct prototype declaration Start */
+
+
+
+
+/* Struct = IDL:omg.org/CosNaming/NameComponent:1.0 */
+
+static void decode_CosNaming_NameComponent_st(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, MessageHeader *header, gchar *operation);
+
+
+
+
+/* Struct = IDL:omg.org/CosNaming/Binding:1.0 */
+
+static void decode_CosNaming_Binding_st(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, MessageHeader *header, gchar *operation);
+
+
+
+/* Struct prototype declaration End */
+
+
+
+/* Union prototype declaration Start */
+
+
+
+/* Union prototype declaration End */
+
+
+
/* Initialise the protocol and subtree pointers */
static int proto_cosnaming = -1;
@@ -126,6 +155,54 @@ static const char user_exception_CosNaming_NamingContext_CannotProceed[] = "IDL:
/* End Exception (containing members) String Declare */
+/*
+ * IDL Attributes Start
+ */
+
+
+
+/*
+ * IDL Attributes End
+ */
+
+
+/*
+ * IDL Enums Start
+ */
+
+
+/*
+ * Enum = IDL:omg.org/CosNaming/BindingType:1.0
+ */
+
+
+static const value_string CosNaming_BindingType[] = {
+
+ { 0, "nobject" },
+ { 1, "ncontext" },
+ { 0, NULL },
+};
+
+
+/*
+ * Enum = IDL:omg.org/CosNaming/NamingContext/NotFoundReason:1.0
+ */
+
+
+static const value_string CosNaming_NamingContext_NotFoundReason[] = {
+
+ { 0, "missing_node" },
+ { 1, "not_context" },
+ { 2, "not_object" },
+ { 0, NULL },
+};
+
+
+/*
+ * IDL Enums End
+ */
+
+
/* Begin Exception Helper Functions */
@@ -142,7 +219,6 @@ static void decode_ex_CosNaming_NamingContext_NotFound(tvbuff_t *tvb, packet_inf
guint32 u_octet4;
guint32 u_octet4_loop_NotFound_rest_of_name;
guint32 i_NotFound_rest_of_name;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -150,12 +226,10 @@ static void decode_ex_CosNaming_NamingContext_NotFound(tvbuff_t *tvb, packet_inf
stream_is_big_endian = is_big_endian(header); /* get stream endianess */
-
- /* TODO - translate Enum val into symbolic value */
u_octet4 = get_CDR_enum(tvb,offset,stream_is_big_endian, boundary);
if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4,4,"Enum value = %u ",u_octet4);
+ proto_tree_add_text(tree,tvb,*offset-4,4,"Enum value = %u (%s)",u_octet4,val_to_str(u_octet4,CosNaming_NamingContext_NotFoundReason,"Unknown Enum Value"));
}
u_octet4_loop_NotFound_rest_of_name = get_CDR_ulong(tvb, offset, stream_is_big_endian, boundary);
@@ -165,31 +239,14 @@ static void decode_ex_CosNaming_NamingContext_NotFound(tvbuff_t *tvb, packet_inf
for (i_NotFound_rest_of_name=0; i_NotFound_rest_of_name < u_octet4_loop_NotFound_rest_of_name; i_NotFound_rest_of_name++) {
- /* Begin struct "NameComponent" */
+ /* Begin struct "CosNaming_NameComponent" */
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
- g_free(seq); /* free buffer */
- seq = NULL;
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -207,8 +264,6 @@ static void decode_ex_CosNaming_NamingContext_CannotProceed(tvbuff_t *tvb, packe
guint32 u_octet4_loop_CannotProceed_rest_of_name;
guint32 i_CannotProceed_rest_of_name;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -226,31 +281,14 @@ static void decode_ex_CosNaming_NamingContext_CannotProceed(tvbuff_t *tvb, packe
for (i_CannotProceed_rest_of_name=0; i_CannotProceed_rest_of_name < u_octet4_loop_CannotProceed_rest_of_name; i_CannotProceed_rest_of_name++) {
- /* Begin struct "NameComponent" */
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
+ /* Begin struct "CosNaming_NameComponent" */
- g_free(seq); /* free buffer */
- seq = NULL;
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -291,6 +329,13 @@ static gboolean decode_user_exception(tvbuff_t *tvb, packet_info *pinfo, proto_t
}
+/* Begin Attribute Helper Functions */
+
+
+
+/* End Attribute Helper Functions */
+
+
/*
* IDL:omg.org/CosNaming/NamingContext/bind:1.0
@@ -306,8 +351,6 @@ static void decode_CosNaming_NamingContext_bind(tvbuff_t *tvb, packet_info *pinf
guint32 u_octet4_loop_n;
guint32 i_n;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -325,31 +368,14 @@ static void decode_CosNaming_NamingContext_bind(tvbuff_t *tvb, packet_info *pinf
for (i_n=0; i_n < u_octet4_loop_n; i_n++) {
- /* Begin struct "NameComponent" */
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
+ /* Begin struct "CosNaming_NameComponent" */
- g_free(seq); /* free buffer */
- seq = NULL;
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -418,8 +444,6 @@ static void decode_CosNaming_NamingContext_rebind(tvbuff_t *tvb, packet_info *pi
guint32 u_octet4_loop_n;
guint32 i_n;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -437,31 +461,14 @@ static void decode_CosNaming_NamingContext_rebind(tvbuff_t *tvb, packet_info *pi
for (i_n=0; i_n < u_octet4_loop_n; i_n++) {
- /* Begin struct "NameComponent" */
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
+ /* Begin struct "CosNaming_NameComponent" */
- g_free(seq); /* free buffer */
- seq = NULL;
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -530,8 +537,6 @@ static void decode_CosNaming_NamingContext_bind_context(tvbuff_t *tvb, packet_in
guint32 u_octet4_loop_n;
guint32 i_n;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -549,31 +554,14 @@ static void decode_CosNaming_NamingContext_bind_context(tvbuff_t *tvb, packet_in
for (i_n=0; i_n < u_octet4_loop_n; i_n++) {
- /* Begin struct "NameComponent" */
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
+ /* Begin struct "CosNaming_NameComponent" */
- g_free(seq); /* free buffer */
- seq = NULL;
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -642,8 +630,6 @@ static void decode_CosNaming_NamingContext_rebind_context(tvbuff_t *tvb, packet_
guint32 u_octet4_loop_n;
guint32 i_n;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -661,31 +647,14 @@ static void decode_CosNaming_NamingContext_rebind_context(tvbuff_t *tvb, packet_
for (i_n=0; i_n < u_octet4_loop_n; i_n++) {
- /* Begin struct "NameComponent" */
+ /* Begin struct "CosNaming_NameComponent" */
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
- g_free(seq); /* free buffer */
- seq = NULL;
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -754,8 +723,6 @@ static void decode_CosNaming_NamingContext_resolve(tvbuff_t *tvb, packet_info *p
guint32 u_octet4_loop_n;
guint32 i_n;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -773,31 +740,14 @@ static void decode_CosNaming_NamingContext_resolve(tvbuff_t *tvb, packet_info *p
for (i_n=0; i_n < u_octet4_loop_n; i_n++) {
- /* Begin struct "NameComponent" */
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
+ /* Begin struct "CosNaming_NameComponent" */
- g_free(seq); /* free buffer */
- seq = NULL;
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -862,8 +812,6 @@ static void decode_CosNaming_NamingContext_unbind(tvbuff_t *tvb, packet_info *pi
guint32 u_octet4_loop_n;
guint32 i_n;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -881,31 +829,14 @@ static void decode_CosNaming_NamingContext_unbind(tvbuff_t *tvb, packet_info *pi
for (i_n=0; i_n < u_octet4_loop_n; i_n++) {
- /* Begin struct "NameComponent" */
+ /* Begin struct "CosNaming_NameComponent" */
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
-
- g_free(seq); /* free buffer */
- seq = NULL;
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -1040,8 +971,6 @@ static void decode_CosNaming_NamingContext_bind_new_context(tvbuff_t *tvb, packe
guint32 u_octet4_loop_n;
guint32 i_n;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -1059,31 +988,14 @@ static void decode_CosNaming_NamingContext_bind_new_context(tvbuff_t *tvb, packe
for (i_n=0; i_n < u_octet4_loop_n; i_n++) {
- /* Begin struct "NameComponent" */
+ /* Begin struct "CosNaming_NameComponent" */
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
- g_free(seq); /* free buffer */
- seq = NULL;
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
- g_free(seq); /* free buffer */
- seq = NULL;
- /* End struct "NameComponent" */
+ /* End struct "CosNaming_NameComponent" */
}
@@ -1219,9 +1131,6 @@ static void decode_CosNaming_NamingContext_list(tvbuff_t *tvb, packet_info *pinf
guint32 u_octet4;
guint32 u_octet4_loop_bl;
guint32 i_bl;
- guint32 u_octet4_loop_Binding_binding_name;
- guint32 i_Binding_binding_name;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -1256,52 +1165,14 @@ static void decode_CosNaming_NamingContext_list(tvbuff_t *tvb, packet_info *pinf
for (i_bl=0; i_bl < u_octet4_loop_bl; i_bl++) {
- /* Begin struct "Binding" */
-
- u_octet4_loop_Binding_binding_name = get_CDR_ulong(tvb, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4, 4 ,"Seq length of Binding_binding_name = %u",u_octet4_loop_Binding_binding_name);
- }
-
- for (i_Binding_binding_name=0; i_Binding_binding_name < u_octet4_loop_Binding_binding_name; i_Binding_binding_name++) {
+ /* Begin struct "CosNaming_Binding" */
- /* Begin struct "NameComponent" */
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
-
- g_free(seq); /* free buffer */
- seq = NULL;
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
-
- g_free(seq); /* free buffer */
- seq = NULL;
-
- /* End struct "NameComponent" */
-
- }
+
+ decode_CosNaming_Binding_st(tvb, pinfo, tree, offset, header, operation);
- /* TODO - translate Enum val into symbolic value */
-
- u_octet4 = get_CDR_enum(tvb,offset,stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4,4,"Enum value = %u ",u_octet4);
- }
- /* End struct "Binding" */
+ /* End struct "CosNaming_Binding" */
}
@@ -1357,10 +1228,6 @@ static void decode_CosNaming_BindingIterator_next_one(tvbuff_t *tvb, packet_info
/* Operation specific Variable declarations Begin */
guint8 u_octet1;
- guint32 u_octet4_loop_Binding_binding_name;
- guint32 i_Binding_binding_name;
- guint32 u_octet4;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -1381,55 +1248,17 @@ static void decode_CosNaming_BindingIterator_next_one(tvbuff_t *tvb, packet_info
u_octet1 = get_CDR_boolean(tvb,offset);
if (tree) {
- proto_tree_add_text(tree,tvb,*offset-1,1,"Operation Return Value = %u",u_octet1);
- }
-
- /* Begin struct "Binding" */
-
- u_octet4_loop_Binding_binding_name = get_CDR_ulong(tvb, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4, 4 ,"Seq length of Binding_binding_name = %u",u_octet4_loop_Binding_binding_name);
+ proto_tree_add_text(tree,tvb,*offset-1,1,"Operation_Return_Value = %u",u_octet1);
}
- for (i_Binding_binding_name=0; i_Binding_binding_name < u_octet4_loop_Binding_binding_name; i_Binding_binding_name++) {
+ /* Begin struct "CosNaming_Binding" */
- /* Begin struct "NameComponent" */
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
-
- g_free(seq); /* free buffer */
- seq = NULL;
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
-
- g_free(seq); /* free buffer */
- seq = NULL;
-
- /* End struct "NameComponent" */
-
- }
+
+ decode_CosNaming_Binding_st(tvb, pinfo, tree, offset, header, operation);
- /* TODO - translate Enum val into symbolic value */
-
- u_octet4 = get_CDR_enum(tvb,offset,stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4,4,"Enum value = %u ",u_octet4);
- }
- /* End struct "Binding" */
+ /* End struct "CosNaming_Binding" */
break;
@@ -1483,9 +1312,6 @@ static void decode_CosNaming_BindingIterator_next_n(tvbuff_t *tvb, packet_info *
guint8 u_octet1;
guint32 u_octet4_loop_bl;
guint32 i_bl;
- guint32 u_octet4_loop_Binding_binding_name;
- guint32 i_Binding_binding_name;
- gchar *seq = NULL;
/* Operation specific Variable declarations End */
@@ -1511,7 +1337,7 @@ static void decode_CosNaming_BindingIterator_next_n(tvbuff_t *tvb, packet_info *
u_octet1 = get_CDR_boolean(tvb,offset);
if (tree) {
- proto_tree_add_text(tree,tvb,*offset-1,1,"Operation Return Value = %u",u_octet1);
+ proto_tree_add_text(tree,tvb,*offset-1,1,"Operation_Return_Value = %u",u_octet1);
}
u_octet4_loop_bl = get_CDR_ulong(tvb, offset, stream_is_big_endian, boundary);
@@ -1521,52 +1347,14 @@ static void decode_CosNaming_BindingIterator_next_n(tvbuff_t *tvb, packet_info *
for (i_bl=0; i_bl < u_octet4_loop_bl; i_bl++) {
- /* Begin struct "Binding" */
-
- u_octet4_loop_Binding_binding_name = get_CDR_ulong(tvb, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4, 4 ,"Seq length of Binding_binding_name = %u",u_octet4_loop_Binding_binding_name);
- }
+ /* Begin struct "CosNaming_Binding" */
- for (i_Binding_binding_name=0; i_Binding_binding_name < u_octet4_loop_Binding_binding_name; i_Binding_binding_name++) {
- /* Begin struct "NameComponent" */
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
-
- }
-
- g_free(seq); /* free buffer */
- seq = NULL;
-
- u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
-
- }
-
- g_free(seq); /* free buffer */
- seq = NULL;
-
- /* End struct "NameComponent" */
-
- }
+
+ decode_CosNaming_Binding_st(tvb, pinfo, tree, offset, header, operation);
- /* TODO - translate Enum val into symbolic value */
-
- u_octet4 = get_CDR_enum(tvb,offset,stream_is_big_endian, boundary);
- if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4,4,"Enum value = %u ",u_octet4);
- }
-
- /* End struct "Binding" */
+ /* End struct "CosNaming_Binding" */
}
@@ -1675,6 +1463,95 @@ static void decode_CosNaming_BindingIterator_destroy(tvbuff_t *tvb, packet_info
}
+
+/* Struct = IDL:omg.org/CosNaming/NameComponent:1.0 */
+
+static void decode_CosNaming_NameComponent_st(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, MessageHeader *header, gchar *operation) {
+
+ gboolean stream_is_big_endian; /* big endianess */
+
+
+ /* Operation specific Variable declarations Begin */
+
+ guint32 u_octet4;
+ gchar *seq = NULL;
+
+ /* Operation specific Variable declarations End */
+
+
+ stream_is_big_endian = is_big_endian(header); /* get stream endianess */
+
+
+ u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
+ if (tree) {
+ proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
+ if (u_octet4 > 0)
+ proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_id = %s",seq);
+
+ }
+
+ g_free(seq); /* free buffer */
+ seq = NULL;
+
+ u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
+ if (tree) {
+ proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
+ if (u_octet4 > 0)
+ proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"NameComponent_kind = %s",seq);
+
+ }
+
+ g_free(seq); /* free buffer */
+ seq = NULL;
+
+}
+
+
+/* Struct = IDL:omg.org/CosNaming/Binding:1.0 */
+
+static void decode_CosNaming_Binding_st(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, MessageHeader *header, gchar *operation) {
+
+ gboolean stream_is_big_endian; /* big endianess */
+
+
+ /* Operation specific Variable declarations Begin */
+
+ guint32 u_octet4_loop_Binding_binding_name;
+ guint32 i_Binding_binding_name;
+ guint32 u_octet4;
+
+ /* Operation specific Variable declarations End */
+
+
+ stream_is_big_endian = is_big_endian(header); /* get stream endianess */
+
+
+ u_octet4_loop_Binding_binding_name = get_CDR_ulong(tvb, offset, stream_is_big_endian, boundary);
+ if (tree) {
+ proto_tree_add_text(tree,tvb,*offset-4, 4 ,"Seq length of Binding_binding_name = %u",u_octet4_loop_Binding_binding_name);
+ }
+
+ for (i_Binding_binding_name=0; i_Binding_binding_name < u_octet4_loop_Binding_binding_name; i_Binding_binding_name++) {
+
+ /* Begin struct "CosNaming_NameComponent" */
+
+
+
+ decode_CosNaming_NameComponent_st(tvb, pinfo, tree, offset, header, operation);
+
+
+ /* End struct "CosNaming_NameComponent" */
+
+ }
+
+
+ u_octet4 = get_CDR_enum(tvb,offset,stream_is_big_endian, boundary);
+ if (tree) {
+ proto_tree_add_text(tree,tvb,*offset-4,4,"Enum value = %u (%s)",u_octet4,val_to_str(u_octet4,CosNaming_BindingType,"Unknown Enum Value"));
+ }
+
+}
+
static gboolean dissect_cosnaming(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree, int *offset, MessageHeader *header, gchar *operation, gchar *idlname) {
proto_item *ti = NULL;
@@ -1686,6 +1563,14 @@ static gboolean dissect_cosnaming(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "COSNAMING");
+/*
+ * 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
+ * if (check_col(pinfo->cinfo, COL_INFO))
+ * col_clear(pinfo->cinfo, COL_INFO);
+ */
+
if (ptree) {
ti = proto_tree_add_item(ptree, proto_cosnaming, tvb, *offset, tvb_length(tvb) - *offset, FALSE);
tree = proto_item_add_subtree(ti, ett_cosnaming);