forked from osmocom/wireshark
4e1b5ea866
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64 Reviewed-on: https://code.wireshark.org/review/4494 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
232 lines
6.9 KiB
INI
232 lines
6.9 KiB
INI
# tcap.cnf
|
|
# tcap conformation file
|
|
|
|
#.OMIT_ASSIGNMENT
|
|
RLRQ-apdu
|
|
RLRE-apdu
|
|
Release-request-reason
|
|
Release-response-reason
|
|
#.END
|
|
|
|
#.MODULE_IMPORT
|
|
|
|
#.EXPORTS
|
|
DialoguePDU
|
|
UniDialoguePDU
|
|
|
|
#.REGISTER_NEW
|
|
DialoguePDU B "0.0.17.773.1.1.1" "id-as-dialogue"
|
|
UniDialoguePDU B "0.0.17.773.1.2.1" "id-as-uniDialogue"
|
|
|
|
#.PDU_NEW
|
|
|
|
|
|
#.NO_EMIT ONLY_VALS
|
|
TCMessage
|
|
ERROR
|
|
|
|
#.NO_EMIT
|
|
|
|
#.TYPE_RENAME
|
|
AUDT-apdu/_untag/protocol-version AUDT_protocol_version
|
|
AARQ-apdu/_untag/protocol-version AARQ_protocol_version
|
|
AARE-apdu/_untag/protocol-version AARE_protocol_version
|
|
|
|
AARE-apdu/_untag/application-context-name AARE_application_context_name
|
|
AARQ-apdu/_untag/application-context-name AARQ_application_context_name
|
|
AUDT-apdu/_untag/application-context-name AUDT_application_context_name
|
|
|
|
AARQ-apdu/_untag/user-information AARQ_user_information
|
|
AARE-apdu/_untag/user-information AARE_user_information
|
|
ABRT-apdu/_untag/user-information ABRT_user_information
|
|
AUDT-apdu/_untag/user-information AUDT_user_information
|
|
|
|
#.FIELD_RENAME
|
|
AUDT-apdu/_untag/protocol-version audt_protocol_version
|
|
AARQ-apdu/_untag/protocol-version aarq_protocol_version
|
|
AARE-apdu/_untag/protocol-version aare_protocol_version
|
|
|
|
AARQ-apdu/_untag/application-context-name aarq_application_context_name
|
|
AARE-apdu/_untag/application-context-name aare_application_context_name
|
|
AUDT-apdu/_untag/application-context-name audt_application_context_name
|
|
|
|
AARQ-apdu/_untag/user-information aarq_user_information
|
|
AARE-apdu/_untag/user-information aare_user_information
|
|
AUDT-apdu/_untag/user-information audt_user_information
|
|
ABRT-apdu/_untag/user-information abrt_user_information
|
|
#.END
|
|
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY DialogueOC
|
|
|
|
offset = dissect_tcap_ExternalPDU(FALSE /*implicit_tag*/, tvb, offset, actx, tree, -1);
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY ExternalPDU
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY Dialog1
|
|
|
|
offset = dissect_tcap_DialoguePDU(TRUE, tvb, offset, actx, tree, -1);
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY Parameter
|
|
|
|
offset = dissect_tcap_param(actx,tree,tvb,offset);
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY Component
|
|
tvbuff_t *next_tvb;
|
|
gint8 ber_class;
|
|
gboolean pc;
|
|
gint tag;
|
|
guint32 len, comp_offset;
|
|
gint ind_field;
|
|
|
|
comp_offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
|
|
comp_offset = dissect_ber_length(actx->pinfo, tree, tvb, comp_offset, &len, &ind_field);
|
|
/* we can believe the length now */
|
|
next_tvb = tvb_new_subset_length(tvb, offset, len+comp_offset-offset);
|
|
|
|
if (!next_tvb)
|
|
return comp_offset;
|
|
|
|
TRY {
|
|
%(DEFAULT_BODY)s
|
|
}
|
|
CATCH_NONFATAL_ERRORS {
|
|
show_exception(tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
|
|
}
|
|
ENDTRY;
|
|
|
|
dissect_tcap_ITU_ComponentPDU(implicit_tag, next_tvb, 0, actx, tcap_top_tree, hf_index);
|
|
|
|
/* return comp_offset+len; or return offset (will be automatically added) */
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY AUDT-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid
|
|
%(DEFAULT_BODY)s
|
|
tcap_private.oid= (const void*) cur_oid;
|
|
tcap_private.acv=TRUE;
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY AARQ-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid
|
|
%(DEFAULT_BODY)s
|
|
tcap_private.oid= (const void*) cur_oid;
|
|
tcap_private.acv=TRUE;
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY AARE-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid
|
|
%(DEFAULT_BODY)s
|
|
tcap_private.oid= (const void*) cur_oid;
|
|
tcap_private.acv=TRUE;
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY OrigTransactionID
|
|
tvbuff_t *parameter_tvb;
|
|
guint8 len, i;
|
|
proto_tree *subtree;
|
|
subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_otid, NULL, "Source Transaction ID");
|
|
|
|
dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_tid, NULL);
|
|
PROTO_ITEM_SET_HIDDEN(actx->created_item);
|
|
offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_otid,
|
|
¶meter_tvb);
|
|
|
|
if (parameter_tvb){
|
|
len = tvb_length_remaining(parameter_tvb, 0);
|
|
switch(len) {
|
|
case 1:
|
|
gp_tcapsrt_info->src_tid=tvb_get_guint8(parameter_tvb, 0);
|
|
break;
|
|
case 2:
|
|
gp_tcapsrt_info->src_tid=tvb_get_ntohs(parameter_tvb, 0);
|
|
break;
|
|
case 4:
|
|
gp_tcapsrt_info->src_tid=tvb_get_ntohl(parameter_tvb, 0);
|
|
break;
|
|
default:
|
|
gp_tcapsrt_info->src_tid=0;
|
|
break;
|
|
}
|
|
|
|
if (len){
|
|
col_append_str(actx->pinfo->cinfo, COL_INFO, "otid(");
|
|
for(i=0;i<len;i++)
|
|
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%02x",tvb_get_guint8(parameter_tvb,i));
|
|
col_append_str(actx->pinfo->cinfo, COL_INFO, ") ");
|
|
}
|
|
|
|
}
|
|
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY DestTransactionID
|
|
tvbuff_t *parameter_tvb;
|
|
guint8 len , i;
|
|
proto_tree *subtree;
|
|
subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dtid, NULL, "Destination Transaction ID");
|
|
|
|
dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_tid, NULL);
|
|
PROTO_ITEM_SET_HIDDEN(actx->created_item);
|
|
offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_dtid,
|
|
¶meter_tvb);
|
|
|
|
if (parameter_tvb){
|
|
len = tvb_length_remaining(parameter_tvb, 0);
|
|
switch(len) {
|
|
case 1:
|
|
gp_tcapsrt_info->dst_tid=tvb_get_guint8(parameter_tvb, 0);
|
|
break;
|
|
case 2:
|
|
gp_tcapsrt_info->dst_tid=tvb_get_ntohs(parameter_tvb, 0);
|
|
break;
|
|
case 4:
|
|
gp_tcapsrt_info->dst_tid=tvb_get_ntohl(parameter_tvb, 0);
|
|
break;
|
|
default:
|
|
gp_tcapsrt_info->dst_tid=0;
|
|
break;
|
|
}
|
|
|
|
if (len){
|
|
col_append_str(actx->pinfo->cinfo, COL_INFO, "dtid(");
|
|
for(i=0;i<len;i++)
|
|
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%02x",tvb_get_guint8(parameter_tvb,i));
|
|
col_append_str(actx->pinfo->cinfo, COL_INFO, ") ");
|
|
}
|
|
}
|
|
#.FN_HDR Begin
|
|
gp_tcapsrt_info->ope=TC_BEGIN;
|
|
|
|
/* Do not change col_add_str() to col_append_str() here: we _want_ this call
|
|
* to overwrite whatever's currently in the INFO column (e.g., "UDT" from
|
|
* the SCCP dissector).
|
|
*
|
|
* If there's something there that should not be overwritten, whoever
|
|
* put that info there should call col_set_fence() to protect it.
|
|
*/
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "Begin ");
|
|
#.END
|
|
|
|
|
|
#.FN_HDR End
|
|
gp_tcapsrt_info->ope=TC_END;
|
|
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "End ");
|
|
#.END
|
|
|
|
|
|
#.FN_HDR Continue
|
|
gp_tcapsrt_info->ope=TC_CONT;
|
|
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "Continue ");
|
|
#.END
|
|
|
|
|
|
#.FN_HDR Abort
|
|
gp_tcapsrt_info->ope=TC_ABORT;
|
|
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "Abort ");
|
|
#.END
|