2005-06-06 15:39:20 +00:00
|
|
|
# tcap.cnf
|
|
|
|
# tcap conformation file
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#.MODULE_IMPORT
|
|
|
|
|
|
|
|
#.EXPORTS
|
|
|
|
|
|
|
|
|
|
|
|
#.PDU
|
|
|
|
|
|
|
|
|
|
|
|
#.NO_EMIT
|
|
|
|
|
|
|
|
#.TYPE_RENAME
|
|
|
|
|
|
|
|
#.FIELD_RENAME
|
|
|
|
|
|
|
|
#.FN_BODY DialogueOC
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
tvbuff_t *next_tvb;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint8 class;
|
2005-06-06 15:39:20 +00:00
|
|
|
gboolean pc;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint32 tag;
|
2005-06-06 15:39:20 +00:00
|
|
|
guint32 len;
|
2005-07-12 01:01:19 +00:00
|
|
|
gboolean ind_field;
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
|
|
|
|
next_tvb = tvb_new_subset(tvb, offset, len, len);
|
2005-06-16 07:46:03 +00:00
|
|
|
offset = dissect_ber_octet_string(TRUE, pinfo, tree, next_tvb, 0, hf_index,
|
|
|
|
¶meter_tvb);
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
|
2005-06-16 07:46:03 +00:00
|
|
|
if (!parameter_tvb)
|
|
|
|
return offset;
|
|
|
|
dissect_tcap_ExternalPDU(TRUE, parameter_tvb, 2, pinfo, tree, -1);
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
return offset+2;
|
|
|
|
|
|
|
|
#.FN_BODY Dialog1
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
tvbuff_t *next_tvb;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint8 class;
|
2005-06-06 15:39:20 +00:00
|
|
|
gboolean pc;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint32 tag;
|
2005-06-06 15:39:20 +00:00
|
|
|
guint32 len;
|
2005-07-12 01:01:19 +00:00
|
|
|
gboolean ind_field;
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
|
|
|
|
next_tvb = tvb_new_subset(tvb, offset, len, len);
|
2005-06-16 07:46:03 +00:00
|
|
|
offset = dissect_ber_octet_string(TRUE, pinfo, tree, tvb, 0, hf_index,
|
|
|
|
¶meter_tvb);
|
2005-06-06 15:39:20 +00:00
|
|
|
|
2005-06-06 20:42:18 +00:00
|
|
|
/*offset = dissect_ber_octet_string(TRUE, pinfo, tree, tvb, offset, hf_index,
|
|
|
|
* ¶meter_tvb);
|
|
|
|
*/
|
2005-06-16 07:46:03 +00:00
|
|
|
if (!parameter_tvb)
|
|
|
|
return offset;
|
|
|
|
dissect_tcap_DialoguePDU(TRUE, parameter_tvb, 0, pinfo, tree, -1);
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
#.FN_BODY Parameter
|
|
|
|
tvbuff_t *next_tvb;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint8 class;
|
2005-06-06 15:39:20 +00:00
|
|
|
gboolean pc;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint32 tag;
|
2005-06-06 15:39:20 +00:00
|
|
|
guint32 len;
|
2005-07-12 01:01:19 +00:00
|
|
|
gboolean ind_field;
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
|
2005-06-16 07:46:03 +00:00
|
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
|
|
|
|
offset = dissect_ber_octet_string(TRUE, pinfo, tree, tvb, 0, hf_index,
|
2005-06-06 15:39:20 +00:00
|
|
|
&next_tvb);
|
|
|
|
|
2005-06-16 07:46:03 +00:00
|
|
|
if (!next_tvb)
|
|
|
|
return offset;
|
2005-06-07 20:30:04 +00:00
|
|
|
dissect_tcap_param(pinfo,tree,next_tvb,0);
|
|
|
|
|
2005-06-06 15:39:20 +00:00
|
|
|
#.FN_BODY User_information
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
tvbuff_t *next_tvb;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint8 class;
|
2005-06-06 15:39:20 +00:00
|
|
|
gboolean pc;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint32 tag;
|
2005-06-06 15:39:20 +00:00
|
|
|
guint32 len;
|
2005-07-12 01:01:19 +00:00
|
|
|
gboolean ind_field;
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
|
|
|
|
next_tvb = tvb_new_subset(tvb, offset, len, len);
|
|
|
|
dissect_ber_octet_string(TRUE, pinfo, tree, next_tvb, 0, hf_index,
|
|
|
|
¶meter_tvb);
|
|
|
|
|
2005-06-16 07:46:03 +00:00
|
|
|
if (parameter_tvb)
|
|
|
|
dissect_tcap_UserInformation(TRUE, parameter_tvb, 0, pinfo, tree, -1);
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
return offset+len;
|
|
|
|
#.FN_BODY Component
|
|
|
|
tvbuff_t *next_tvb;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint8 class;
|
2005-06-06 15:39:20 +00:00
|
|
|
gboolean pc;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint32 tag;
|
2005-06-06 15:39:20 +00:00
|
|
|
guint32 len;
|
2005-07-12 01:01:19 +00:00
|
|
|
gboolean ind_field;
|
2005-06-06 20:42:18 +00:00
|
|
|
/*
|
|
|
|
* ok lets look at the oid and ssn and try and find a dissector, otherwise lets decode it.
|
|
|
|
*/
|
2005-06-06 15:39:20 +00:00
|
|
|
ber_oid_dissector_table = find_dissector_table("ber.oid");
|
|
|
|
tcap_itu_ssn_dissector_table = find_dissector_table("tcap.itu_ssn");
|
|
|
|
|
2005-06-16 07:46:03 +00:00
|
|
|
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
|
2005-06-06 15:39:20 +00:00
|
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
|
|
|
|
if (ber_oid_dissector_table && cur_oid){
|
2005-06-06 20:42:18 +00:00
|
|
|
if(!dissector_try_string(ber_oid_dissector_table, cur_oid, next_tvb, pinfo, tcap_top_tree))
|
2005-06-06 15:39:20 +00:00
|
|
|
{
|
2005-06-06 20:42:18 +00:00
|
|
|
if (!dissector_try_port(tcap_itu_ssn_dissector_table, pinfo->match_port, next_tvb,pinfo, tcap_top_tree))
|
2005-07-21 21:12:09 +00:00
|
|
|
dissect_ber_choice(pinfo, tree, next_tvb, 0,
|
2005-06-26 05:48:50 +00:00
|
|
|
Component_choice, hf_index, ett_tcap_Component, NULL);
|
2005-06-06 15:39:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2005-06-06 20:42:18 +00:00
|
|
|
if (!dissector_try_port(tcap_itu_ssn_dissector_table, pinfo->match_port, next_tvb, pinfo, tcap_top_tree))
|
2005-07-21 21:12:09 +00:00
|
|
|
dissect_ber_choice(pinfo, tree, next_tvb, 0,
|
2005-06-26 05:48:50 +00:00
|
|
|
Component_choice, hf_index, ett_tcap_Component, NULL);
|
2005-06-06 15:39:20 +00:00
|
|
|
|
|
|
|
offset+=len;
|
|
|
|
|
|
|
|
#.FN_BODY Applicationcontext
|
2005-06-21 09:38:59 +00:00
|
|
|
static char buffer[MAX_OID_STR_LEN];
|
2005-06-06 15:39:20 +00:00
|
|
|
cur_oid = buffer;
|
|
|
|
pinfo->private_data = buffer;
|
|
|
|
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
|
|
|
|
hf_index, cur_oid);
|
|
|
|
|
|
|
|
#.FN_BODY UserInfoOID
|
2005-06-21 09:38:59 +00:00
|
|
|
static char buffer[MAX_OID_STR_LEN];
|
2005-06-06 15:39:20 +00:00
|
|
|
tcapext_oid = buffer;
|
|
|
|
pinfo->private_data = buffer;
|
|
|
|
offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
|
|
|
|
hf_index, tcapext_oid);
|
|
|
|
|
|
|
|
#.FN_BODY ExternUserInfo
|
|
|
|
tvbuff_t *next_tvb;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint8 class;
|
2005-06-06 15:39:20 +00:00
|
|
|
gboolean pc;
|
2005-07-12 01:01:19 +00:00
|
|
|
gint32 tag;
|
2005-06-07 05:50:28 +00:00
|
|
|
guint32 len, start_offset;
|
2005-07-12 01:01:19 +00:00
|
|
|
gboolean ind_field;
|
2005-06-06 20:42:18 +00:00
|
|
|
/*
|
|
|
|
* ok lets look at the oid and ssn and try and find a dissector, otherwise lets decode it.
|
|
|
|
*/
|
2005-06-06 15:39:20 +00:00
|
|
|
ber_oid_dissector_table = find_dissector_table("ber.oid");
|
2005-06-07 05:50:28 +00:00
|
|
|
start_offset = offset;
|
2005-06-06 15:39:20 +00:00
|
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
|
2005-06-06 20:42:18 +00:00
|
|
|
/* Use the recived length, XXX What if it was indefenet? */
|
2005-06-07 05:50:28 +00:00
|
|
|
next_tvb = tvb_new_subset(tvb, start_offset, len +(offset - start_offset), len+(offset - start_offset));
|
2005-06-06 15:39:20 +00:00
|
|
|
if (ber_oid_dissector_table && tcapext_oid){
|
2005-06-07 20:30:04 +00:00
|
|
|
if(!dissector_try_string(ber_oid_dissector_table, tcapext_oid, next_tvb, pinfo, tcap_top_tree))
|
2005-06-06 15:39:20 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
offset+=len;
|
|
|
|
|
|
|
|
|
|
|
|
#.FN_BODY ANSIParameters
|
|
|
|
/* we are doing the ParamSet here so need to look at the tags*/
|
|
|
|
guint32 len;
|
|
|
|
len = tvb_length_remaining(tvb, offset);
|
|
|
|
if (len > 2) /* arghhh I dont know whether this is constructed or not! */
|
|
|
|
offset = dissect_tcap_param(pinfo,tree,tvb,offset);
|
|
|
|
else
|
|
|
|
offset = dissect_ber_octet_string(TRUE, pinfo, tree, tvb, 0, hf_index,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
|
|
|
|
#.FN_BODY ComponentPDU
|
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
|
2005-06-16 07:46:03 +00:00
|
|
|
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
|
2005-06-06 15:39:20 +00:00
|
|
|
|
2005-06-07 20:30:04 +00:00
|
|
|
if (!dissector_try_port(tcap_ansi_ssn_dissector_table, pinfo->match_port, next_tvb, pinfo, tcap_top_tree))
|
2005-06-06 15:39:20 +00:00
|
|
|
{
|
2005-07-21 21:12:09 +00:00
|
|
|
offset = dissect_ber_choice(pinfo, tree, tvb, offset,
|
2005-06-26 05:48:50 +00:00
|
|
|
ComponentPDU_choice, hf_index, ett_tcap_ComponentPDU, NULL);
|
2005-06-06 15:39:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#.FN_BODY OrigTransactionID
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
guint8 len, i;
|
|
|
|
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
|
|
|
|
¶meter_tvb);
|
2005-06-08 18:53:11 +00:00
|
|
|
|
|
|
|
if (parameter_tvb){
|
|
|
|
len = tvb_length_remaining(parameter_tvb, 0);
|
|
|
|
if ((len)&&(check_col(pinfo->cinfo, COL_INFO))){
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, "otid(");
|
2005-06-06 15:39:20 +00:00
|
|
|
for(i=0;i<len;i++)
|
2005-06-08 18:53:11 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, "%02x",tvb_get_guint8(parameter_tvb,i));
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ") ");
|
|
|
|
}
|
2005-06-06 15:39:20 +00:00
|
|
|
|
2005-06-08 18:53:11 +00:00
|
|
|
}
|
2005-06-06 15:39:20 +00:00
|
|
|
#.FN_BODY DestTransactionID
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
guint8 len , i;
|
|
|
|
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
|
|
|
|
¶meter_tvb);
|
2005-06-08 18:53:11 +00:00
|
|
|
if (parameter_tvb){
|
|
|
|
len = tvb_length_remaining(parameter_tvb, 0);
|
|
|
|
if ((len)&&(check_col(pinfo->cinfo, COL_INFO))){
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, "dtid(");
|
|
|
|
for(i=0;i<len;i++)
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, "%02x",tvb_get_guint8(parameter_tvb,i));
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, ") ");
|
|
|
|
}
|
|
|
|
}
|
2005-06-07 20:30:04 +00:00
|
|
|
#.FN_BODY 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);
|
|
|
|
#.FN_BODY End
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " End ");
|
|
|
|
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
|
|
|
|
End_sequence, hf_index, ett_tcap_End);
|
|
|
|
#.FN_BODY Continue
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " Continue ");
|
|
|
|
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
|
|
|
|
Continue_sequence, hf_index, ett_tcap_Continue);
|
|
|
|
#.FN_BODY Abort
|
|
|
|
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,
|
|
|
|
Abort_sequence, hf_index, ett_tcap_Abort);
|
|
|
|
#.FN_BODY AbortPDU
|
|
|
|
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,
|
|
|
|
AbortPDU_sequence, hf_index, ett_tcap_AbortPDU);
|
|
|
|
#.FN_BODY TransactionPDU
|
|
|
|
if ((hf_index == hf_tcap_ansiqueryWithPerm)&&(check_col(pinfo->cinfo, COL_INFO)))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " QueryWithPerm");
|
|
|
|
|
|
|
|
if ((hf_index == hf_tcap_ansiqueryWithoutPerm)&&(check_col(pinfo->cinfo, COL_INFO)))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " QueryWithOutPerm");
|
|
|
|
|
|
|
|
if ((hf_index == hf_tcap_ansiresponse)&&(check_col(pinfo->cinfo, COL_INFO)))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " Response");
|
|
|
|
|
|
|
|
if ((hf_index == hf_tcap_ansiconversationWithPerm)&&(check_col(pinfo->cinfo, COL_INFO)))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " ConversationWithPerm");
|
|
|
|
|
|
|
|
if ((hf_index == hf_tcap_ansiconversationWithoutPerm)&&(check_col(pinfo->cinfo, COL_INFO)))
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " ConversationWithoutPerm");
|
|
|
|
|
|
|
|
offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
|
|
|
|
TransactionPDU_sequence, hf_index, ett_tcap_TransactionPDU);
|
|
|
|
|
2005-06-06 15:39:20 +00:00
|
|
|
#.END
|
|
|
|
|
|
|
|
|