summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2011-03-01 13:01:26 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2011-03-01 13:01:26 +0000
commit16bdcb2fbe5ba7d3e9cd986b5e4d1151f1a49630 (patch)
tree4f98062fcdec5a3b0b5e464529ac55bb46767745
parent0b2e755182e01518b13db2f375baf7ca9eeb749d (diff)
downloadwireshark-16bdcb2fbe5ba7d3e9cd986b5e4d1151f1a49630.tar.gz
QSIG: decoding of PSS1InformationElement
svn path=/trunk/; revision=36108
-rw-r--r--asn1/qsig/packet-qsig-template.c6
-rw-r--r--asn1/qsig/qsig.cnf10
-rw-r--r--epan/dissectors/packet-qsig.c31
3 files changed, 39 insertions, 8 deletions
diff --git a/asn1/qsig/packet-qsig-template.c b/asn1/qsig/packet-qsig-template.c
index 26be9e4182..106a185be5 100644
--- a/asn1/qsig/packet-qsig-template.c
+++ b/asn1/qsig/packet-qsig-template.c
@@ -307,9 +307,13 @@ static gint ett_qsig = -1;
static gint ett_qsig_ie = -1;
static gint ett_qsig_unknown_extension = -1;
#include "packet-qsig-ett.c"
+static gint ett_cnq_PSS1InformationElement = -1;
/* Preferences */
+/* Subdissectors */
+static dissector_handle_t q931_ie_handle = NULL;
+
/* Global variables */
static const char *extension_oid = NULL;
static GHashTable *qsig_opcode2oid_hashtable = NULL;
@@ -653,6 +657,7 @@ void proto_register_qsig(void) {
&ett_qsig_ie,
&ett_qsig_unknown_extension,
#include "packet-qsig-ettarr.c"
+ &ett_cnq_PSS1InformationElement,
};
/* Register protocol and dissector */
@@ -681,6 +686,7 @@ void proto_reg_handoff_qsig(void) {
dissector_handle_t qsig_ie_handle;
q931_handle = find_dissector("q931");
+ q931_ie_handle = find_dissector("q931.ie");
qsig_arg_handle = new_create_dissector_handle(dissect_qsig_arg, proto_qsig);
qsig_res_handle = new_create_dissector_handle(dissect_qsig_res, proto_qsig);
diff --git a/asn1/qsig/qsig.cnf b/asn1/qsig/qsig.cnf
index 30aac8ba53..f76e64429c 100644
--- a/asn1/qsig/qsig.cnf
+++ b/asn1/qsig/qsig.cnf
@@ -164,6 +164,16 @@ NameData TYPE = FT_STRING DISPLAY = BASE_NONE
#.END
+#.FN_BODY PSS1InformationElement/_untag VAL_PTR = &out_tvb
+ tvbuff_t *out_tvb = NULL;
+ proto_tree *data_tree;
+
+%(DEFAULT_BODY)s
+ data_tree = proto_item_add_subtree(%(ACTX)s->created_item, ett_cnq_PSS1InformationElement);
+ if (out_tvb && (tvb_length(out_tvb) > 0) && q931_ie_handle)
+ call_dissector(q931_ie_handle, out_tvb, %(ACTX)s->pinfo, data_tree);
+#.END
+
#.TABLE10_BODY OPERATION
{ %(&operationCode)3s, "%(_name)s" },
#.END
diff --git a/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c
index 9e9ffb2b0b..8bc1119222 100644
--- a/epan/dissectors/packet-qsig.c
+++ b/epan/dissectors/packet-qsig.c
@@ -2018,9 +2018,13 @@ static gint ett_qsig_mid_SEQUENCE_OF_Extension = -1;
/*--- End of included file: packet-qsig-ett.c ---*/
#line 310 "packet-qsig-template.c"
+static gint ett_cnq_PSS1InformationElement = -1;
/* Preferences */
+/* Subdissectors */
+static dissector_handle_t q931_ie_handle = NULL;
+
/* Global variables */
static const char *extension_oid = NULL;
static GHashTable *qsig_opcode2oid_hashtable = NULL;
@@ -2090,9 +2094,18 @@ dissect_qsig_Extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
static int
-dissect_qsig_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+dissect_qsig_PSS1InformationElement_U(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 168 "qsig.cnf"
+ tvbuff_t *out_tvb = NULL;
+ proto_tree *data_tree;
+
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
- NULL);
+ &out_tvb);
+
+ data_tree = proto_item_add_subtree(actx->created_item, ett_cnq_PSS1InformationElement);
+ if (out_tvb && (tvb_length(out_tvb) > 0) && q931_ie_handle)
+ call_dissector(q931_ie_handle, out_tvb, actx->pinfo, data_tree);
+
return offset;
}
@@ -2102,7 +2115,7 @@ dissect_qsig_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
static int
dissect_qsig_PSS1InformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
- hf_index, BER_CLASS_APP, 0, TRUE, dissect_qsig_OCTET_STRING);
+ hf_index, BER_CLASS_APP, 0, TRUE, dissect_qsig_PSS1InformationElement_U);
return offset;
}
@@ -11896,7 +11909,7 @@ static int dissect_qsig_mid_Extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo
/*--- End of included file: packet-qsig-fn.c ---*/
-#line 322 "packet-qsig-template.c"
+#line 326 "packet-qsig-template.c"
typedef struct _qsig_op_t {
gint32 opcode;
@@ -12114,7 +12127,7 @@ static const qsig_op_t qsig_op_tab[] = {
/* mIDMailboxID */ { 120, dissect_qsig_mid_MIDMailboxIDArg_PDU, dissect_qsig_mid_MIDDummyRes_PDU },
/*--- End of included file: packet-qsig-table11.c ---*/
-#line 331 "packet-qsig-template.c"
+#line 335 "packet-qsig-template.c"
};
typedef struct _qsig_err_t {
@@ -12295,7 +12308,7 @@ static const qsig_err_t qsig_err_tab[] = {
/* unspecified */ { 1008, dissect_qsig_mid_Extension_PDU },
/*--- End of included file: packet-qsig-table21.c ---*/
-#line 340 "packet-qsig-template.c"
+#line 344 "packet-qsig-template.c"
};
static const qsig_op_t *get_op(gint32 opcode) {
@@ -15841,7 +15854,7 @@ void proto_register_qsig(void) {
NULL, HFILL }},
/*--- End of included file: packet-qsig-hfarr.c ---*/
-#line 648 "packet-qsig-template.c"
+#line 652 "packet-qsig-template.c"
};
/* List of subtrees */
@@ -16292,7 +16305,8 @@ void proto_register_qsig(void) {
&ett_qsig_mid_SEQUENCE_OF_Extension,
/*--- End of included file: packet-qsig-ettarr.c ---*/
-#line 656 "packet-qsig-template.c"
+#line 660 "packet-qsig-template.c"
+ &ett_cnq_PSS1InformationElement,
};
/* Register protocol and dissector */
@@ -16321,6 +16335,7 @@ void proto_reg_handoff_qsig(void) {
dissector_handle_t qsig_ie_handle;
q931_handle = find_dissector("q931");
+ q931_ie_handle = find_dissector("q931.ie");
qsig_arg_handle = new_create_dissector_handle(dissect_qsig_arg, proto_qsig);
qsig_res_handle = new_create_dissector_handle(dissect_qsig_res, proto_qsig);