diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-04-23 20:20:46 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-04-23 20:20:46 +0000 |
commit | d07a92f8bc4cd3e757a8bcb1466a55d5f01e973b (patch) | |
tree | bb33b6ea1f1da60225dfdf01ed91725128288f6f /asn1/tcap | |
parent | 8e32c1e739c72e357a39961166486acaf328f510 (diff) |
TCAP: Fix up indentation a bit.
GSM MAP: Add returnResultNotLast from TCAP to the included ROS stuff.
svn path=/trunk/; revision=21537
Diffstat (limited to 'asn1/tcap')
-rw-r--r-- | asn1/tcap/packet-tcap-template.c | 138 | ||||
-rw-r--r-- | asn1/tcap/tcap.asn | 19 | ||||
-rw-r--r-- | asn1/tcap/tcap.cnf | 5 |
3 files changed, 83 insertions, 79 deletions
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c index e6e72b3bb2..e3829e73d5 100644 --- a/asn1/tcap/packet-tcap-template.c +++ b/asn1/tcap/packet-tcap-template.c @@ -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 (!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; - } - } - } 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 (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 */ diff --git a/asn1/tcap/tcap.asn b/asn1/tcap/tcap.asn index 10ce17b15d..1afb819d1c 100644 --- a/asn1/tcap/tcap.asn +++ b/asn1/tcap/tcap.asn @@ -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 diff --git a/asn1/tcap/tcap.cnf b/asn1/tcap/tcap.cnf index a18b9e04b0..b8d717ab56 100644 --- a/asn1/tcap/tcap.cnf +++ b/asn1/tcap/tcap.cnf @@ -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; |