aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/tcap
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2005-06-07 05:50:28 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2005-06-07 05:50:28 +0000
commit59ff3e39ab170187cc83c94ff00d714b6cb35c5a (patch)
tree41ece4fe6356fb152ade39950e8afe1fceb17160 /asn1/tcap
parent706971df42574e1d186ff3a1179d465c7aa2bea5 (diff)
From Tim Endean:
- I have had to make some changes to packet-ber to allow for PRIVATE and APPLICATION tags. - Both ANSI and ITU variants supported without configuration. - Asn.1 dissectors can now register using an OID value as well as an SSN, the oid it tried first. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14574 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1/tcap')
-rw-r--r--asn1/tcap/packet-tcap-template.c13
-rw-r--r--asn1/tcap/tcap.cnf9
2 files changed, 11 insertions, 11 deletions
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index 14ac468aeb..917dac1d71 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -1,7 +1,7 @@
/* packet-tcap-template.c
- * Routines for ITU TCAP
- * Copyright 2004, Tim Endean <endeant@hotmail.com>
- * Built from the gsm-map dissector Copyright 2004, Anders Broman <anders.broman@ericsson.com>
+ * Routines for TCAP
+ * Copyright 2004 - 2005, Tim Endean <endeant@hotmail.com>
+ * Built from the gsm-map dissector Copyright 2004 - 2005, Anders Broman <anders.broman@ericsson.com>
*
* $Id$
* Ethereal - Network traffic analyzer
@@ -39,7 +39,7 @@
#include "packet-ber.h"
#include "packet-tcap.h"
-#define PNAME "Transfer Capabillities Part"
+#define PNAME "Transaction Capabilities Application Part"
#define PSNAME "TCAP"
#define PFNAME "tcap"
@@ -168,8 +168,7 @@ proto_register_tcap(void)
module_t *tcap_module;
/* Register the protocol name and description */
- proto_tcap = proto_register_protocol("ITU Transaction Capabilities Application Part",
- "tcap", "tcap");
+ proto_tcap = proto_register_protocol(PNAME, PSNAME, PFNAME);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_tcap, hf, array_length(hf));
@@ -190,7 +189,7 @@ proto_register_tcap(void)
ssn_range = range_empty();
prefs_register_range_preference(tcap_module, "ssn", "SCCP SSNs",
- "SCCP (and SUA) SSNs to decode as ITU TCAP",
+ "SCCP (and SUA) SSNs to decode as TCAP",
&global_ssn_range, MAX_SSN);
/* we will fake a ssn subfield which has the same value obtained from sccp */
diff --git a/asn1/tcap/tcap.cnf b/asn1/tcap/tcap.cnf
index 80acf3ab3d..b8214c60d6 100644
--- a/asn1/tcap/tcap.cnf
+++ b/asn1/tcap/tcap.cnf
@@ -150,16 +150,17 @@ tvbuff_t *next_tvb;
guint8 class;
gboolean pc;
guint32 tag;
- guint32 len;
+ guint32 len, start_offset;
guint32 ind_field;
/*
* ok lets look at the oid and ssn and try and find a dissector, otherwise lets decode it.
*/
ber_oid_dissector_table = find_dissector_table("ber.oid");
+start_offset = offset;
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
/* Use the recived length, XXX What if it was indefenet? */
-next_tvb = tvb_new_subset(tvb, offset, len, len);
+next_tvb = tvb_new_subset(tvb, start_offset, len +(offset - start_offset), len+(offset - start_offset));
if (ber_oid_dissector_table && tcapext_oid){
if(!dissector_try_string(ber_oid_dissector_table, tcapext_oid, next_tvb, pinfo, tree))
{
@@ -196,7 +197,7 @@ tvbuff_t *parameter_tvb;
guint8 len, i;
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
&parameter_tvb);
-len = tvb_length_remaining(parameter_tvb, offset);
+len = tvb_length_remaining(parameter_tvb, 0);
if ((len)&&(check_col(pinfo->cinfo, COL_INFO)))
{
@@ -211,7 +212,7 @@ tvbuff_t *parameter_tvb;
guint8 len , i;
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
&parameter_tvb);
-len = tvb_length_remaining(parameter_tvb, offset);
+len = tvb_length_remaining(parameter_tvb, 0);
if ((len)&&(check_col(pinfo->cinfo, COL_INFO)))
{
col_append_fstr(pinfo->cinfo, COL_INFO, "dtid(");