aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/asn1.h4
-rw-r--r--epan/dissectors/packet-h225.c2
-rw-r--r--epan/dissectors/packet-h450-ros.c99
-rw-r--r--epan/dissectors/packet-h450-ros.h4
-rw-r--r--epan/dissectors/packet-h450.c2
-rw-r--r--epan/dissectors/packet-q932-ros.c112
-rw-r--r--epan/libwireshark.def1
7 files changed, 151 insertions, 73 deletions
diff --git a/epan/asn1.h b/epan/asn1.h
index 02d5a51a62..aafad94e8a 100644
--- a/epan/asn1.h
+++ b/epan/asn1.h
@@ -141,7 +141,11 @@ typedef struct _rose_ctx_t {
dissector_table_t res_local_dissector_table;
dissector_table_t err_global_dissector_table;
dissector_table_t err_local_dissector_table;
+ /* filling in description into tree, info column, any buffer */
int apdu_depth;
+ gboolean fillin_info;
+ gchar *fillin_ptr;
+ gsize fillin_buf_size;
struct { /* "dynamic" data */
gint pdu;
/*
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index 6c61ee39be..1962bb3b40 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -7505,7 +7505,7 @@ void proto_register_h225(void) {
"h225.T_h4501SupplementaryService", HFILL }},
{ &hf_h225_h4501SupplementaryService_item,
{ "Item", "h225.h4501SupplementaryService_item",
- FT_BYTES, BASE_HEX, NULL, 0,
+ FT_UINT32, BASE_DEC, NULL, 0,
"h225.T_h4501SupplementaryService_item", HFILL }},
{ &hf_h225_h245Tunneling,
{ "h245Tunneling", "h225.h245Tunneling",
diff --git a/epan/dissectors/packet-h450-ros.c b/epan/dissectors/packet-h450-ros.c
index a56ead68a3..5b2784e397 100644
--- a/epan/dissectors/packet-h450-ros.c
+++ b/epan/dissectors/packet-h450-ros.c
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
-/* .\packet-h450-ros.c */
-/* ../../tools/asn2wrs.py -e -p h450.ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
+/* ./packet-h450-ros.c */
+/* ../../tools/asn2wrs.py -e -p h450.ros -I ../ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
/* Input file: packet-h450-ros-template.c */
@@ -208,35 +208,45 @@ static const per_sequence_t Invoke_sequence[] = {
static int
dissect_h450_ros_Invoke(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 76 "h450-ros.cnf"
+#line 8 "ros-inv.cnf"
dissector_handle_t arg_handle = NULL;
+ const gchar *descr = "";
arg_next_tvb = NULL;
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h450_ros_Invoke, Invoke_sequence);
-#line 80 "h450-ros.cnf"
+#line 13 "ros-inv.cnf"
actx->rose_ctx->d.pdu = 1;
- if (actx->rose_ctx->d.code == 0) {
+ if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->arg_local_dissector_table) {
arg_handle = dissector_get_port_handle(actx->rose_ctx->arg_local_dissector_table, actx->rose_ctx->d.code_local);
- } else if (actx->rose_ctx->d.code == 1) {
+ } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->arg_global_dissector_table) {
arg_handle = dissector_get_string_handle(actx->rose_ctx->arg_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
arg_handle = NULL;
}
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " INV:");
if (!arg_handle ||
!proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) {
if (actx->rose_ctx->d.code == 0)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local);
+ descr = ep_strdup_printf("INV: %d", actx->rose_ctx->d.code_local);
else if (actx->rose_ctx->d.code == 1)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global);
+ descr = ep_strdup_printf("INV: %s", actx->rose_ctx->d.code_global);
+ } else {
+ descr = ep_strdup_printf("INV:");
}
+
+ if (actx->rose_ctx->apdu_depth >= 0)
+ proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
+ if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
+ col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
+ if (actx->rose_ctx->fillin_ptr)
+ g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
+
if (!arg_next_tvb) { /* empty argument */
- arg_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0);
+ arg_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
}
actx->pinfo->private_data = actx->rose_ctx;
call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree);
@@ -277,37 +287,45 @@ static const per_sequence_t ReturnResult_sequence[] = {
static int
dissect_h450_ros_ReturnResult(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 116 "h450-ros.cnf"
+#line 7 "ros-res.cnf"
dissector_handle_t res_handle = NULL;
+ const gchar *descr = "";
res_next_tvb = NULL;
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h450_ros_ReturnResult, ReturnResult_sequence);
-#line 120 "h450-ros.cnf"
+#line 12 "ros-res.cnf"
actx->rose_ctx->d.pdu = 2;
- if (actx->rose_ctx->d.code == 0) {
+ if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->res_local_dissector_table) {
res_handle = dissector_get_port_handle(actx->rose_ctx->res_local_dissector_table, actx->rose_ctx->d.code_local);
- } else if (actx->rose_ctx->d.code == 1) {
+ } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->res_global_dissector_table) {
res_handle = dissector_get_string_handle(actx->rose_ctx->res_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
res_handle = NULL;
}
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " RES:");
if (!res_handle ||
!proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) {
if (actx->rose_ctx->d.code == 0)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local);
+ descr = ep_strdup_printf("RES: %d", actx->rose_ctx->d.code_local);
else if (actx->rose_ctx->d.code == 1)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global);
- else if (actx->rose_ctx->d.code == -1) /* Code not available */
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " -");
+ descr = ep_strdup_printf("RES: %s", actx->rose_ctx->d.code_global);
+ } else {
+ descr = ep_strdup_printf("RES:");
}
+
+ if (actx->rose_ctx->apdu_depth >= 0)
+ proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
+ if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
+ col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
+ if (actx->rose_ctx->fillin_ptr)
+ g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
+
if (!res_next_tvb) { /* empty result */
- res_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0);
+ res_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
}
actx->pinfo->private_data = actx->rose_ctx;
call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree);
@@ -334,35 +352,45 @@ static const per_sequence_t ReturnError_sequence[] = {
static int
dissect_h450_ros_ReturnError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 157 "h450-ros.cnf"
+#line 7 "ros-err.cnf"
dissector_handle_t err_handle = NULL;
+ const gchar *descr = "";
err_next_tvb = NULL;
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h450_ros_ReturnError, ReturnError_sequence);
-#line 161 "h450-ros.cnf"
+#line 12 "ros-err.cnf"
actx->rose_ctx->d.pdu = 3;
- if (actx->rose_ctx->d.code == 0) {
+ if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->err_local_dissector_table) {
err_handle = dissector_get_port_handle(actx->rose_ctx->err_local_dissector_table, actx->rose_ctx->d.code_local);
- } else if (actx->rose_ctx->d.code == 1) {
+ } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->err_global_dissector_table) {
err_handle = dissector_get_string_handle(actx->rose_ctx->err_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
err_handle = NULL;
}
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " ERR:");
if (!err_handle ||
!proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) {
if (actx->rose_ctx->d.code == 0)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local);
+ descr = ep_strdup_printf("ERR: %d", actx->rose_ctx->d.code_local);
else if (actx->rose_ctx->d.code == 1)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global);
+ descr = ep_strdup_printf("ERR: %s", actx->rose_ctx->d.code_global);
+ } else {
+ descr = ep_strdup_printf("ERR:");
}
+
+ if (actx->rose_ctx->apdu_depth >= 0)
+ proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
+ if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
+ col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
+ if (actx->rose_ctx->fillin_ptr)
+ g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
+
if (!err_next_tvb) { /* empty error */
- err_next_tvb = tvb_new_subset(tvb, offset>>3, 0, 0);
+ err_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
}
actx->pinfo->private_data = actx->rose_ctx;
call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree);
@@ -488,14 +516,23 @@ static const per_sequence_t Reject_sequence[] = {
static int
dissect_h450_ros_Reject(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 189 "h450-ros.cnf"
+#line 7 "ros-rej.cnf"
+ const gchar *descr = "";
+
problem_str[0] = '\0';
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h450_ros_Reject, Reject_sequence);
-#line 191 "h450-ros.cnf"
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " REJ: %s", problem_str);
+#line 11 "ros-rej.cnf"
+ descr = ep_strdup_printf("REJ: %s", problem_str);
+
+ if (actx->rose_ctx->apdu_depth >= 0)
+ proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
+ if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
+ col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
+ if (actx->rose_ctx->fillin_ptr)
+ g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
return offset;
}
diff --git a/epan/dissectors/packet-h450-ros.h b/epan/dissectors/packet-h450-ros.h
index fc790fcb49..935357c847 100644
--- a/epan/dissectors/packet-h450-ros.h
+++ b/epan/dissectors/packet-h450-ros.h
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
-/* .\packet-h450-ros.h */
-/* ../../tools/asn2wrs.py -e -p h450.ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
+/* ./packet-h450-ros.h */
+/* ../../tools/asn2wrs.py -e -p h450.ros -I ../ros -c h450-ros.cnf -o h450-ros -s packet-h450-ros-template ../ros/Remote-Operations-Information-Objects.asn Remote-Operations-Apdus.asn */
/* Input file: packet-h450-ros-template.h */
diff --git a/epan/dissectors/packet-h450.c b/epan/dissectors/packet-h450.c
index 05db2fc411..9922326249 100644
--- a/epan/dissectors/packet-h450.c
+++ b/epan/dissectors/packet-h450.c
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
-/* .\packet-h450.c */
+/* ./packet-h450.c */
/* ../../tools/asn2wrs.py -c h450.cnf -s packet-h450-template H4501-Supplementary-ServiceAPDU-Structure.asn Addressing-Data-Elements.asn H225-generic-parameters-definition.asn Manufacturer-specific-service-extension-definition.asn H4501-General-Error-List.asn Call-Transfer-Operations.asn Call-Diversion-Operations.asn Call-Hold-Operations.asn Call-Park-Pickup-Operations.asn Call-Waiting-Operations.asn Message-Waiting-Indication-Operations.asn Name-Operations.asn Call-Completion-Operations.asn Call-Offer-Operations.asn Call-Intrusion-Operations.asn Common-Information-Operations.asn */
/* Input file: packet-h450-template.c */
diff --git a/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c
index d353396031..5e57ce353b 100644
--- a/epan/dissectors/packet-q932-ros.c
+++ b/epan/dissectors/packet-q932-ros.c
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* ./packet-q932-ros.c */
-/* ../../tools/asn2wrs.py -b -T -X -e -p q932.ros -c q932-ros.cnf -o q932-ros -s packet-q932-ros-template ../ros/Remote-Operations-Information-Objects.asn Facility-Information-Element-Components.asn */
+/* ../../tools/asn2wrs.py -b -T -X -p q932.ros -I ../ros -c q932-ros.cnf -o q932-ros -s packet-q932-ros-template ../ros/Remote-Operations-Information-Objects.asn Facility-Information-Element-Components.asn */
/* Input file: packet-q932-ros-template.c */
@@ -38,7 +38,6 @@
#include <string.h>
#include <epan/packet.h>
-#include <epan/prefs.h>
#include <epan/strutil.h>
#include <epan/emem.h>
#include <epan/asn1.h>
@@ -80,7 +79,7 @@ static int hf_q932_ros_present = -1; /* INTEGER */
static int hf_q932_ros_InvokeId_present = -1; /* InvokeId_present */
/*--- End of included file: packet-q932-ros-hf.c ---*/
-#line 47 "packet-q932-ros-template.c"
+#line 46 "packet-q932-ros-template.c"
/* Initialize the subtree pointers */
@@ -98,7 +97,7 @@ static gint ett_q932_ros_T_problem = -1;
static gint ett_q932_ros_InvokeId = -1;
/*--- End of included file: packet-q932-ros-ett.c ---*/
-#line 50 "packet-q932-ros-template.c"
+#line 49 "packet-q932-ros-template.c"
/* Preferences */
@@ -257,7 +256,6 @@ dissect_q932_ros_InvokeArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
offset += tvb_length_remaining(tvb, offset);
-
return offset;
}
@@ -272,35 +270,45 @@ static const ber_sequence_t Invoke_sequence[] = {
static int
dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 79 "q932-ros.cnf"
+#line 8 "ros-inv.cnf"
dissector_handle_t arg_handle = NULL;
+ const gchar *descr = "";
arg_next_tvb = NULL;
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
Invoke_sequence, hf_index, ett_q932_ros_Invoke);
-#line 83 "q932-ros.cnf"
+#line 13 "ros-inv.cnf"
actx->rose_ctx->d.pdu = 1;
- if (actx->rose_ctx->d.code == 0) {
+ if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->arg_local_dissector_table) {
arg_handle = dissector_get_port_handle(actx->rose_ctx->arg_local_dissector_table, actx->rose_ctx->d.code_local);
- } else if (actx->rose_ctx->d.code == 1) {
+ } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->arg_global_dissector_table) {
arg_handle = dissector_get_string_handle(actx->rose_ctx->arg_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
arg_handle = NULL;
}
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " INV:");
if (!arg_handle ||
!proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) {
if (actx->rose_ctx->d.code == 0)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local);
+ descr = ep_strdup_printf("INV: %d", actx->rose_ctx->d.code_local);
else if (actx->rose_ctx->d.code == 1)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global);
+ descr = ep_strdup_printf("INV: %s", actx->rose_ctx->d.code_global);
+ } else {
+ descr = ep_strdup_printf("INV:");
}
+
+ if (actx->rose_ctx->apdu_depth >= 0)
+ proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
+ if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
+ col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
+ if (actx->rose_ctx->fillin_ptr)
+ g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
+
if (!arg_next_tvb) { /* empty argument */
- arg_next_tvb = tvb_new_subset(tvb, offset, 0, 0);
+ arg_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
}
actx->pinfo->private_data = actx->rose_ctx;
call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree);
@@ -312,7 +320,7 @@ dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
static int
dissect_q932_ros_ResultArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 115 "q932-ros.cnf"
+#line 87 "q932-ros.cnf"
gint len;
len = tvb_length_remaining(tvb, offset);
@@ -351,35 +359,45 @@ static const ber_sequence_t ReturnResult_sequence[] = {
static int
dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 125 "q932-ros.cnf"
+#line 7 "ros-res.cnf"
dissector_handle_t res_handle = NULL;
+ const gchar *descr = "";
res_next_tvb = NULL;
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
ReturnResult_sequence, hf_index, ett_q932_ros_ReturnResult);
-#line 129 "q932-ros.cnf"
+#line 12 "ros-res.cnf"
actx->rose_ctx->d.pdu = 2;
- if (actx->rose_ctx->d.code == 0) {
+ if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->res_local_dissector_table) {
res_handle = dissector_get_port_handle(actx->rose_ctx->res_local_dissector_table, actx->rose_ctx->d.code_local);
- } else if (actx->rose_ctx->d.code == 1) {
+ } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->res_global_dissector_table) {
res_handle = dissector_get_string_handle(actx->rose_ctx->res_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
res_handle = NULL;
}
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " RES:");
if (!res_handle ||
!proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) {
if (actx->rose_ctx->d.code == 0)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local);
+ descr = ep_strdup_printf("RES: %d", actx->rose_ctx->d.code_local);
else if (actx->rose_ctx->d.code == 1)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global);
+ descr = ep_strdup_printf("RES: %s", actx->rose_ctx->d.code_global);
+ } else {
+ descr = ep_strdup_printf("RES:");
}
+
+ if (actx->rose_ctx->apdu_depth >= 0)
+ proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
+ if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
+ col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
+ if (actx->rose_ctx->fillin_ptr)
+ g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
+
if (!res_next_tvb) { /* empty result */
- res_next_tvb = tvb_new_subset(tvb, offset, 0, 0);
+ res_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
}
actx->pinfo->private_data = actx->rose_ctx;
call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree);
@@ -391,7 +409,7 @@ dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
static int
dissect_q932_ros_T_parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 160 "q932-ros.cnf"
+#line 106 "q932-ros.cnf"
gint len;
@@ -403,7 +421,6 @@ dissect_q932_ros_T_parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
offset += tvb_length_remaining(tvb, offset);
-
return offset;
}
@@ -417,35 +434,45 @@ static const ber_sequence_t ReturnError_sequence[] = {
static int
dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 171 "q932-ros.cnf"
+#line 7 "ros-err.cnf"
dissector_handle_t err_handle = NULL;
+ const gchar *descr = "";
err_next_tvb = NULL;
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
ReturnError_sequence, hf_index, ett_q932_ros_ReturnError);
-#line 175 "q932-ros.cnf"
+#line 12 "ros-err.cnf"
actx->rose_ctx->d.pdu = 3;
- if (actx->rose_ctx->d.code == 0) {
+ if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->err_local_dissector_table) {
err_handle = dissector_get_port_handle(actx->rose_ctx->err_local_dissector_table, actx->rose_ctx->d.code_local);
- } else if (actx->rose_ctx->d.code == 1) {
+ } else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->err_global_dissector_table) {
err_handle = dissector_get_string_handle(actx->rose_ctx->err_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
err_handle = NULL;
}
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " ERR:");
if (!err_handle ||
!proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) {
if (actx->rose_ctx->d.code == 0)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %d", actx->rose_ctx->d.code_local);
+ descr = ep_strdup_printf("ERR: %d", actx->rose_ctx->d.code_local);
else if (actx->rose_ctx->d.code == 1)
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", actx->rose_ctx->d.code_global);
+ descr = ep_strdup_printf("ERR: %s", actx->rose_ctx->d.code_global);
+ } else {
+ descr = ep_strdup_printf("ERR:");
}
+
+ if (actx->rose_ctx->apdu_depth >= 0)
+ proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
+ if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
+ col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
+ if (actx->rose_ctx->fillin_ptr)
+ g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
+
if (!err_next_tvb) { /* empty error */
- err_next_tvb = tvb_new_subset(tvb, offset, 0, 0);
+ err_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0);
}
actx->pinfo->private_data = actx->rose_ctx;
call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree);
@@ -575,14 +602,23 @@ static const ber_sequence_t Reject_sequence[] = {
static int
dissect_q932_ros_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 203 "q932-ros.cnf"
+#line 7 "ros-rej.cnf"
+ const gchar *descr = "";
+
problem_str[0] = '\0';
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
Reject_sequence, hf_index, ett_q932_ros_Reject);
-#line 205 "q932-ros.cnf"
- proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " REJ: %s", problem_str);
+#line 11 "ros-rej.cnf"
+ descr = ep_strdup_printf("REJ: %s", problem_str);
+
+ if (actx->rose_ctx->apdu_depth >= 0)
+ proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), actx->rose_ctx->apdu_depth), " %s", descr);
+ if (actx->rose_ctx->fillin_info && check_col(actx->pinfo->cinfo, COL_INFO))
+ col_append_str(actx->pinfo->cinfo, COL_INFO, descr);
+ if (actx->rose_ctx->fillin_ptr)
+ g_strlcat(actx->rose_ctx->fillin_ptr, descr, actx->rose_ctx->fillin_buf_size);
return offset;
}
@@ -630,7 +666,7 @@ static int dissect_ROS_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree
/*--- End of included file: packet-q932-ros-fn.c ---*/
-#line 65 "packet-q932-ros-template.c"
+#line 64 "packet-q932-ros-template.c"
/*--- dissect_q932_ros -----------------------------------------------------*/
static int dissect_q932_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
@@ -745,7 +781,7 @@ void proto_register_q932_ros(void) {
"q932_ros.InvokeId_present", HFILL }},
/*--- End of included file: packet-q932-ros-hfarr.c ---*/
-#line 79 "packet-q932-ros-template.c"
+#line 78 "packet-q932-ros-template.c"
};
/* List of subtrees */
@@ -765,7 +801,7 @@ void proto_register_q932_ros(void) {
&ett_q932_ros_InvokeId,
/*--- End of included file: packet-q932-ros-ettarr.c ---*/
-#line 84 "packet-q932-ros-template.c"
+#line 83 "packet-q932-ros-template.c"
};
/* Register protocol and dissector */
diff --git a/epan/libwireshark.def b/epan/libwireshark.def
index 3e93055236..5fa25162ba 100644
--- a/epan/libwireshark.def
+++ b/epan/libwireshark.def
@@ -725,6 +725,7 @@ report_open_failure
report_read_failure
reset_tap_listeners
reset_tcp_reassembly
+rose_ctx_clean_data
rose_ctx_init
rpc_init_proc_table
rpc_init_prog