# tcap.cnf # tcap conformation file #.OMIT_ASSIGNMENT RLRQ-apdu RLRE-apdu Release-request-reason Release-response-reason ERROR #.END #.MODULE_IMPORT #.EXPORTS DialoguePDU UniDialoguePDU #.REGISTER 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 #.NO_EMIT ONLY_VALS TCMessage #.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; int8_t ber_class; bool pc; int tag; uint32_t len, comp_offset; volatile uint32_t _offset; bool 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; if(dissect_tcap_ITU_ComponentPDU(implicit_tag, next_tvb, 0, actx, tcap_top_tree, hf_index)){ return comp_offset; } _offset = offset; TRY { _offset = dissect_ber_choice(actx, tree, tvb, _offset, Component_choice, hf_index, ett_tcap_Component, NULL); } CATCH_NONFATAL_ERRORS { show_exception(tvb, actx->pinfo, tree, EXCEPT_CODE, GET_MESSAGE); } ENDTRY; offset = _offset; /* 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 struct tcap_private_t *p_tcap_private = (struct tcap_private_t*)actx->value_ptr; %(DEFAULT_BODY)s if (p_tcap_private) { p_tcap_private->oid= (const void*) cur_oid; p_tcap_private->acv=true; } #---------------------------------------------------------------------------------------- #.FN_BODY AARQ-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid struct tcap_private_t *p_tcap_private = (struct tcap_private_t*)actx->value_ptr; %(DEFAULT_BODY)s if (p_tcap_private) { p_tcap_private->oid= (const void*) cur_oid; p_tcap_private->acv=true; } #---------------------------------------------------------------------------------------- #.FN_BODY AARE-apdu/_untag/application-context-name FN_VARIANT = _str VAL_PTR = &cur_oid struct tcap_private_t *p_tcap_private = (struct tcap_private_t*)actx->value_ptr; %(DEFAULT_BODY)s if (p_tcap_private) { p_tcap_private->oid= (const void*) cur_oid; p_tcap_private->acv=true; } #---------------------------------------------------------------------------------------- #.FN_BODY OrigTransactionID tvbuff_t *parameter_tvb; uint8_t len, i; proto_tree *subtree; int saved_offset; struct tcap_private_t *p_tcap_private = (struct tcap_private_t*)actx->value_ptr; hf_index = hf_tcap_tid; saved_offset = offset; %(DEFAULT_BODY)s proto_item_set_generated(actx->created_item); offset = saved_offset; subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_otid, NULL, "Source Transaction ID"); offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_otid, ¶meter_tvb); if (parameter_tvb) { len = tvb_reported_length_remaining(parameter_tvb, 0); switch(len) { case 1: gp_tcapsrt_info->src_tid=tvb_get_uint8(parameter_tvb, 0); break; case 2: gp_tcapsrt_info->src_tid=tvb_get_ntohs(parameter_tvb, 0); break; case 3: gp_tcapsrt_info->src_tid=tvb_get_ntoh24(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 (p_tcap_private) p_tcap_private->src_tid = gp_tcapsrt_info->src_tid; 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_uint8(parameter_tvb,i)); } col_append_str(actx->pinfo->cinfo, COL_INFO, ") "); } } #---------------------------------------------------------------------------------------- #.FN_BODY DestTransactionID tvbuff_t *parameter_tvb; uint8_t len , i; proto_tree *subtree; int saved_offset; struct tcap_private_t *p_tcap_private = (struct tcap_private_t*)actx->value_ptr; hf_index = hf_tcap_tid; saved_offset = offset; %(DEFAULT_BODY)s proto_item_set_generated(actx->created_item); offset = saved_offset; subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dtid, NULL, "Destination Transaction ID"); offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_dtid, ¶meter_tvb); if (parameter_tvb) { len = tvb_reported_length_remaining(parameter_tvb, 0); switch(len) { case 1: gp_tcapsrt_info->dst_tid=tvb_get_uint8(parameter_tvb, 0); break; case 2: gp_tcapsrt_info->dst_tid=tvb_get_ntohs(parameter_tvb, 0); break; case 3: gp_tcapsrt_info->dst_tid=tvb_get_ntoh24(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 (p_tcap_private) p_tcap_private->dst_tid = gp_tcapsrt_info->dst_tid; 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_uint8(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 # # Editor modelines - https://www.wireshark.org/tools/modelines.html # # Local variables: # c-basic-offset: 2 # tab-width: 8 # indent-tabs-mode: nil # End: # # vi: set shiftwidth=2 tabstop=8 expandtab: # :indentSize=2:tabSize=8:noTabs=true: #