TCAP: Fix up indentation a bit.

GSM MAP: Add returnResultNotLast from TCAP to the included ROS stuff.

svn path=/trunk/; revision=21537
This commit is contained in:
Anders Broman 2007-04-23 20:20:46 +00:00
parent 8e32c1e739
commit d07a92f8bc
7 changed files with 170 additions and 160 deletions

View File

@ -2,7 +2,7 @@
--SIEMENS ASN.1 Compiler R5.70 (Production_5.70)
-- Date: 2003-09-04 Time: 14:14:00
-- Updated to version 3GPP TS 29.002 V7.5.0 (2006-09) Release 7
-- $Id:$
-- $Id$
MAP-Protocol{ 0 identified-organization (4) etsi (0) mobileDomain (0) gsm-Network (1) modules (3) map-Protocol (4) version5 (5) }
@ -20,7 +20,9 @@ Component ::= CHOICE {
invoke [1] IMPLICIT Invoke,
returnResultLast [2] IMPLICIT ReturnResult,
returnError [3] IMPLICIT ReturnError,
reject [4] IMPLICIT Reject
reject [4] IMPLICIT Reject,
-- TCAP adds returnResultNotLast to allow for the segmentation of a result.
returnResultNotLast [7] IMPLICIT ReturnResult
}
Invoke ::= SEQUENCE {

View File

@ -1,6 +1,6 @@
# Do not modify this file.
# It is created automatically by the ASN.1 to Wireshark dissector compiler
# ./gsm_map-exp.cnf
# .\gsm_map-exp.cnf
# ../../tools/asn2wrs.py -b -e -p gsm_map -c gsmmap.cnf -s packet-gsm_map-template GSMMAP.asn
#.MODULE

View File

@ -26,6 +26,7 @@
#ifndef PACKET_GSM_MAP_H
#define PACKET_GSM_MAP_H
#include "packet-ber.h"
/* Defines for the GSM MAP taps */
#define GSM_MAP_MAX_NUM_OPR_CODES 256

View File

@ -514,56 +514,56 @@ dissect_tcap_TheComponent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
* Handle The TCAP Service Response Time
*/
if ( gtcap_HandleSRT ) {
if (!tcap_subdissector_used) {
/* Create TCAP context and tree for display */
if (gtcap_DisplaySRT && tree) {
stat_item = proto_tree_add_text(tcap_stat_tree, tvb, offset, -1, "Stat");
PROTO_ITEM_SET_GENERATED(stat_item);
stat_tree = proto_item_add_subtree(stat_item, ett_tcap_stat);
}
p_tcap_context=tcapsrt_call_matching(tvb, pinfo, stat_tree, gp_tcapsrt_info);
tcap_subdissector_used=TRUE;
gp_tcap_context=p_tcap_context;
tcap_private.context=p_tcap_context;
} else {
/* Take the last TCAP context */
p_tcap_context = gp_tcap_context;
tcap_private.context=p_tcap_context;
}
}
if (p_tcap_context) {
if (cur_oid) {
if (p_tcap_context->oid_present) {
/* We have already an Application Context, check if we have
to fallback to a lower version */
if ( strncmp(p_tcap_context->oid,cur_oid, LENGTH_OID)!=0) {
/* ACN, changed, Fallback to lower version */
/* and update the subdissector (purely formal) */
strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
if ( (subdissector_handle
= dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
p_tcap_context->subdissector_handle=subdissector_handle;
if (!tcap_subdissector_used) {
/* Create TCAP context and tree for display */
if (gtcap_DisplaySRT && tree) {
stat_item = proto_tree_add_text(tcap_stat_tree, tvb, offset, -1, "Stat");
PROTO_ITEM_SET_GENERATED(stat_item);
stat_tree = proto_item_add_subtree(stat_item, ett_tcap_stat);
}
p_tcap_context=tcapsrt_call_matching(tvb, pinfo, stat_tree, gp_tcapsrt_info);
tcap_subdissector_used=TRUE;
gp_tcap_context=p_tcap_context;
tcap_private.context=p_tcap_context;
}else{
/* Take the last TCAP context */
p_tcap_context = gp_tcap_context;
tcap_private.context=p_tcap_context;
}
}
} else {
/* We do not have the OID in the TCAP context, so store it */
strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
if ( (subdissector_handle
= dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
p_tcap_context->subdissector_handle=subdissector_handle;
p_tcap_context->oid_present=TRUE;
}
} /* context OID */
} else {
/* Copy the OID from the TCAP context to the current oid */
if (p_tcap_context->oid_present) {
tcap_private.oid= (void*) p_tcap_context->oid;
tcap_private.acv=TRUE;
}
} /* no OID */
}
if (p_tcap_context) {
if (cur_oid) {
if (p_tcap_context->oid_present) {
/* We have already an Application Context, check if we have
to fallback to a lower version */
if ( strncmp(p_tcap_context->oid,cur_oid, LENGTH_OID)!=0) {
/* ACN, changed, Fallback to lower version
* and update the subdissector (purely formal)
*/
strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
p_tcap_context->subdissector_handle=subdissector_handle;
}
}
} else {
/* We do not have the OID in the TCAP context, so store it */
strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
if ( (subdissector_handle
= dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
p_tcap_context->subdissector_handle=subdissector_handle;
p_tcap_context->oid_present=TRUE;
}
} /* context OID */
} else {
/* Copy the OID from the TCAP context to the current oid */
if (p_tcap_context->oid_present) {
tcap_private.oid= (void*) p_tcap_context->oid;
tcap_private.acv=TRUE;
}
} /* no OID */
} /* no TCAP context */
if ( p_tcap_context
&& p_tcap_context->oid_present) {
/* Take the subdissector from the context */
@ -588,32 +588,32 @@ dissect_tcap_TheComponent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
/* Search if we can find the sub protocol according to the A.C.N */
if ( (subdissector_handle
= dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
/* found */
is_subdissector=TRUE;
/* found */
is_subdissector=TRUE;
} else {
/* Search if we can found the sub protocol according to the SSN table */
if ( (subdissector_handle
= get_itu_tcap_subdissector(pinfo->match_port))) {
/* Found according to SSN */
is_subdissector=TRUE;
/* Search if we can found the sub protocol according to the SSN table */
if ( (subdissector_handle
= get_itu_tcap_subdissector(pinfo->match_port))) {
/* Found according to SSN */
is_subdissector=TRUE;
} else {
/* Nothing found, take the Data handler */
subdissector_handle = data_handle;
is_subdissector=TRUE;
} /* SSN */
} /* ACN */
} else {
/* Nothing found, take the Data handler */
subdissector_handle = data_handle;
is_subdissector=TRUE;
} /* SSN */
} /* ACN */
} else {
/* There is no A.C.N for this transaction, so search in the SSN table */
if ( (subdissector_handle = get_itu_tcap_subdissector(pinfo->match_port))) {
/* Found according to SSN */
is_subdissector=TRUE;
} else {
subdissector_handle = data_handle;
is_subdissector=TRUE;
}
} /* OID */
/* There is no A.C.N for this transaction, so search in the SSN table */
if ( (subdissector_handle = get_itu_tcap_subdissector(pinfo->match_port))) {
/* Found according to SSN */
is_subdissector=TRUE;
} else {
subdissector_handle = data_handle;
is_subdissector=TRUE;
}
} /* OID */
} else {
/* We have it already */
/* We have it already */
}
/* Call the sub dissector if present, and not already called */

View File

@ -35,8 +35,11 @@ UserInformation ::= [UNIVERSAL 8] IMPLICIT SEQUENCE
ExternUserInfo ::= OCTET STRING
Dialog1 ::= OCTET STRING
UserInfoOID ::= OBJECT IDENTIFIER
Applicationcontext ::= OBJECT IDENTIFIER
AARQ-apdu ::= [APPLICATION 0] IMPLICIT SEQUENCE {
protocol-versionrq [0] IMPLICIT BIT STRING { version1 (0) }
DEFAULT { version1 },
@ -462,18 +465,18 @@ ComponentSequence ::= [ PRIVATE 8 ] IMPLICIT SEQUENCE OF ComponentPDU
ComponentPDU ::=
CHOICE {
invokeLastansi [ PRIVATE 9 ] IMPLICIT InvokePDU ,
returnResultLastansi [ PRIVATE 10 ] IMPLICIT ReturnResultPDU,
returnErroransi [ PRIVATE 11 ] IMPLICIT ReturnErrorPDU ,
rejectansi [ PRIVATE 12 ] IMPLICIT RejectPDU ,
invokeNotLastansi [ PRIVATE 13 ] IMPLICIT InvokePDU ,
invokeLastansi [ PRIVATE 9 ] IMPLICIT InvokePDU ,
returnResultLastansi [ PRIVATE 10 ] IMPLICIT ReturnResultPDU,
returnErroransi [ PRIVATE 11 ] IMPLICIT ReturnErrorPDU ,
rejectansi [ PRIVATE 12 ] IMPLICIT RejectPDU ,
invokeNotLastansi [ PRIVATE 13 ] IMPLICIT InvokePDU ,
returnResultNotLastansi [ PRIVATE 14 ] IMPLICIT ReturnResultPDU
}
InvokePDU ::= SEQUENCE {
componentIDs [ PRIVATE 15 ] IMPLICIT OCTET STRING (SIZE(0..2)) OPTIONAL ,
operationCode OperationCode OPTIONAL,
parameterinv ANSIparamch
componentIDs [ PRIVATE 15 ] IMPLICIT OCTET STRING (SIZE(0..2)) OPTIONAL ,
operationCode OperationCode OPTIONAL,
parameterinv ANSIparamch
}
ANSIParameters ::= ANY

View File

@ -231,8 +231,9 @@ gp_tcapsrt_info->ope=TC_BEGIN;
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Begin ");
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
Begin_sequence, hf_index, ett_tcap_Begin);
%(DEFAULT_BODY)s
#.FN_BODY End
gp_tcapsrt_info->ope=TC_END;

View File

@ -1428,8 +1428,11 @@ gp_tcapsrt_info->ope=TC_BEGIN;
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Begin ");
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
Begin_sequence, hf_index, ett_tcap_Begin);
Begin_sequence, hf_index, ett_tcap_Begin);
return offset;
@ -1495,7 +1498,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 237 "tcap.cnf"
#line 238 "tcap.cnf"
gp_tcapsrt_info->ope=TC_END;
if (check_col(pinfo->cinfo, COL_INFO))
@ -1524,7 +1527,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 245 "tcap.cnf"
#line 246 "tcap.cnf"
gp_tcapsrt_info->ope=TC_CONT;
if (check_col(pinfo->cinfo, COL_INFO))
@ -1598,7 +1601,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 253 "tcap.cnf"
#line 254 "tcap.cnf"
gp_tcapsrt_info->ope=TC_ABORT;
if (check_col(pinfo->cinfo, COL_INFO))
@ -1620,7 +1623,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 285 "tcap.cnf"
#line 286 "tcap.cnf"
tvbuff_t *next_tvb;
@ -2168,7 +2171,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 267 "tcap.cnf"
#line 268 "tcap.cnf"
if ((hf_index == hf_tcap_ansiqueryWithPerm)&&(check_col(pinfo->cinfo, COL_INFO)))
col_append_fstr(pinfo->cinfo, COL_INFO, " QueryWithPerm");
@ -2270,7 +2273,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 261 "tcap.cnf"
#line 262 "tcap.cnf"
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Abort ");
@ -3300,56 +3303,56 @@ dissect_tcap_TheComponent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
* Handle The TCAP Service Response Time
*/
if ( gtcap_HandleSRT ) {
if (!tcap_subdissector_used) {
/* Create TCAP context and tree for display */
if (gtcap_DisplaySRT && tree) {
stat_item = proto_tree_add_text(tcap_stat_tree, tvb, offset, -1, "Stat");
PROTO_ITEM_SET_GENERATED(stat_item);
stat_tree = proto_item_add_subtree(stat_item, ett_tcap_stat);
}
p_tcap_context=tcapsrt_call_matching(tvb, pinfo, stat_tree, gp_tcapsrt_info);
tcap_subdissector_used=TRUE;
gp_tcap_context=p_tcap_context;
tcap_private.context=p_tcap_context;
} else {
/* Take the last TCAP context */
p_tcap_context = gp_tcap_context;
tcap_private.context=p_tcap_context;
}
}
if (p_tcap_context) {
if (cur_oid) {
if (p_tcap_context->oid_present) {
/* We have already an Application Context, check if we have
to fallback to a lower version */
if ( strncmp(p_tcap_context->oid,cur_oid, LENGTH_OID)!=0) {
/* ACN, changed, Fallback to lower version */
/* and update the subdissector (purely formal) */
strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
if ( (subdissector_handle
= dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
p_tcap_context->subdissector_handle=subdissector_handle;
if (!tcap_subdissector_used) {
/* Create TCAP context and tree for display */
if (gtcap_DisplaySRT && tree) {
stat_item = proto_tree_add_text(tcap_stat_tree, tvb, offset, -1, "Stat");
PROTO_ITEM_SET_GENERATED(stat_item);
stat_tree = proto_item_add_subtree(stat_item, ett_tcap_stat);
}
p_tcap_context=tcapsrt_call_matching(tvb, pinfo, stat_tree, gp_tcapsrt_info);
tcap_subdissector_used=TRUE;
gp_tcap_context=p_tcap_context;
tcap_private.context=p_tcap_context;
}else{
/* Take the last TCAP context */
p_tcap_context = gp_tcap_context;
tcap_private.context=p_tcap_context;
}
}
} else {
/* We do not have the OID in the TCAP context, so store it */
strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
if ( (subdissector_handle
= dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
p_tcap_context->subdissector_handle=subdissector_handle;
p_tcap_context->oid_present=TRUE;
}
} /* context OID */
} else {
/* Copy the OID from the TCAP context to the current oid */
if (p_tcap_context->oid_present) {
tcap_private.oid= (void*) p_tcap_context->oid;
tcap_private.acv=TRUE;
}
} /* no OID */
}
if (p_tcap_context) {
if (cur_oid) {
if (p_tcap_context->oid_present) {
/* We have already an Application Context, check if we have
to fallback to a lower version */
if ( strncmp(p_tcap_context->oid,cur_oid, LENGTH_OID)!=0) {
/* ACN, changed, Fallback to lower version
* and update the subdissector (purely formal)
*/
strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
p_tcap_context->subdissector_handle=subdissector_handle;
}
}
} else {
/* We do not have the OID in the TCAP context, so store it */
strncpy(p_tcap_context->oid,cur_oid, LENGTH_OID);
if ( (subdissector_handle
= dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
p_tcap_context->subdissector_handle=subdissector_handle;
p_tcap_context->oid_present=TRUE;
}
} /* context OID */
} else {
/* Copy the OID from the TCAP context to the current oid */
if (p_tcap_context->oid_present) {
tcap_private.oid= (void*) p_tcap_context->oid;
tcap_private.acv=TRUE;
}
} /* no OID */
} /* no TCAP context */
if ( p_tcap_context
&& p_tcap_context->oid_present) {
/* Take the subdissector from the context */
@ -3374,32 +3377,32 @@ dissect_tcap_TheComponent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
/* Search if we can find the sub protocol according to the A.C.N */
if ( (subdissector_handle
= dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) {
/* found */
is_subdissector=TRUE;
/* found */
is_subdissector=TRUE;
} else {
/* Search if we can found the sub protocol according to the SSN table */
if ( (subdissector_handle
= get_itu_tcap_subdissector(pinfo->match_port))) {
/* Found according to SSN */
is_subdissector=TRUE;
/* Search if we can found the sub protocol according to the SSN table */
if ( (subdissector_handle
= get_itu_tcap_subdissector(pinfo->match_port))) {
/* Found according to SSN */
is_subdissector=TRUE;
} else {
/* Nothing found, take the Data handler */
subdissector_handle = data_handle;
is_subdissector=TRUE;
} /* SSN */
} /* ACN */
} else {
/* Nothing found, take the Data handler */
subdissector_handle = data_handle;
is_subdissector=TRUE;
} /* SSN */
} /* ACN */
} else {
/* There is no A.C.N for this transaction, so search in the SSN table */
if ( (subdissector_handle = get_itu_tcap_subdissector(pinfo->match_port))) {
/* Found according to SSN */
is_subdissector=TRUE;
} else {
subdissector_handle = data_handle;
is_subdissector=TRUE;
}
} /* OID */
/* There is no A.C.N for this transaction, so search in the SSN table */
if ( (subdissector_handle = get_itu_tcap_subdissector(pinfo->match_port))) {
/* Found according to SSN */
is_subdissector=TRUE;
} else {
subdissector_handle = data_handle;
is_subdissector=TRUE;
}
} /* OID */
} else {
/* We have it already */
/* We have it already */
}
/* Call the sub dissector if present, and not already called */