forked from osmocom/wireshark
![Pascal Quantin](/assets/img/avatar_default.png)
This reverts commit e308e7c4de
.
Change-Id: I079616d63f643f79f1bc03ef5fdf724f36df4071
Reviewed-on: https://code.wireshark.org/review/2435
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
193 lines
5.1 KiB
INI
193 lines
5.1 KiB
INI
# tcap.cnf
|
|
# tcap conformation file
|
|
|
|
#.NO_EMIT ONLY_VALS
|
|
PackageType
|
|
|
|
#.OMIT_ASSIGNMENT
|
|
# Removed as they are giving 'defined but not used' warnings currently.
|
|
Priority
|
|
#.END
|
|
|
|
#--- OperationCode ---
|
|
|
|
#.FN_PARS
|
|
OperationCode VAL_PTR = &ansi_tcap_private.d.OperationCode
|
|
OperationCode/private VAL_PTR = &ansi_tcap_private.d.OperationCode_private
|
|
#.FN_FTR OperationCode
|
|
ansi_tcap_private.d.OperationCode_item = actx->created_item;
|
|
#.END
|
|
|
|
#.FN_BODY OperationCode/national VAL_PTR = &ansi_tcap_private.d.OperationCode_national
|
|
proto_tree *subtree;
|
|
proto_item *spcifier_item;
|
|
int start_offset = offset;
|
|
guint8 family;
|
|
guint8 specifier;
|
|
|
|
%(DEFAULT_BODY)s
|
|
/* mask off the H bit */
|
|
ansi_tcap_private.d.OperationCode_national = (ansi_tcap_private.d.OperationCode_national&0x7fff);
|
|
|
|
subtree = proto_item_add_subtree(actx->created_item, ett_ansi_tcap_op_code_nat);
|
|
/* Bit H is used to distinguish between Operations that require a reply and those that do not. A value of 1
|
|
* indicates that a reply is required; a value of 0 indicates that a reply is not required.
|
|
*/
|
|
family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8;
|
|
specifier = (guint8)(ansi_tcap_private.d.OperationCode_national & 0xff);
|
|
proto_tree_add_item(subtree, hf_ansi_tcap_bit_h, tvb, start_offset, 2, ENC_BIG_ENDIAN);
|
|
proto_tree_add_item(subtree, hf_ansi_tcap_op_family, tvb, start_offset, 2, ENC_BIG_ENDIAN);
|
|
spcifier_item = proto_tree_add_item(subtree, hf_ansi_tcap_op_specifier, tvb, start_offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
switch(family){
|
|
case 0:
|
|
/* All Families ( Not used ) */
|
|
break;
|
|
case 1:
|
|
/* Parameter */
|
|
if(specifier== 1){
|
|
proto_item_append_text(spcifier_item, " Provide Value");
|
|
}else if (specifier== 2){
|
|
proto_item_append_text(spcifier_item, " Set Value");
|
|
}
|
|
break;
|
|
case 2:
|
|
/* Charging */
|
|
if (specifier== 1){
|
|
proto_item_append_text(spcifier_item, " Bill Call");
|
|
}
|
|
break;
|
|
case 3:
|
|
/* Provide Instructions */
|
|
if (specifier== 1){
|
|
proto_item_append_text(spcifier_item, " Start");
|
|
}else if (specifier== 2){
|
|
proto_item_append_text(spcifier_item, " Assist");
|
|
}
|
|
break;
|
|
case 4:
|
|
/* Connection Control */
|
|
if (specifier== 1){
|
|
proto_item_append_text(spcifier_item, " Connect");
|
|
}else if (specifier== 2){
|
|
proto_item_append_text(spcifier_item, " Temporary Connect");
|
|
}else if (specifier== 3){
|
|
proto_item_append_text(spcifier_item, " Disconnect");
|
|
}else if (specifier== 4){
|
|
proto_item_append_text(spcifier_item, " Forward Disconnect");
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
#--- INVOKE ---
|
|
|
|
#.FN_BODY Invoke/parameter
|
|
|
|
if(find_tcap_subdissector(tvb, actx, tree))
|
|
offset = tvb_length(tvb);
|
|
|
|
|
|
#.FN_HDR Invoke
|
|
ansi_tcap_private.d.pdu = 1;
|
|
|
|
#--- RETURN RESULT ---
|
|
|
|
#.FIELD_ATTR
|
|
|
|
#.FN_BODY ReturnResult/parameter
|
|
if(find_tcap_subdissector(tvb, actx, tree))
|
|
offset = tvb_length(tvb);
|
|
|
|
#.FN_HDR ReturnResult
|
|
ansi_tcap_private.d.pdu = 2;
|
|
|
|
|
|
#--- RETURN ERROR ---
|
|
|
|
#.FN_BODY ReturnError/parameter
|
|
if(find_tcap_subdissector(tvb, actx, tree))
|
|
offset = tvb_length(tvb);
|
|
|
|
#.FN_HDR ReturnError
|
|
ansi_tcap_private.d.pdu = 3;
|
|
|
|
#--- ObjectIDApplicationContext --
|
|
#.FN_BODY ObjectIDApplicationContext FN_VARIANT = _str VAL_PTR = &oid_str
|
|
|
|
static const char * oid_str;
|
|
|
|
%(DEFAULT_BODY)s
|
|
ansi_tcap_private.objectApplicationId_oid= (const void*) oid_str;
|
|
ansi_tcap_private.oid_is_present=TRUE;
|
|
|
|
#.FN_HDR PackageType/unidirectional
|
|
gp_tcapsrt_info->ope=TC_ANSI_ALL;
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "unidirectional ");
|
|
|
|
#.FN_HDR PackageType/queryWithPerm
|
|
gp_tcapsrt_info->ope=TC_ANSI_ALL;
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "queryWithPerm ");
|
|
|
|
#.FN_HDR PackageType/queryWithoutPerm
|
|
gp_tcapsrt_info->ope=TC_ANSI_ALL;
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "queryWithoutPerm ");
|
|
|
|
#.FN_HDR PackageType/response
|
|
gp_tcapsrt_info->ope=TC_ANSI_ALL;
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "response ");
|
|
|
|
#.FN_HDR PackageType/conversationWithPerm
|
|
gp_tcapsrt_info->ope=TC_ANSI_ALL;
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "conversationWithPerm ");
|
|
|
|
#.FN_HDR PackageType/conversationWithoutPerm
|
|
gp_tcapsrt_info->ope=TC_ANSI_ALL;
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "conversationWithoutPerm ");
|
|
|
|
#.FN_HDR PackageType/abort
|
|
gp_tcapsrt_info->ope=TC_ANSI_ABORT;
|
|
col_set_str(actx->pinfo->cinfo, COL_INFO, "Abort ");
|
|
|
|
#.FN_BODY TransactionID/_untag VAL_PTR = &next_tvb
|
|
|
|
tvbuff_t *next_tvb;
|
|
guint8 len;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if(next_tvb) {
|
|
len = tvb_length_remaining(next_tvb, 0);
|
|
if(len !=0){
|
|
/* 0 octets for the Unidirectional,
|
|
* 4 octets for Query, Response & Abort
|
|
* 8 octets for Conversation in the order Originating then Responding TID
|
|
*
|
|
* In order to match this it seems like we should only use the last 4 octets
|
|
* in the 8 octets case.
|
|
*/
|
|
if (len > 4){
|
|
ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 4,len-4);
|
|
}else{
|
|
ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 0,len);
|
|
}
|
|
}
|
|
switch(len) {
|
|
case 1:
|
|
gp_tcapsrt_info->src_tid=tvb_get_guint8(next_tvb, 0);
|
|
break;
|
|
case 2:
|
|
gp_tcapsrt_info->src_tid=tvb_get_ntohs(next_tvb, 0);
|
|
break;
|
|
case 4:
|
|
gp_tcapsrt_info->src_tid=tvb_get_ntohl(next_tvb, 0);
|
|
break;
|
|
default:
|
|
gp_tcapsrt_info->src_tid=0;
|
|
break;
|
|
}
|
|
}
|
|
|
|
#.END
|