aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcap.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2007-04-21 20:27:05 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2007-04-21 20:27:05 +0000
commit0a1031e8d3d511c5b1f01b0a9af1fe0bd156ec81 (patch)
tree951214b14d30323d601653fb6814a7d5853907a6 /epan/dissectors/packet-tcap.c
parentc52f329cf0a3659c8e04014ce16d9901202e5dee (diff)
Put some missing TAG:s in the tree if internal BER fields shown.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21486 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-tcap.c')
-rw-r--r--epan/dissectors/packet-tcap.c65
1 files changed, 39 insertions, 26 deletions
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c
index 3d1227fa64..48b9e4d30a 100644
--- a/epan/dissectors/packet-tcap.c
+++ b/epan/dissectors/packet-tcap.c
@@ -358,7 +358,7 @@ static int dissect_protocol_versionrq_impl(packet_info *pinfo _U_, proto_tree *t
static int
dissect_tcap_Applicationcontext(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 99 "tcap.cnf"
+#line 111 "tcap.cnf"
offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &cur_oid);
tcap_private.oid= (void*) cur_oid;
@@ -376,7 +376,7 @@ static int dissect_application_context_name(packet_info *pinfo _U_, proto_tree *
static int
dissect_tcap_User_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 78 "tcap.cnf"
+#line 90 "tcap.cnf"
tvbuff_t *next_tvb;
gint8 class;
gboolean pc;
@@ -385,8 +385,8 @@ gint8 class;
gint ind_field;
-offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
-offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
+offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
+offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind_field);
next_tvb = tvb_new_subset(tvb, offset, len-(2*ind_field), len-(2*ind_field));
if (!next_tvb)
return offset+len;
@@ -630,16 +630,17 @@ static int dissect_objectConfidentialityId_impl(packet_info *pinfo _U_, proto_tr
static int
dissect_tcap_Dialog1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 44 "tcap.cnf"
+#line 55 "tcap.cnf"
gint8 class;
gboolean pc;
gint tag;
guint32 len;
gint ind_field;
-
+/* Calculate the correct length, Tags will be shown in DialoguePDU */
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
+
dissect_tcap_DialoguePDU(TRUE, tvb, 0, pinfo, tree, -1);
return offset+len;
@@ -661,9 +662,21 @@ static const ber_sequence_t ExternalPDU_sequence[] = {
static int
dissect_tcap_ExternalPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 44 "tcap.cnf"
+gint8 class;
+ gboolean pc;
+ gint tag;
+ guint32 len;
+ gint ind_field;
+ /* Workaround for tagged fields */
+offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
+offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind_field);
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
ExternalPDU_sequence, hf_index, ett_tcap_ExternalPDU);
+
+
+
return offset;
}
@@ -671,7 +684,7 @@ dissect_tcap_ExternalPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
static int
dissect_tcap_UserInfoOID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 104 "tcap.cnf"
+#line 116 "tcap.cnf"
offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &tcapext_oid);
tcap_private.oid= (void*)tcapext_oid;
@@ -689,7 +702,7 @@ static int dissect_useroid(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_
static int
dissect_tcap_ExternUserInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 109 "tcap.cnf"
+#line 121 "tcap.cnf"
dissect_tcap_TheExternUserInfo(implicit_tag, tvb, offset, pinfo, tree, hf_index);
@@ -858,15 +871,15 @@ gint8 class;
gint ind_field;
-offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
-offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
+offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
+offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind_field);
next_tvb = tvb_new_subset(tvb, offset, len-(2*ind_field), len-(2*ind_field));
if (!next_tvb)
return offset;
- dissect_tcap_ExternalPDU(TRUE, next_tvb, 2, pinfo, tree, -1);
+ dissect_tcap_ExternalPDU(TRUE, next_tvb, 0, pinfo, tree, -1);
return offset+len;
@@ -964,7 +977,7 @@ static int dissect_opCode(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t
static int
dissect_tcap_Parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 58 "tcap.cnf"
+#line 70 "tcap.cnf"
tvbuff_t *next_tvb;
gint8 class;
gboolean pc;
@@ -973,8 +986,8 @@ gint8 class;
gint ind_field;
- offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
- offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
+ offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
+ offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind_field);
/* need to strip the EOC off the next_tvb */
next_tvb = tvb_new_subset(tvb, offset, len-(2*ind_field), len-(2*ind_field));
@@ -1303,7 +1316,7 @@ static const ber_choice_t Component_choice[] = {
static int
dissect_tcap_Component(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 96 "tcap.cnf"
+#line 108 "tcap.cnf"
dissect_tcap_TheComponent(implicit_tag, tvb, offset, pinfo, tree, hf_index);
@@ -1352,7 +1365,7 @@ static int dissect_unidirectional_impl(packet_info *pinfo _U_, proto_tree *tree
static int
dissect_tcap_OrigTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 140 "tcap.cnf"
+#line 152 "tcap.cnf"
tvbuff_t *parameter_tvb;
guint8 len, i;
proto_item *tid_item;
@@ -1408,7 +1421,7 @@ static const ber_sequence_t Begin_sequence[] = {
static int
dissect_tcap_Begin(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 213 "tcap.cnf"
+#line 225 "tcap.cnf"
gp_tcapsrt_info->ope=TC_BEGIN;
if (check_col(pinfo->cinfo, COL_INFO))
@@ -1427,7 +1440,7 @@ static int dissect_begin_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbu
static int
dissect_tcap_DestTransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 178 "tcap.cnf"
+#line 190 "tcap.cnf"
tvbuff_t *parameter_tvb;
guint8 len , i;
proto_item *tid_item;
@@ -1480,7 +1493,7 @@ static const ber_sequence_t End_sequence[] = {
static int
dissect_tcap_End(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 220 "tcap.cnf"
+#line 232 "tcap.cnf"
gp_tcapsrt_info->ope=TC_END;
if (check_col(pinfo->cinfo, COL_INFO))
@@ -1506,7 +1519,7 @@ static const ber_sequence_t Continue_sequence[] = {
static int
dissect_tcap_Continue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 227 "tcap.cnf"
+#line 239 "tcap.cnf"
gp_tcapsrt_info->ope=TC_CONT;
if (check_col(pinfo->cinfo, COL_INFO))
@@ -1577,7 +1590,7 @@ static const ber_sequence_t Abort_sequence[] = {
static int
dissect_tcap_Abort(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 234 "tcap.cnf"
+#line 246 "tcap.cnf"
gp_tcapsrt_info->ope=TC_ABORT;
if (check_col(pinfo->cinfo, COL_INFO))
@@ -1596,7 +1609,7 @@ static int dissect_abort_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbu
static int
dissect_tcap_TransactionID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 265 "tcap.cnf"
+#line 277 "tcap.cnf"
tvbuff_t *next_tvb;
@@ -1808,7 +1821,7 @@ static int dissect_operationCode(packet_info *pinfo _U_, proto_tree *tree _U_, t
static int
dissect_tcap_ANSIParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 112 "tcap.cnf"
+#line 124 "tcap.cnf"
/* we are doing the ParamSet here so need to look at the tags*/
guint32 len;
len = tvb_length_remaining(tvb, offset);
@@ -2074,7 +2087,7 @@ static const ber_choice_t ComponentPDU_choice[] = {
static int
dissect_tcap_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 123 "tcap.cnf"
+#line 135 "tcap.cnf"
tvbuff_t *next_tvb;
dissector_handle_t subdissector_handle;
@@ -2144,7 +2157,7 @@ static const ber_sequence_t TransactionPDU_sequence[] = {
static int
dissect_tcap_TransactionPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 246 "tcap.cnf"
+#line 258 "tcap.cnf"
if ((hf_index == hf_tcap_ansiqueryWithPerm)&&(check_col(pinfo->cinfo, COL_INFO)))
col_append_fstr(pinfo->cinfo, COL_INFO, " QueryWithPerm");
@@ -2245,7 +2258,7 @@ static const ber_sequence_t AbortPDU_sequence[] = {
static int
dissect_tcap_AbortPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 241 "tcap.cnf"
+#line 253 "tcap.cnf"
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Abort ");
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,