From 60022bc5f200f3db70efd5c5828647082ef21dab Mon Sep 17 00:00:00 2001 From: Tomas Kukosa Date: Mon, 24 Aug 2009 09:05:15 +0000 Subject: [PATCH] Expert info for undecoded Q.932 and H.450 operations svn path=/trunk/; revision=29534 --- asn1/h450-ros/packet-h450-ros-template.c | 1 + asn1/q932-ros/packet-q932-ros-template.c | 1 + asn1/ros/ros-err.cnf | 3 +++ asn1/ros/ros-inv.cnf | 3 +++ asn1/ros/ros-res.cnf | 3 +++ epan/dissectors/packet-h450-ros.c | 20 +++++++++++++++----- epan/dissectors/packet-q932-ros.c | 20 +++++++++++++++----- 7 files changed, 41 insertions(+), 10 deletions(-) diff --git a/asn1/h450-ros/packet-h450-ros-template.c b/asn1/h450-ros/packet-h450-ros-template.c index 563d357825..77bbf25b13 100644 --- a/asn1/h450-ros/packet-h450-ros-template.c +++ b/asn1/h450-ros/packet-h450-ros-template.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "packet-per.h" diff --git a/asn1/q932-ros/packet-q932-ros-template.c b/asn1/q932-ros/packet-q932-ros-template.c index af1b6c2612..c6f5a4cd51 100644 --- a/asn1/q932-ros/packet-q932-ros-template.c +++ b/asn1/q932-ros/packet-q932-ros-template.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "packet-ber.h" diff --git a/asn1/ros/ros-err.cnf b/asn1/ros/ros-err.cnf index dba299ad1a..caa7729cfb 100644 --- a/asn1/ros/ros-err.cnf +++ b/asn1/ros/ros-err.cnf @@ -41,4 +41,7 @@ } actx->pinfo->private_data = actx->rose_ctx; call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); + if (!err_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } #.END diff --git a/asn1/ros/ros-inv.cnf b/asn1/ros/ros-inv.cnf index 3822413ed9..aa24364585 100644 --- a/asn1/ros/ros-inv.cnf +++ b/asn1/ros/ros-inv.cnf @@ -42,4 +42,7 @@ } actx->pinfo->private_data = actx->rose_ctx; call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); + if (!arg_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } #.END diff --git a/asn1/ros/ros-res.cnf b/asn1/ros/ros-res.cnf index 218d1c7357..bdf7edf1b5 100644 --- a/asn1/ros/ros-res.cnf +++ b/asn1/ros/ros-res.cnf @@ -41,4 +41,7 @@ } actx->pinfo->private_data = actx->rose_ctx; call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); + if (!res_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } #.END diff --git a/epan/dissectors/packet-h450-ros.c b/epan/dissectors/packet-h450-ros.c index 5490ccf641..5998e3280d 100644 --- a/epan/dissectors/packet-h450-ros.c +++ b/epan/dissectors/packet-h450-ros.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "packet-per.h" @@ -74,7 +75,7 @@ static int hf_h450_ros_returnResultProblem = -1; /* ReturnResultProblem */ static int hf_h450_ros_returnErrorProblem = -1; /* ReturnErrorProblem */ /*--- End of included file: packet-h450-ros-hf.c ---*/ -#line 45 "packet-h450-ros-template.c" +#line 46 "packet-h450-ros-template.c" /* Initialize the subtree pointers */ @@ -90,7 +91,7 @@ static gint ett_h450_ros_Reject = -1; static gint ett_h450_ros_T_problem = -1; /*--- End of included file: packet-h450-ros-ett.c ---*/ -#line 48 "packet-h450-ros-template.c" +#line 49 "packet-h450-ros-template.c" /* Preferences */ @@ -246,6 +247,9 @@ dissect_h450_ros_Invoke(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, } actx->pinfo->private_data = actx->rose_ctx; call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); + if (!arg_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } return offset; } @@ -325,6 +329,9 @@ dissect_h450_ros_ReturnResult(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act } actx->pinfo->private_data = actx->rose_ctx; call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); + if (!res_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } return offset; } @@ -390,6 +397,9 @@ dissect_h450_ros_ReturnError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx } actx->pinfo->private_data = actx->rose_ctx; call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); + if (!err_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } return offset; } @@ -569,7 +579,7 @@ dissect_h450_ros_ROS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr /*--- End of included file: packet-h450-ros-fn.c ---*/ -#line 75 "packet-h450-ros-template.c" +#line 76 "packet-h450-ros-template.c" /*--- proto_register_h450_ros -----------------------------------------------*/ void proto_register_h450_ros(void) { @@ -661,7 +671,7 @@ void proto_register_h450_ros(void) { "h450_ros.ReturnErrorProblem", HFILL }}, /*--- End of included file: packet-h450-ros-hfarr.c ---*/ -#line 82 "packet-h450-ros-template.c" +#line 83 "packet-h450-ros-template.c" }; /* List of subtrees */ @@ -679,7 +689,7 @@ void proto_register_h450_ros(void) { &ett_h450_ros_T_problem, /*--- End of included file: packet-h450-ros-ettarr.c ---*/ -#line 87 "packet-h450-ros-template.c" +#line 88 "packet-h450-ros-template.c" }; /* Register protocol and dissector */ diff --git a/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c index 50130006e7..166d7b6700 100644 --- a/epan/dissectors/packet-q932-ros.c +++ b/epan/dissectors/packet-q932-ros.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "packet-ber.h" @@ -78,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 45 "packet-q932-ros-template.c" +#line 46 "packet-q932-ros-template.c" /* Initialize the subtree pointers */ @@ -96,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 48 "packet-q932-ros-template.c" +#line 49 "packet-q932-ros-template.c" /* Preferences */ @@ -311,6 +312,9 @@ dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset } actx->pinfo->private_data = actx->rose_ctx; call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); + if (!arg_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } return offset; } @@ -400,6 +404,9 @@ dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int } actx->pinfo->private_data = actx->rose_ctx; call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); + if (!res_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } return offset; } @@ -475,6 +482,9 @@ dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o } actx->pinfo->private_data = actx->rose_ctx; call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); + if (!err_handle) { + expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr); + } return offset; } @@ -665,7 +675,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 63 "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) { @@ -780,7 +790,7 @@ void proto_register_q932_ros(void) { "q932_ros.InvokeId_present", HFILL }}, /*--- End of included file: packet-q932-ros-hfarr.c ---*/ -#line 77 "packet-q932-ros-template.c" +#line 78 "packet-q932-ros-template.c" }; /* List of subtrees */ @@ -800,7 +810,7 @@ void proto_register_q932_ros(void) { &ett_q932_ros_InvokeId, /*--- End of included file: packet-q932-ros-ettarr.c ---*/ -#line 82 "packet-q932-ros-template.c" +#line 83 "packet-q932-ros-template.c" }; /* Register protocol and dissector */