static int hf_gsm_map_len = -1;
static int hf_gsm_map_disc_par = -1;
static int hf_gsm_map_dlci = -1;
+static int hf_gsm_apn_str = -1;
#include "packet-gsm_map-hf.c"
static gint ett_gsm_map_cbs_data_coding = -1;
static gint ett_gsm_map_GlobalCellId = -1;
static gint ett_gsm_map_GeographicalInformation = -1;
+static gint ett_gsm_map_apn_str = -1;
#include "packet-gsm_map-ett.c"
static dissector_handle_t ranap_handle;
static dissector_handle_t dtap_handle;
static dissector_handle_t map_handle;
-
+static dissector_table_t map_prop_arg_opcode_table; /* prorietary operation codes */
+static dissector_table_t map_prop_res_opcode_table; /* prorietary operation codes */
+static dissector_table_t map_prop_err_opcode_table; /* prorietary operation codes */
/* Preferenc settings default */
#define MAX_SSN 254
static range_t *global_ssn_range;
6-13.
*/
/* Allocation/Retention Priority */
- proto_tree_add_item(subtree, hf_gsm_map_ext_qos_subscribed_pri, tvb, offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_ext_qos_subscribed_pri, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Quality of Service Octets 6-13.( Octet 2 - 9 Here) */
/* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
- proto_tree_add_item(subtree, hf_gsm_map_qos_traffic_cls, tvb, offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_qos_traffic_cls, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 */
- proto_tree_add_item(subtree, hf_gsm_map_qos_del_order, tvb, offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_qos_del_order, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
- proto_tree_add_item(subtree, hf_gsm_map_qos_del_of_err_sdu, tvb, offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_qos_del_of_err_sdu, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Maximum SDU size, octet 7 (see 3GPP TS 23.107) */
}
offset++;
/* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
- proto_tree_add_item(subtree, hf_gsm_map_qos_ber, tvb, offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_qos_ber, tvb, offset, 1, ENC_BIG_ENDIAN);
/* SDU error ratio, octet 10 (see 3GPP TS 23.107) */
- proto_tree_add_item(subtree, hf_gsm_map_qos_sdu_err_rat, tvb, offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_qos_sdu_err_rat, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Transfer delay, octet 11 (See 3GPP TS 23.107) Bits 8 7 6 5 4 3 */
- proto_tree_add_item(subtree, hf_gsm_map_qos_transfer_delay, tvb, offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_qos_transfer_delay, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
- proto_tree_add_item(subtree, hf_gsm_map_qos_traff_hdl_pri, tvb, offset, 1, FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_qos_traff_hdl_pri, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Guaranteed bit rate for uplink, octet 12 (See 3GPP TS 23.107)
octet = tvb_get_guint8(tvb,0);
coding_grp = octet >>4;
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp, tvb, 0, 1, ENC_BIG_ENDIAN);
sms_encoding = SMS_ENCODING_NOT_SET;
switch (coding_grp){
case 0:
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp0_lang, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp0_lang, tvb, 0, 1, ENC_BIG_ENDIAN);
sms_encoding = SMS_ENCODING_7BIT;
break;
case 1:
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp1_lang, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp1_lang, tvb, 0, 1, ENC_BIG_ENDIAN);
if ((octet & 0x0f)== 0){
sms_encoding = SMS_ENCODING_7BIT_LANG;
}else{
}
break;
case 2:
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp2_lang, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp2_lang, tvb, 0, 1, ENC_BIG_ENDIAN);
sms_encoding = SMS_ENCODING_7BIT;
break;
case 3:
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp3_lang, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp3_lang, tvb, 0, 1, ENC_BIG_ENDIAN);
sms_encoding = SMS_ENCODING_7BIT;
break;
/* Coding_grp 01xx */
/* FALLTHRU */
case 7:
/* FALLTHRU */
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_comp, tvb, 0, 1, FALSE);
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_class_ind, tvb, 0, 1, FALSE);
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_char_set, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_comp, tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_class_ind, tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_char_set, tvb, 0, 1, ENC_BIG_ENDIAN);
if ((octet & 0x10)== 0x10){
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_class, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_class, tvb, 0, 1, ENC_BIG_ENDIAN);
}
/* Bits 3 and 2 indicate the character set being used, */
character_set = (octet&0x0c)>>2;
break;
case 9:
/* Message with User Data Header (UDH) structure:*/
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_char_set, tvb, 0, 1, FALSE);
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_class, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_char_set, tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp4_7_class, tvb, 0, 1, ENC_BIG_ENDIAN);
character_set = (octet&0x0c)>>2;
switch (character_set){
case 0:
break;
case 15:
/* Data coding / message handling */
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp15_mess_code, tvb, 0, 1, FALSE);
- proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp15_class, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp15_mess_code, tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gsm_map_cbs_coding_grp15_class, tvb, 0, 1, ENC_BIG_ENDIAN);
character_set = (octet&0x04)>>2;
if (character_set == 0){
sms_encoding = SMS_ENCODING_7BIT;
guint8 na;
guint8 np;
- proto_tree_add_item(tree, hf_gsm_map_extension, tvb, 0,1,FALSE);
- proto_tree_add_item(tree, hf_gsm_map_nature_of_number, tvb, 0,1,FALSE);
- proto_tree_add_item(tree, hf_gsm_map_number_plan, tvb, 0,1,FALSE);
+ proto_tree_add_item(tree, hf_gsm_map_extension, tvb, 0,1,ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gsm_map_nature_of_number, tvb, 0,1,ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gsm_map_number_plan, tvb, 0,1,ENC_BIG_ENDIAN);
digit_str = unpack_digits(tvb, 1);
case 46: /*mo-forwardSM*/
/* FALLTHRU */
if (application_context_version < 3) {
- return val_to_str(val, gsm_map_V1V2_opr_code_strings, "Unknown GSM-MAP (%u)");
+ return val_to_str_const(val, gsm_map_V1V2_opr_code_strings, "Unknown GSM-MAP opcode");
}
/* Else use the default map operation translation */
default:
- return val_to_str(val, gsm_old_GSMMAPOperationLocalvalue_vals, "Unknown GSM-MAP opcode (%u)");
+ return val_to_str_ext_const(val, &gsm_old_GSMMAPOperationLocalvalue_vals_ext, "Unknown GSM-MAP opcode");
break;
}
}
case 126: /*SS-protocol explicitCT no Argument*/
break;
default:
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ if(!dissector_try_uint(map_prop_arg_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
+ cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
+ proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
+ expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ }
+ offset+= tvb_length_remaining(tvb,offset);
+ break;
}
return offset;
}
break;
default:
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ if(!dissector_try_uint(map_prop_res_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
+ cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
+ proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
+ expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ }
+ offset+= tvb_length_remaining(tvb,offset);
+ break;
}
return offset;
}
offset=dissect_gsm_map_er_InformationNotAvailableParam(FALSE, tvb, offset, actx, tree, -1);
break;
default:
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode);
+ if(!dissector_try_uint(map_prop_err_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
+ cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
+ proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
+ expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode);
+ }
+ offset+= tvb_length_remaining(tvb,offset);
break;
}
return offset;
/* Get the length and add 2 */
gsm_map_pdu_size = tvb_get_guint8(tvb, offset+1)+2;
- col_add_str(actx->pinfo->cinfo, COL_INFO, val_to_str(gsmmap_pdu_type, gsm_old_Component_vals, "Unknown GSM-MAP PDU (%u)"));
+ col_add_str(actx->pinfo->cinfo, COL_INFO, val_to_str_const(gsmmap_pdu_type, gsm_old_Component_vals, "Unknown GSM-MAP Component"));
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " ");
offset = dissect_gsm_old_Component(FALSE, tvb, 0, actx, tree, hf_gsm_map_old_Component_PDU);
/*
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
-
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GSM MAP");
top_tree = parent_tree;
{ "DLCI", "gsm_map.disc_par",
FT_UINT8, BASE_DEC, NULL, 0,
"Data Link Connection Indicator", HFILL }},
+ { &hf_gsm_apn_str,
+ { "APN", "gsm_map.apn_str",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
#include "packet-gsm_map-hfarr.c"
};
&ett_gsm_map_cbs_data_coding,
&ett_gsm_map_GlobalCellId,
&ett_gsm_map_GeographicalInformation,
+ &ett_gsm_map_apn_str,
#include "packet-gsm_map-ettarr.c"
};
"GSM SMS TPDU", FT_UINT8,
BASE_DEC);
+ map_prop_arg_opcode_table = register_dissector_table("gsm_map.prop.arg.opcode", "Proprietary Opcodes", FT_UINT8, BASE_DEC);
+ map_prop_res_opcode_table = register_dissector_table("gsm_map.prop.res.opcode", "Proprietary Opcodes", FT_UINT8, BASE_DEC);
+ map_prop_err_opcode_table = register_dissector_table("gsm_map.prop.err.opcode", "Proprietary Opcodes", FT_UINT8, BASE_DEC);
+
gsm_map_tap = register_tap("gsm_map");
#include "packet-gsm_map-dis-tab.c" */