aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/tcap
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-08-14 22:05:36 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-08-14 22:05:36 +0000
commit1518d1b07a52536df5dbcc2af00a5e0f6be88a7f (patch)
tree8aca6196e4a519341e8e006b57d04c64b8dd134a /asn1/tcap
parentab242d50fa5867684a3cf732437d767ed12fedee (diff)
Preparations to split the TCAP dissector into ANSI and ITU parts.
svn path=/trunk/; revision=22501
Diffstat (limited to 'asn1/tcap')
-rw-r--r--asn1/tcap/packet-tcap-template.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index 960ce6c747..025d233138 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -97,6 +97,7 @@ static proto_tree * tcap_top_tree=NULL;
static proto_tree * tcap_stat_tree=NULL;
static dissector_handle_t data_handle;
+static dissector_handle_t ansi_tcap_handle;
static dissector_table_t sccp_ssn_table;
@@ -165,6 +166,42 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
struct tcaphash_context_t * p_tcap_context;
dissector_handle_t subdissector_handle;
asn1_ctx_t asn1_ctx;
+ gint8 class;
+ gboolean pc;
+ gint tag;
+
+ /* Check if ANSI TCAP and call the ANSI TCAP dissector if that's the case
+ * PackageType ::= CHOICE { unidirectional [PRIVATE 1] IMPLICIT UniTransactionPDU,
+ * queryWithPerm [PRIVATE 2] IMPLICIT TransactionPDU,
+ * queryWithoutPerm [PRIVATE 3] IMPLICIT TransactionPDU,
+ * response [PRIVATE 4] IMPLICIT TransactionPDU,
+ * conversationWithPerm [PRIVATE 5] IMPLICIT TransactionPDU,
+ * conversationWithoutPerm [PRIVATE 6] IMPLICIT TransactionPDU,
+ * abort [PRIVATE 22] IMPLICIT Abort
+ * }
+ *
+ *
+ */
+ get_ber_identifier(tvb, 0, &class, &pc, &tag);
+#if 0
+ if(class == BER_CLASS_PRI){
+ switch(tag){
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 22:
+ call_dissector(ansi_tcap_handle, tvb, pinfo, parent_tree);
+ return;
+ break;
+ default:
+ return;
+ }
+ }
+#endif
+ /* ITU TCAP */
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
tcap_top_tree = parent_tree;
@@ -227,6 +264,8 @@ proto_reg_handoff_tcap(void)
}
data_handle = find_dissector("data");
+ ansi_tcap_handle = find_dissector("ansi_tcap");
+
#include "packet-tcap-dis-tab.c"
}