forked from osmocom/wireshark
492 lines
12 KiB
INI
492 lines
12 KiB
INI
# camel.cnf
|
|
# camel conformation file
|
|
|
|
# $Id$
|
|
|
|
#.MODULE_IMPORT
|
|
MAP-CommonDataTypes gsm_map
|
|
MAP-MS-DataTypes gsm_map
|
|
MAP-CH-DataTypes gsm_map
|
|
|
|
#.INCLUDE ../gsmmap/gsm_map-exp.cnf
|
|
|
|
|
|
#.PDU
|
|
|
|
|
|
#.NO_EMIT
|
|
|
|
#.TYPE_RENAME
|
|
|
|
#.FIELD_RENAME
|
|
#----------------------------------------------------------------------------------------
|
|
#.PDU
|
|
Component
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY InvokeParameter
|
|
offset = dissect_invokeData(tree, tvb, offset, actx);
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY ReturnResultParameter
|
|
offset = dissect_returnResultData(tree, tvb, offset, actx);
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY ReturnErrorParameter
|
|
offset = dissect_returnErrorData(tree, tvb, offset, actx);
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS CAMELOperationLocalvalue
|
|
|
|
VAL_PTR = &opcode
|
|
|
|
#.FN_BODY CAMELOperationLocalvalue
|
|
|
|
%(DEFAULT_BODY)s
|
|
if (check_col(actx->pinfo->cinfo, COL_INFO)){
|
|
col_append_fstr(actx->pinfo->cinfo, COL_INFO,
|
|
val_to_str(opcode, camel_opr_code_strings, "Unknown CAMEL (%%u)"));
|
|
col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
|
|
col_set_fence(actx->pinfo->cinfo, COL_INFO);
|
|
}
|
|
gp_camelsrt_info->opcode=opcode;
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS CAMELLocalErrorcode
|
|
|
|
VAL_PTR = &errorCode
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY CallingPartyNumber
|
|
|
|
|
|
proto_item* parameter_item;
|
|
proto_item* parameter_tree;
|
|
tvbuff_t *isup_tvb;
|
|
guint32 len;
|
|
|
|
len=tvb_length_remaining(tvb,offset);
|
|
parameter_item = proto_tree_add_item(tree, hf_index, tvb, offset, -1, FALSE);
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_camelisup_parameter);
|
|
isup_tvb = tvb_new_subset(tvb, offset,-1 , -1 );
|
|
dissect_isup_calling_party_number_parameter(isup_tvb, parameter_tree, parameter_item);
|
|
offset += len;
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY CalledPartyNumber
|
|
|
|
|
|
tvbuff_t *isup_tvb;
|
|
guint32 len;
|
|
|
|
len=tvb_length_remaining(tvb,offset);
|
|
isup_tvb = tvb_new_subset(tvb, offset,-1 , -1 );
|
|
dissect_isup_called_party_number_parameter(isup_tvb, tree, NULL);
|
|
offset += len;
|
|
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS ISDN-AddressString
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY ISDN-AddressString
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
char *digit_str;
|
|
proto_item *item;
|
|
proto_tree *subtree;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
item = get_ber_last_created_item();
|
|
subtree = proto_item_add_subtree(item, ett_camel_isdn_address_string);
|
|
|
|
proto_tree_add_item(subtree, hf_camel_addr_extension, parameter_tvb, 0,1,FALSE);
|
|
|
|
proto_tree_add_item(subtree, hf_camel_addr_natureOfAddressIndicator, parameter_tvb, 0,1,FALSE);
|
|
proto_tree_add_item(subtree, hf_camel_addr_numberingPlanInd, parameter_tvb, 0,1,FALSE);
|
|
digit_str = unpack_digits(parameter_tvb, 1);
|
|
|
|
proto_tree_add_string(subtree, hf_camel_addr_digits, parameter_tvb, 1, -1, digit_str);
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS CallresultoctetPDU
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY CallresultoctetPDU
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
%(DEFAULT_BODY)s
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
dissect_camel_CAMEL_CallResult(implicit_tag, parameter_tvb, 0, actx, tree, -1);
|
|
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS Cause
|
|
VAL_PTR = &camel_tvb
|
|
|
|
#.FN_BODY Cause
|
|
|
|
tvbuff_t *camel_tvb;
|
|
guint8 Cause_value;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (camel_tvb)
|
|
dissect_q931_cause_ie(camel_tvb, 0, tvb_length_remaining(camel_tvb,0), tree, hf_camel_cause_indicator, &Cause_value);
|
|
|
|
|
|
return offset;
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS Q850Cause
|
|
VAL_PTR = &camel_tvb
|
|
|
|
#.FN_BODY Q850Cause
|
|
|
|
tvbuff_t *camel_tvb;
|
|
guint8 Cause_value;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (camel_tvb)
|
|
dissect_q931_cause_ie(camel_tvb, 0, tvb_length_remaining(camel_tvb,0), tree, hf_camel_cause_indicator, &Cause_value);
|
|
|
|
|
|
return offset;
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS RPCause
|
|
VAL_PTR = &camel_tvb
|
|
|
|
#.FN_BODY RPCause
|
|
|
|
tvbuff_t *camel_tvb;
|
|
guint8 Cause_value;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (camel_tvb)
|
|
dissect_RP_cause_ie(camel_tvb, 0, tvb_length_remaining(camel_tvb,0), tree, hf_camel_RP_Cause, &Cause_value);
|
|
|
|
return offset;
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY DateAndTime
|
|
|
|
|
|
/*
|
|
* date_option = 1 european dd:mm:yyyy
|
|
* date_option = 2 american mm:dd:yyyy
|
|
*/
|
|
|
|
/*
|
|
* Output should be HH:MM:SS;dd/mm/yyyy
|
|
* if european is selected, and HH:MM:SS;mm/dd/yyyy
|
|
* otherwise.
|
|
*/
|
|
|
|
guint8 digit_pair;
|
|
guint8 i = 0, curr_offset;
|
|
char time[CAMEL_DATE_AND_TIME_LEN];
|
|
char c[CAMEL_DATE_AND_TIME_LEN]; /*temporary container*/
|
|
|
|
/* 2 digits per octet, 7 octets total + 5 delimiters */
|
|
|
|
for (curr_offset = 0; curr_offset < 7 ; curr_offset++)
|
|
/*Loop to extract date*/
|
|
{
|
|
digit_pair = tvb_get_guint8(tvb, curr_offset);
|
|
|
|
proto_tree_add_uint(tree,
|
|
hf_digit,
|
|
tvb,
|
|
curr_offset,
|
|
1,
|
|
digit_pair & 0x0F);
|
|
|
|
proto_tree_add_uint(tree,
|
|
hf_digit,
|
|
tvb,
|
|
curr_offset,
|
|
1,
|
|
digit_pair >>4);
|
|
|
|
|
|
c[i] = camel_number_to_char( digit_pair & 0x0F);
|
|
i++;
|
|
c[i] = camel_number_to_char( digit_pair >>4);
|
|
i++;
|
|
}
|
|
|
|
/* Pretty print date */
|
|
/* XXX - Should we use sprintf here instead of assembling the string by
|
|
* hand? */
|
|
|
|
time[0] = c[8];
|
|
time[1] = c[9];
|
|
time[2] = ':';
|
|
time[3] = c[10];
|
|
time[4] = c[11];
|
|
time[5] = ':';
|
|
time[6] = c[12];
|
|
time[7] = c[13];
|
|
time[8] = ';';
|
|
if ( EUROPEAN_DATE == date_format) /*european*/
|
|
{
|
|
time[9] = c[6]; /*day*/
|
|
time[10] = c[7];
|
|
time[11] = '/';
|
|
time[12] = c[4]; /*month*/
|
|
time[13] = c[5];
|
|
}
|
|
else /*american*/
|
|
{
|
|
time[9] = c[4]; /*month*/
|
|
time[10] = c[5];
|
|
time[11] = '/';
|
|
time[12] = c[6]; /*day*/
|
|
time[13] = c[7];
|
|
}
|
|
time[14] = '/';
|
|
time[15] = c[0];
|
|
time[16] = c[1];
|
|
time[17] = c[2];
|
|
time[18] = c[3];
|
|
|
|
time[CAMEL_DATE_AND_TIME_LEN - 1] = '\0';
|
|
|
|
/*start = 0, length = 7*/
|
|
|
|
proto_tree_add_string(tree,
|
|
hf_index,
|
|
tvb,
|
|
0,
|
|
7,
|
|
time);
|
|
|
|
return 7; /* 7 octets eaten*/
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS BearerCap
|
|
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY BearerCap
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
|
|
dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), tree);
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS RedirectionInformation
|
|
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY RedirectionInformation
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
|
|
dissect_isup_redirection_information_parameter(parameter_tvb, tree, NULL);
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS OriginalCalledPartyID
|
|
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY OriginalCalledPartyID
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
dissect_isup_original_called_number_parameter(parameter_tvb, tree, NULL);
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS RedirectingPartyID
|
|
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY RedirectingPartyID
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
dissect_isup_redirecting_number_parameter(parameter_tvb, tree, NULL);
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS MSNetworkCapability
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY MSNetworkCapability
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
proto_item *item;
|
|
proto_tree *subtree;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
item = get_ber_last_created_item();
|
|
subtree = proto_item_add_subtree(item, ett_camel_MSNetworkCapability);
|
|
de_gmm_ms_net_cap(parameter_tvb, subtree, 0, tvb_length_remaining(parameter_tvb,0), NULL, 0);
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS MSRadioAccessCapability
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY MSRadioAccessCapability
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
proto_item *item;
|
|
proto_tree *subtree;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
item = get_ber_last_created_item();
|
|
subtree = proto_item_add_subtree(item, ett_camel_MSRadioAccessCapability);
|
|
de_gmm_ms_radio_acc_cap(parameter_tvb, subtree, 0, tvb_length_remaining(parameter_tvb,0), NULL, 0);
|
|
#.END
|
|
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS PDPTypeOrganization
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY PDPTypeOrganization
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
PDPTypeOrganization = (tvb_get_guint8(parameter_tvb,0) &0x0f);
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS PDPTypeNumber
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY PDPTypeNumber
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
proto_item *item;
|
|
proto_tree *subtree;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
PDPTypeNumber = tvb_get_guint8(parameter_tvb,0);
|
|
item = get_ber_last_created_item();
|
|
subtree = proto_item_add_subtree(item, ett_camel_pdptypenumber);
|
|
switch (PDPTypeOrganization){
|
|
case 0: /* ETSI */
|
|
proto_tree_add_item(tree, hf_camel_PDPTypeNumber_etsi, parameter_tvb, 0, 1, FALSE);
|
|
break;
|
|
case 1: /* IETF */
|
|
proto_tree_add_item(tree, hf_camel_PDPTypeNumber_ietf, parameter_tvb, 0, 1, FALSE);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_PARS PDPAddress
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY PDPAddress
|
|
|
|
tvbuff_t *parameter_tvb;
|
|
proto_item *item;
|
|
proto_tree *subtree;
|
|
|
|
%(DEFAULT_BODY)s
|
|
|
|
if (!parameter_tvb)
|
|
return offset;
|
|
item = get_ber_last_created_item();
|
|
subtree = proto_item_add_subtree(item, ett_camel_pdptypenumber);
|
|
switch (PDPTypeOrganization){
|
|
case 0: /* ETSI */
|
|
break;
|
|
case 1: /* IETF */
|
|
switch(PDPTypeNumber){
|
|
case 0x21: /* IPv4 */
|
|
proto_tree_add_item(tree, hf_camel_PDPAddress_IPv4, parameter_tvb, 0, tvb_length(parameter_tvb), FALSE);
|
|
break;
|
|
case 0x57: /* IPv6 */
|
|
proto_tree_add_item(tree, hf_camel_PDPAddress_IPv6, parameter_tvb, 0, tvb_length(parameter_tvb), FALSE);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
default:
|
|
break;
|
|
|
|
}
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
#.FN_BODY CellGlobalIdOrServiceAreaIdOrLAI
|
|
proto_item *item;
|
|
proto_tree *subtree;
|
|
int start_offset;
|
|
|
|
start_offset = offset;
|
|
%(DEFAULT_BODY)s
|
|
|
|
item = get_ber_last_created_item();
|
|
subtree = proto_item_add_subtree(item, ett_camel_pdptypenumber);
|
|
|
|
if (tvb_reported_length_remaining(tvb,start_offset) == 7){
|
|
dissect_gsm_map_CellGlobalIdOrServiceAreaIdFixedLength(TRUE, tvb, start_offset, actx, subtree, hf_camel_cellGlobalIdOrServiceAreaIdFixedLength);
|
|
}else{
|
|
dissect_gsm_map_LAIFixedLength(TRUE, tvb, start_offset, actx, subtree, hf_camel_locationAreaId);
|
|
}
|
|
#.END
|
|
|
|
#----------------------------------------------------------------------------------------
|
|
|
|
#.TYPE_ATTR
|
|
CallingPartysCategory TYPE = FT_UINT16 DISPLAY = BASE_DEC STRINGS = VALS(isup_calling_partys_category_value)
|
|
PDPTypeOrganization TYPE = FT_UINT8 DISPLAY = BASE_DEC BITMASK = 0x0f STRINGS = VALS(gsm_map_PDP_Type_Organisation_vals)
|
|
DateAndTime TYPE = FT_STRING DISPLAY = NONE
|
|
AccessPointName TYPE = FT_STRING DISPLAY = NONE
|
|
#.END
|