Remove proto_tree_add_text from GSM dissectors.

Change-Id: I72a7c1a44bda7755d8b1376dd5e57c46f137ff31
Reviewed-on: https://code.wireshark.org/review/7870
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Michael Mann 2015-03-29 10:45:16 -04:00 committed by Anders Broman
parent 752f5de719
commit e74cb413b4
3 changed files with 591 additions and 594 deletions

View File

@ -550,6 +550,7 @@ static int proto_a_common = -1;
int gsm_a_tap = -1;
int hf_gsm_a_common_elem_id = -1;
static int hf_gsm_a_common_elem_id_f0 = -1;
static int hf_gsm_a_l_ext = -1;
int hf_gsm_a_tmsi = -1;
static int hf_gsm_a_imei = -1;
@ -586,6 +587,7 @@ static int hf_gsm_a_mbs_ses_id_ind = -1;
static int hf_gsm_a_mbs_service_id = -1;
static int hf_gsm_a_mbs_session_id = -1;
static int hf_gsm_a_length = -1;
static int hf_gsm_a_element_value = -1;
int hf_gsm_a_extension = -1;
int hf_gsm_a_L3_protocol_discriminator = -1;
int hf_gsm_a_call_prio = -1;
@ -730,9 +732,27 @@ static int hf_gsm_a_geo_loc_uncertainty_radius = -1;
static int hf_gsm_a_geo_loc_offset_angle = -1;
static int hf_gsm_a_geo_loc_included_angle = -1;
/* Generated from convert_proto_tree_add_text.pl */
static int hf_gsm_a_filler = -1;
static int hf_gsm_a_identity_digit1 = -1;
static int hf_gsm_a_group_call_reference = -1;
static int hf_gsm_a_service_flag = -1;
static int hf_gsm_a_af_acknowledgement = -1;
static int hf_gsm_a_call_priority = -1;
static int hf_gsm_a_ciphering_info = -1;
static int hf_gsm_a_sapi = -1;
static int hf_gsm_a_mobile_country_code = -1;
static int hf_gsm_a_mobile_network_code = -1;
static int ett_gsm_a_plmn = -1;
static expert_field ei_gsm_a_extraneous_data = EI_INIT;
static expert_field ei_gsm_a_unknown_element = EI_INIT;
static expert_field ei_gsm_a_unknown_pdu_type = EI_INIT;
static expert_field ei_gsm_a_no_element_dissector = EI_INIT;
static expert_field ei_gsm_a_format_not_supported = EI_INIT;
static expert_field ei_gsm_a_mobile_identity_type = EI_INIT;
static char a_bigbuf[1024];
@ -1270,9 +1290,7 @@ guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei
{
if (elem_funcs[idx] == NULL)
{
proto_tree_add_text(subtree,
tvb, curr_offset + 1 + lengt_length, parm_len,
"Element Value");
proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1 + lengt_length, parm_len, ENC_NA);
/* See ASSERT above */
consumed = (guint8)parm_len;
}
@ -1364,9 +1382,7 @@ guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 ie
{
if (elem_funcs[idx] == NULL)
{
proto_tree_add_text(subtree,
tvb, curr_offset + 1 + lengt_length, parm_len,
"Element Value");
proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1 + lengt_length, parm_len, ENC_NA);
/* See ASSERT above */
consumed = parm_len;
}
@ -1446,9 +1462,7 @@ guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 i
{
if (elem_funcs[idx] == NULL)
{
proto_tree_add_text(subtree,
tvb, curr_offset + 1 + 2, parm_len,
"Element Value");
proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1 + 2, parm_len, ENC_NA);
/* See ASSERT above */
consumed = parm_len;
}
@ -1522,10 +1536,7 @@ guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei,
if (elem_funcs[idx] == NULL)
{
/* BAD THING, CANNOT DETERMINE LENGTH */
proto_tree_add_text(subtree,
tvb, curr_offset + 1, 1,
"No element dissector, rest of dissection may be incorrect");
expert_add_info(pinfo, item, &ei_gsm_a_no_element_dissector);
consumed = 1;
}
@ -1569,7 +1580,6 @@ guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint
gint *elem_ett;
const gchar *elem_name;
guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len);
char buf[10+1];
curr_offset = offset;
consumed = 0;
@ -1593,19 +1603,13 @@ guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint
subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, -1, elem_ett[idx], &item,
"%s%s", elem_name, (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
other_decode_bitfield_value(buf, oct, 0xf0, 8);
proto_tree_add_text(subtree,
tvb, curr_offset, 1,
"%s = Element ID: 0x%1x-",
buf, oct>>4);
proto_tree_add_item(subtree, hf_gsm_a_common_elem_id_f0, tvb, curr_offset, 1, ENC_NA);
if (elem_funcs[idx] == NULL)
{
/* BAD THING, CANNOT DETERMINE LENGTH */
proto_tree_add_text(subtree,
tvb, curr_offset, 1,
"No element dissector, rest of dissection may be incorrect");
expert_add_info(pinfo, item, &ei_gsm_a_no_element_dissector);
consumed++;
}
@ -1709,9 +1713,7 @@ elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int
{
if (elem_funcs[idx] == NULL)
{
proto_tree_add_text(subtree,
tvb, curr_offset + 1, parm_len,
"Element Value");
proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 1, parm_len, ENC_NA);
consumed = parm_len;
}
@ -1777,9 +1779,7 @@ guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_
{
if (elem_funcs[idx] == NULL)
{
proto_tree_add_text(subtree,
tvb, curr_offset + 2, parm_len,
"Element Value");
proto_tree_add_item(subtree, hf_gsm_a_element_value, tvb, curr_offset + 2, parm_len, ENC_NA);
consumed = parm_len;
}
@ -1829,10 +1829,7 @@ guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_typ
if (elem_name == NULL || elem_funcs[idx] == NULL)
{
/* BAD THING, CANNOT DETERMINE LENGTH */
proto_tree_add_text(tree,
tvb, curr_offset, 1,
"No element dissector, rest of dissection may be incorrect");
proto_tree_add_expert(tree, pinfo, &ei_gsm_a_no_element_dissector, tvb, curr_offset, 1);
consumed = 1;
}
@ -2185,6 +2182,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
guint32 value;
gboolean odd;
const gchar *digit_str;
proto_item* ti;
curr_offset = offset;
@ -2204,8 +2202,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
if (len > 1)
{
proto_tree_add_text(tree, tvb, curr_offset, len - 1,
"Format not supported");
expert_add_info(pinfo, tree, &ei_gsm_a_format_not_supported);
}
curr_offset += len - 1;
@ -2250,26 +2247,18 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
{
oct = tvb_get_guint8(tvb, curr_offset - 1);
other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
proto_tree_add_text(tree,
tvb, curr_offset - 1, 1,
"%s = Filler",
a_bigbuf);
proto_tree_add_item(tree, hf_gsm_a_filler, tvb, curr_offset - 1, 1, ENC_NA);
}
break;
case 2: /* IMEI */
other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
proto_tree_add_text(tree,
tvb, curr_offset, 1,
"%s = Identity Digit 1: %c",
a_bigbuf,
Dgt1_9_bcd.out[(oct & 0xf0) >> 4]);
proto_tree_add_uint_format_value(tree, hf_gsm_a_identity_digit1, tvb, curr_offset, 1, oct, "%c", Dgt1_9_bcd.out[(oct & 0xf0) >> 4]);
proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
/* XXX - dynamically allocate a_bigbuf since the only use is now here */
a_bigbuf[0] = Dgt1_9_bcd.out[(oct & 0xf0) >> 4];
curr_offset++;
@ -2342,9 +2331,8 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
default: /* Reserved */
proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_text(tree, tvb, curr_offset, len,
"Mobile station identity Format %u, Format Unknown", (oct & 0x07));
ti = proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
expert_add_info_format(pinfo, ti, &ei_gsm_a_mobile_identity_type, "Unknown format %u", (oct & 0x07));
if (add_string)
g_snprintf(add_string, string_len, " - Format Unknown");
@ -3256,66 +3244,32 @@ guint16 de_spare_nibble(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
/*
* [3] 10.5.1.9 Descriptive group or broadcast call reference
*/
static const true_false_string tfs_vgcs_vbs = { "VGCS (Group call reference)", "VBS (Broadcast call reference)" };
static const value_string gsm_a_call_priority_vals[] = {
{ 0, "no priority applied"},
{ 1, "call priority level 4"},
{ 2, "call priority level 3"},
{ 3, "call priority level 2"},
{ 4, "call priority level 1"},
{ 5, "call priority level 0"},
{ 6, "call priority level B"},
{ 7, "call priority level A"},
{ 0, NULL }
};
guint16
de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint8 oct;
guint32 value;
guint32 curr_offset;
const gchar *str;
curr_offset = offset;
value = tvb_get_ntohl(tvb, curr_offset);
other_decode_bitfield_value(a_bigbuf, value, 0xffffffe0, 32);
proto_tree_add_text(tree, tvb, curr_offset, 4,
"%s = Group or Broadcast call reference: %u (0x%04x)",
a_bigbuf,
(value & 0xffffffe0) >> 5,
(value & 0xffffffe0) >> 5);
other_decode_bitfield_value(a_bigbuf, value, 0x00000010, 32);
proto_tree_add_text(tree, tvb, curr_offset, 4,
"%s = SF Service Flag: %s",
a_bigbuf,
(value & 0x00000010) ?
"VGCS (Group call reference)" : "VBS (Broadcast call reference)");
other_decode_bitfield_value(a_bigbuf, value, 0x00000008, 32);
proto_tree_add_text(tree, tvb, curr_offset, 4,
"%s = AF Acknowledgement Flag: acknowledgment is %srequired",
a_bigbuf,
(value & 0x00000008) ? "" : "not ");
switch (value & 0x00000007)
{
case 1: str = "call priority level 4"; break;
case 2: str = "call priority level 3"; break;
case 3: str = "call priority level 2"; break;
case 4: str = "call priority level 1"; break;
case 5: str = "call priority level 0"; break;
case 6: str = "call priority level B"; break;
case 7: str = "call priority level A"; break;
default:
str = "no priority applied";
break;
}
other_decode_bitfield_value(a_bigbuf, value, 0x00000007, 32);
proto_tree_add_text(tree, tvb, curr_offset, 4,
"%s = Call Priority: %s",
a_bigbuf,
str);
guint32 curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_group_call_reference, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_service_flag, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_af_acknowledgement, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_call_priority, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
curr_offset += 4;
oct = tvb_get_guint8(tvb, curr_offset);
other_decode_bitfield_value(a_bigbuf, oct, 0xf0, 8);
proto_tree_add_text(tree, tvb, curr_offset, 1,
"%s = Ciphering Information",
a_bigbuf);
proto_tree_add_item(tree, hf_gsm_a_ciphering_info, tvb, curr_offset, 1, ENC_NA);
proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3)+4, 4, ENC_BIG_ENDIAN);
curr_offset++;
@ -3328,18 +3282,22 @@ de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3
/*
* [3] 10.5.1.10a PD and SAPI $(CCBS)$
*/
static const value_string gsm_a_sapi_vals[] = {
{ 0, "SAPI 0"},
{ 1, "Reserved"},
{ 2, "Reserved"},
{ 3, "SAPI 3"},
{ 0, NULL }
};
static guint16
de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint8 oct;
guint32 curr_offset;
proto_tree *subtree;
const gchar *str;
curr_offset = offset;
oct = tvb_get_guint8(tvb, curr_offset);
subtree =
proto_tree_add_subtree(tree,
tvb, curr_offset, 1, ett_gsm_dtap_elem[DE_PD_SAPI], NULL,
@ -3347,20 +3305,7 @@ de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offs
proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 2, ENC_BIG_ENDIAN);
switch ((oct & 0x30) >> 4)
{
case 0: str = "SAPI 0"; break;
case 3: str = "SAPI 3"; break;
default:
str = "Reserved";
break;
}
other_decode_bitfield_value(a_bigbuf, oct, 0x30, 8);
proto_tree_add_text(subtree, tvb, curr_offset, 1,
"%s = SAPI (Service Access Point Identifier): %s",
a_bigbuf,
str);
proto_tree_add_item(subtree, hf_gsm_a_sapi, tvb, curr_offset, 1, ENC_NA);
proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
@ -3489,33 +3434,31 @@ de_plmn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset
gchar mcc[4];
gchar mnc[4];
guint8 num_plmn;
proto_tree* subtree;
curr_offset = offset;
num_plmn = 0;
while ((len - (curr_offset - offset)) >= 3)
{
octs[0] = tvb_get_guint8(tvb, curr_offset);
octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
octs[0] = tvb_get_guint8(tvb, curr_offset);
octs[1] = tvb_get_guint8(tvb, curr_offset + 1);
octs[2] = tvb_get_guint8(tvb, curr_offset + 2);
mcc_mnc_aux(octs, mcc, mnc);
mcc_mnc_aux(octs, mcc, mnc);
proto_tree_add_text(tree,
tvb, curr_offset, 3,
"PLMN[%u] Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s",
num_plmn + 1,
mcc,
mnc);
subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 3, ett_gsm_a_plmn, NULL, "PLMN[%u]", num_plmn + 1);
proto_tree_add_string(subtree, hf_gsm_a_mobile_country_code, tvb, curr_offset, 3, mcc);
proto_tree_add_string(subtree, hf_gsm_a_mobile_network_code, tvb, curr_offset, 3, mnc);
curr_offset += 3;
curr_offset += 3;
num_plmn++;
num_plmn++;
}
if (add_string)
g_snprintf(add_string, string_len, " - %u PLMN%s",
num_plmn, plurality(num_plmn, "", "s"));
g_snprintf(add_string, string_len, " - %u PLMN%s",
num_plmn, plurality(num_plmn, "", "s"));
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_extraneous_data);
@ -3622,6 +3565,11 @@ proto_register_gsm_a_common(void)
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_gsm_a_common_elem_id_f0,
{ "Element ID", "gsm_a.common.elem_id",
FT_UINT8, BASE_HEX, NULL, 0xF0,
NULL, HFILL }
},
{ &hf_gsm_a_l_ext,
{ "ext", "gsm_a.l_ext",
FT_UINT8, BASE_DEC, NULL, 0x80,
@ -3792,6 +3740,11 @@ proto_register_gsm_a_common(void)
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_gsm_a_element_value,
{ "Element Value", "gsm_a.element_value",
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL }
},
{ &hf_gsm_a_extension,
{ "Extension", "gsm_a.extension",
FT_BOOLEAN, 8, TFS(&gsm_a_extension_value), 0x80,
@ -4497,10 +4450,21 @@ proto_register_gsm_a_common(void)
FT_UINT8, BASE_DEC_HEX, NULL, 0x00,
NULL, HFILL }
},
/* Generated from convert_proto_tree_add_text.pl */
{ &hf_gsm_a_filler, { "Filler", "gsm_a.filler", FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL }},
{ &hf_gsm_a_identity_digit1, { "Identity Digit 1", "gsm_a.identity_digit1", FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL }},
{ &hf_gsm_a_group_call_reference, { "Group or Broadcast call reference", "gsm_a.group_call_reference", FT_UINT32, BASE_DEC_HEX, NULL, 0xffffffe0, NULL, HFILL }},
{ &hf_gsm_a_service_flag, { "SF Service Flag", "gsm_a.service_flag", FT_BOOLEAN, 32, TFS(&tfs_vgcs_vbs), 0x00000010, NULL, HFILL }},
{ &hf_gsm_a_af_acknowledgement, { "AF Acknowledgement", "gsm_a.af_acknowledgement", FT_BOOLEAN, 32, TFS(&tfs_required_not_required), 0x00000008, NULL, HFILL }},
{ &hf_gsm_a_call_priority, { "Call Priority", "gsm_a.call_priority", FT_UINT32, BASE_DEC, VALS(gsm_a_call_priority_vals), 0x00000007, NULL, HFILL }},
{ &hf_gsm_a_ciphering_info, { "Ciphering Information", "gsm_a.ciphering_info", FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL }},
{ &hf_gsm_a_sapi, { "SAPI (Service Access Point Identifier)", "gsm_a.sapi", FT_UINT8, BASE_DEC, VALS(gsm_a_sapi_vals), 0x30, NULL, HFILL }},
{ &hf_gsm_a_mobile_country_code, { "Mobile Country Code (MCC)", "gsm_a.mobile_country_code", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_gsm_a_mobile_network_code, { "Mobile Network Code (MNC)", "gsm_a.mobile_network_code", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 0
#define NUM_INDIVIDUAL_ELEMS 1
static gint *ett[NUM_INDIVIDUAL_ELEMS +
NUM_GSM_COMMON_ELEM];
@ -4508,12 +4472,16 @@ proto_register_gsm_a_common(void)
{ &ei_gsm_a_extraneous_data, { "gsm_a.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
{ &ei_gsm_a_unknown_element, { "gsm_a.unknown_element", PI_PROTOCOL, PI_ERROR, "Unknown - aborting dissection", EXPFILL }},
{ &ei_gsm_a_unknown_pdu_type, { "gsm_a.unknown_pdu_type", PI_PROTOCOL, PI_WARN, "Unknown PDU type", EXPFILL }},
{ &ei_gsm_a_no_element_dissector, { "gsm_a.no_element_dissector", PI_PROTOCOL, PI_WARN, "No element dissector, rest of dissection may be incorrect", EXPFILL }},
{ &ei_gsm_a_format_not_supported, { "gsm_a.format_not_supported", PI_PROTOCOL, PI_WARN, "Format not supported", EXPFILL }},
{ &ei_gsm_a_mobile_identity_type, { "gsm_a.ie.mobileid.type.unknown", PI_PROTOCOL, PI_WARN, "Format unknown", EXPFILL }},
};
expert_module_t* expert_a_common;
last_offset = NUM_INDIVIDUAL_ELEMS;
ett[0] = &ett_gsm_a_plmn;
for (i=0; i < NUM_GSM_COMMON_ELEM; i++, last_offset++)
{
ett_gsm_common_elem[i] = -1;

View File

@ -535,6 +535,7 @@ static int hf_gsm_a_dtap_location = -1;
static int hf_gsm_a_dtap_progress_description = -1;
static int hf_gsm_a_dtap_afi = -1;
static int hf_gsm_a_dtap_rej_cause = -1;
static int hf_gsm_a_dtap_timezone = -1;
static int hf_gsm_a_dtap_u2u_prot_discr = -1;
static int hf_gsm_a_dtap_mcat = -1;
static int hf_gsm_a_dtap_enicm = -1;
@ -591,6 +592,9 @@ static int hf_gsm_a_dtap_multi_party_auxiliary_state = -1;
static int hf_gsm_a_dtap_parity_information = -1;
static int hf_gsm_a_dtap_channel_coding03 = -1;
static int hf_gsm_a_dtap_channel_coding30 = -1;
static int hf_gsm_a_dtap_loop_mechanism0E = -1;
static int hf_gsm_a_dtap_loop_mechanism1C = -1;
static int hf_gsm_a_dtap_multislot_tch = -1;
static int hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F43_2 = -1;
static int hf_gsm_a_dtap_ue_positioning_technology = -1;
static int hf_gsm_a_dtap_acceptable_channel_codings_TCH_F4_8 = -1;
@ -609,6 +613,7 @@ static int hf_gsm_a_dtap_other_itc = -1;
static int hf_gsm_a_dtap_negotiation = -1;
static int hf_gsm_a_dtap_rate_adaption = -1;
static int hf_gsm_a_dtap_ms_positioning_technology = -1;
static int hf_gsm_a_dtap_ue_test_loop_mode = -1;
static int hf_gsm_a_dtap_number_of_data_bits = -1;
static int hf_gsm_a_dtap_follow_on_request = -1;
static int hf_gsm_a_dtap_repeat_indicator = -1;
@ -620,9 +625,13 @@ static int hf_gsm_a_dtap_congestion_level = -1;
static int hf_gsm_a_dtap_access_identity = -1;
static int hf_gsm_a_dtap_modem_type = -1;
static int hf_gsm_a_dtap_test_loop = -1;
static int hf_gsm_a_dtap_subchannel = -1;
static int hf_gsm_a_dtap_ack_element = -1;
static int hf_gsm_a_dtap_layer_1_identity = -1;
static int hf_gsm_a_dtap_ciphering_key_sequence_number70 = -1;
static int hf_gsm_a_dtap_tp_pdu_description = -1;
static int hf_gsm_a_dtap_mode_flag = -1;
static int hf_gsm_a_dtap_egprs_mode_flag = -1;
static int hf_gsm_a_dtap_dtmf = -1;
static int hf_gsm_a_dtap_coding = -1;
static int hf_gsm_a_dtap_nic_on_rx = -1;
@ -660,6 +669,17 @@ static int hf_gsm_a_dtap_time_zone_time = -1;
static int hf_gsm_a_dtap_acceptable_channel_codings_spare20 = -1;
static int hf_gsm_a_dtap_establishment = -1;
static int hf_gsm_a_dtap_duplex_mode = -1;
static int hf_gsm_a_dtap_subaddress = -1;
static int hf_gsm_a_dtap_subaddress_information = -1;
static int hf_gsm_a_dtap_message_elements = -1;
static int hf_gsm_a_dtap_rpdu = -1;
static int hf_gsm_a_dtap_timeslot_number = -1;
static int hf_gsm_a_dtap_uplink_rlc_sdu_size = -1;
static int hf_gsm_a_dtap_radio_bearer = -1;
static int hf_gsm_a_dtap_mbms_short_transmission_identity = -1;
static int hf_gsm_a_dtap_ue_received_rlc_sdu_counter_value = -1;
static int hf_gsm_a_dtap_num_lb_entities = -1;
static int hf_gsm_a_dtap_gcc_call_ref = -1;
static int hf_gsm_a_dtap_gcc_call_ref_has_priority = -1;
@ -720,6 +740,7 @@ static gint ett_bc_oct_6g = -1;
static gint ett_bc_oct_7 = -1;
static gint ett_epc_ue_tl_a_lb_setup = -1;
static gint ett_mm_timer = -1;
static gint ett_ue_test_loop_mode = -1;
static expert_field ei_gsm_a_dtap_keypad_info_not_dtmf_digit = EI_INIT;
static expert_field ei_gsm_a_dtap_text_string_not_multiple_of_7 = EI_INIT;
@ -729,6 +750,8 @@ static expert_field ei_gsm_a_dtap_auts = EI_INIT;
static expert_field ei_gsm_a_dtap_end_mark_unexpected = EI_INIT;
static expert_field ei_gsm_a_dtap_extraneous_data = EI_INIT;
static expert_field ei_gsm_a_dtap_missing_mandatory_element = EI_INIT;
static expert_field ei_gsm_a_dtap_coding_scheme = EI_INIT;
static char a_bigbuf[1024];
@ -871,12 +894,22 @@ static const value_string gsm_a_dtap_number_of_spare_bits_vals[] = {
const true_false_string tfs_add_ci = { "The MS should add the letters for the Country's Initials and a separator (e.g. a space) to the text string",
"The MS should not add the letters for the Country's Initials to the text string" };
static const value_string gsm_a_dtap_coding_scheme_vals[] = {
{ 0, "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 23.038"},
{ 1, "UCS2 (16 bit)"},
{ 2, "Reserved"},
{ 3, "Reserved"},
{ 4, "Reserved"},
{ 5, "Reserved"},
{ 6, "Reserved"},
{ 7, "Reserved"},
{ 0, NULL }
};
static guint16
de_network_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint8 oct;
guint32 curr_offset;
const gchar *str;
guint8 coding_scheme, num_spare_bits;
guint32 num_text_bits;
gchar *net_name = NULL;
@ -889,16 +922,8 @@ de_network_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off
proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
coding_scheme = (oct & 0x70) >> 4;
switch (coding_scheme)
{
case 0x00: str = "Cell Broadcast data coding scheme, GSM default alphabet, language unspecified, defined in 3GPP TS 23.038"; break;
case 0x01: str = "UCS2 (16 bit)"; break;
default:
str = "Reserved";
break;
}
proto_tree_add_item(tree, hf_gsm_a_dtap_coding_scheme, tvb, curr_offset, 1, ENC_NA);
proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_coding_scheme, tvb, curr_offset, 1, oct, "%s", str);
proto_tree_add_item(tree, hf_gsm_a_dtap_add_ci, tvb, curr_offset, 1, ENC_NA);
num_spare_bits = oct & 0x07;
@ -922,9 +947,7 @@ de_network_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off
proto_tree_add_string(tree, hf_gsm_a_dtap_text_string, tvb, curr_offset, len - 1, net_name);
break;
default:
proto_tree_add_text(tree,
tvb, curr_offset, len - 1,
"Text string encoded according to an unknown Coding Scheme");
proto_tree_add_expert(tree, pinfo, &ei_gsm_a_dtap_coding_scheme, tvb, curr_offset, len - 1);
}
return (len);
@ -1019,10 +1042,7 @@ de_time_zone(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of
sign = (oct & 0x08)?'-':'+';
oct = (oct >> 4) + (oct & 0x07) * 10;
proto_tree_add_text(tree,
tvb, curr_offset, 1,
"Timezone: GMT %c %d hours %d minutes",
sign, oct / 4, oct % 4 * 15);
proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_timezone, tvb, curr_offset, 1, oct, "GMT %c %d hours %d minutes", sign, oct / 4, oct % 4 * 15);
curr_offset++;
/* no length check possible */
@ -1082,10 +1102,7 @@ de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
sign = (oct & 0x08)?'-':'+';
oct = (oct >> 4) + (oct & 0x07) * 10;
proto_tree_add_text(tree,
tvb, curr_offset, 1,
"Timezone: GMT %c %d hours %d minutes",
sign, oct / 4, oct % 4 * 15);
proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_timezone, tvb, curr_offset, 1, oct, "GMT %c %d hours %d minutes", sign, oct / 4, oct % 4 * 15);
curr_offset++;
@ -1109,7 +1126,7 @@ de_lsa_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offse
curr_offset = offset;
if (len == 0) {
proto_tree_add_text(tree,tvb, curr_offset, len,"LSA ID not included");
proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_lsa_id, tvb, curr_offset, len, 0, "not included");
}
else
{
@ -2344,9 +2361,7 @@ de_sub_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
IA5_7BIT_decode(a_bigbuf, ia5_string, ia5_string_len);
*address_extracted = TRUE;
item = proto_tree_add_text(tree,
tvb, curr_offset, len - (curr_offset - offset),
"Subaddress: %s", a_bigbuf);
item = proto_tree_add_string(tree, hf_gsm_a_dtap_subaddress, tvb, curr_offset, len - (curr_offset - offset), a_bigbuf);
if (invalid_ia5_char)
expert_add_info(pinfo, item, &ei_gsm_a_dtap_invalid_ia5_character);
@ -2355,9 +2370,7 @@ de_sub_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
}
}
proto_tree_add_text(tree,
tvb, curr_offset, len - (curr_offset - offset),
"Subaddress information");
proto_tree_add_item(tree, hf_gsm_a_dtap_subaddress_information, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
return (len);
}
@ -3359,8 +3372,7 @@ de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off
curr_offset = offset;
proto_tree_add_text(tree, tvb, curr_offset, len,
"RPDU (not displayed)");
proto_tree_add_bytes_format(tree, hf_gsm_a_dtap_rpdu, tvb, curr_offset, len, NULL, "RPDU (not displayed)");
/*
* dissect the embedded RP message
@ -3415,6 +3427,9 @@ de_cp_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
return (curr_offset - offset);
}
static const true_false_string tfs_gsm_a_dtap_subchannel = { "Only one TCH active or sub-channel 0 of two half rate channels is to be looped", "Sub-channel 1 of two half rate channels is to be looped" };
static guint16
de_tp_sub_channel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
@ -3442,18 +3457,8 @@ de_tp_sub_channel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
else
str = "unknown";
proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_test_loop, tvb, curr_offset, 1,
oct, "%s", str);
if (oct & 0x01)
proto_tree_add_text(tree,
tvb, curr_offset, 1,
"Only one TCH active or sub-channel 0 of two half rate channels is to be looped");
else
proto_tree_add_text(tree,
tvb, curr_offset, 1,
"Sub-channel 1 of two half rate channels is to be looped");
proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_test_loop, tvb, curr_offset, 1, oct, "%s", str);
proto_tree_add_item(tree, hf_gsm_a_dtap_subchannel, tvb, curr_offset, 1, ENC_NA);
curr_offset+= 1;
return (curr_offset - offset);
@ -3470,9 +3475,9 @@ de_tp_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offse
oct = tvb_get_guint8(tvb, curr_offset);
if ((oct & 0xF0) == 0x80)
proto_tree_add_text(tree,tvb, curr_offset, 1, "Acknowledgment element: %d",oct&0x01);
proto_tree_add_uint(tree, hf_gsm_a_dtap_ack_element, tvb, curr_offset, 1, oct&0x01);
else
proto_tree_add_text(tree,tvb, curr_offset, 1, "No acknowledgment element present");
proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_ack_element, tvb, curr_offset, 1, 0xFF, "No acknowledgment element present");
curr_offset+= 1;
@ -3487,6 +3492,18 @@ static const value_string gsm_channel_coding_vals[] = {
{ 0, NULL }
};
static const value_string gsm_a_dtap_loop_mech_vals[] = {
{ 0, "Multi-slot mechanism 1"},
{ 1, "Multi-slot mechanism 2"},
{ 2, "Reserved"},
{ 3, "Reserved"},
{ 4, "Reserved"},
{ 5, "Reserved"},
{ 6, "Reserved"},
{ 7, "Reserved"},
{ 0, NULL }
};
static guint16
de_tp_loop_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
@ -3498,19 +3515,11 @@ de_tp_loop_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
oct = tvb_get_guint8(tvb, curr_offset);
proto_tree_add_item(tree, hf_gsm_a_dtap_channel_coding03, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_dtap_loop_mechanism1C, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
switch (oct & 0x1c)
if ((oct & 0x1c) == 0)
{
case 0x00:
proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 1");
proto_tree_add_text(tree, tvb, curr_offset, 1, "Timeslot number %d",(oct & 0xe0)>>5);
break;
case 0x04:
proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 2");
break;
default:
proto_tree_add_text(tree, tvb, curr_offset, 1, "Loop mechanism reserved (%d)",(oct & 0x1c)>>2);
break;
proto_tree_add_item(tree, hf_gsm_a_dtap_timeslot_number, tvb, curr_offset, 1, ENC_NA);
}
curr_offset+= 1;
@ -3518,36 +3527,16 @@ de_tp_loop_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
return (curr_offset - offset);
}
static const true_false_string tfs_multislot_tch = { "not closed due to error", "closed successfully" };
static guint16
de_tp_loop_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guchar oct;
curr_offset = offset;
oct = tvb_get_guint8(tvb, curr_offset);
guint32 curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_dtap_channel_coding30, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
switch (oct & 0x0e)
{
case 0x00:
proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 1");
break;
case 0x02:
proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot mechanism 2");
break;
default:
proto_tree_add_text(tree, tvb, curr_offset, 1, "Loop mechanism reserved (%d)",(oct & 0x0e)>>1);
break;
}
if (oct & 0x01)
proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot TCH loop was not closed due to error");
else
proto_tree_add_text(tree, tvb, curr_offset, 1, "Multi-slot TCH loop was closed successfully");
proto_tree_add_item(tree, hf_gsm_a_dtap_loop_mechanism0E, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_dtap_multislot_tch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset+= 1;
return (curr_offset - offset);
@ -3604,21 +3593,14 @@ de_tp_pdu_description(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g
return (curr_offset - offset);
}
static const true_false_string tfs_gsm_a_dtap_mode_flag = { "MS shall select the loop back option", "MS shall itself generate the pseudorandom data" };
static guint16
de_tp_mode_flag(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guchar oct;
curr_offset = offset;
oct = tvb_get_guint8(tvb, curr_offset);
if (oct & 0x01)
proto_tree_add_text(tree, tvb, curr_offset, 1, "MS shall select the loop back option");
else
proto_tree_add_text(tree, tvb, curr_offset, 1, "MS shall itself generate the pseudorandom data");
guint32 curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_dtap_mode_flag, tvb, curr_offset, 1, ENC_NA);
proto_tree_add_item(tree, hf_gsm_a_dtap_downlink_timeslot_offset, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset+= 1;
@ -3626,21 +3608,15 @@ de_tp_mode_flag(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
return (curr_offset - offset);
}
static const true_false_string tfs_gsm_a_dtap_egprs_mode_flag = { "MS loops back blocks on the uplink using GMSK modulation only",
"MS loops back blocks on the uplink using either GMSK or 8-PSK modulation following the detected received modulation" };
static guint16
de_tp_egprs_mode_flag(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guchar oct;
curr_offset = offset;
oct = tvb_get_guint8(tvb, curr_offset);
if (oct & 0x01)
proto_tree_add_text(tree, tvb, curr_offset, 1, "MS loops back blocks on the uplink using GMSK modulation only");
else
proto_tree_add_text(tree, tvb, curr_offset, 1, "MS loops back blocks on the uplink using either GMSK or 8-PSK modulation following the detected received modulation");
guint32 curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_a_dtap_egprs_mode_flag, tvb, curr_offset, 1, ENC_NA);
proto_tree_add_item(tree, hf_gsm_a_dtap_downlink_timeslot_offset, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset+= 1;
@ -3670,6 +3646,14 @@ de_tp_ms_positioning_technology(tvbuff_t *tvb, proto_tree *tree, packet_info *pi
return (curr_offset - offset);
}
static const value_string gsm_a_dtap_ue_test_loop_mode_vals[] = {
{ 0, "Mode 1 loop back (loopback of RLC SDUs or PDCP SDUs)"},
{ 1, "Mode 2 loop back (loopback of transport block data and CRC bits)"},
{ 2, "Mode 3 RLC SDU counting (counting of received RLC SDUs)"},
{ 3, "Reserved"},
{ 0, NULL }
};
static guint16
de_tp_ue_test_loop_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
@ -3677,42 +3661,35 @@ de_tp_ue_test_loop_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
guchar oct;
guint8 lb_setup_length,i,j;
guint16 value;
proto_tree* subtree;
curr_offset = offset;
oct = tvb_get_guint8(tvb, curr_offset);
proto_tree_add_item(tree, hf_gsm_a_dtap_ue_test_loop_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset+= 1;
switch (oct & 0x03)
{
case 0:
{
proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 1 loop back (loopback of RLC SDUs or PDCP SDUs)");
lb_setup_length = tvb_get_guint8(tvb, curr_offset);
curr_offset += 1;
for (i=0,j=0; (i<lb_setup_length) && (j<4); i+=3,j++)
{
proto_tree_add_text(tree, tvb, curr_offset, 1, "LB setup RB IE %d",j+1);
subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 3, ett_ue_test_loop_mode, NULL, "LB setup RB IE: %d",j+1);
value = tvb_get_ntohs(tvb, curr_offset);
proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_uplink_rlc_sdu_size, tvb, curr_offset, 2, value, "%d bits", value);
curr_offset += 2;
proto_tree_add_text(tree, tvb, curr_offset, 1, "Uplink RLC SDU size is %d bits",value);
oct = tvb_get_guint8(tvb, curr_offset);
proto_tree_add_item(subtree, hf_gsm_a_dtap_radio_bearer, tvb, curr_offset, 1, ENC_NA);
curr_offset+= 1;
proto_tree_add_text(tree, tvb, curr_offset, 1, "Radio Bearer %d",oct & 0x1f);
}
break;
}
case 1:
proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 2 loop back (loopback of transport block data and CRC bits)");
break;
case 2:
proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode 3 RLC SDU counting (counting of received RLC SDUs)");
oct = tvb_get_guint8(tvb, curr_offset);
curr_offset+= 1;
proto_tree_add_text(tree, tvb, curr_offset, 1, "MBMS short transmission identity %d",(oct & 0x1f)+1);
break;
default:
proto_tree_add_text(tree, tvb, curr_offset, 1, "UE test loop mode reserved (%d)",oct & 0x03);
proto_tree_add_uint(tree, hf_gsm_a_dtap_mbms_short_transmission_identity, tvb, curr_offset, 1, (oct & 0x1f)+1);
break;
}
@ -3739,15 +3716,11 @@ de_tp_ue_positioning_technology(tvbuff_t *tvb, proto_tree *tree, packet_info *pi
static guint16
de_tp_rlc_sdu_counter_value(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint32 value;
guint32 curr_offset = offset;
curr_offset = offset;
value = tvb_get_ntohl(tvb, curr_offset);
proto_tree_add_item(tree, hf_gsm_a_dtap_ue_received_rlc_sdu_counter_value, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
curr_offset+= 4;
proto_tree_add_text(tree, tvb, curr_offset, 1, "UE received RLC SDU counter value: %d",value);
return (curr_offset - offset);
}
@ -3786,13 +3759,15 @@ de_tp_epc_ue_tl_a_lb_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _
guint32 count, nb_lb;
guint8 drb;
proto_tree *lb_setup_tree = NULL;
proto_item *ti;
curr_offset = offset;
count = 0;
nb_lb = len / 3;
proto_tree_add_text(tree, tvb, curr_offset, len, "Number of LB entities: %d", nb_lb);
ti = proto_tree_add_uint(tree, hf_gsm_a_dtap_num_lb_entities, tvb, curr_offset, 1, nb_lb);
proto_item_set_len(ti, len);
while ((count < nb_lb) && (count < 8)) {
lb_setup_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 3,
ett_epc_ue_tl_a_lb_setup, NULL, "LB entity %d", count);
@ -7035,9 +7010,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
*/
if (dtap_msg_fcn == NULL)
{
proto_tree_add_text(dtap_tree,
tvb, offset, len - offset,
"Message Elements");
proto_tree_add_item(dtap_tree, hf_gsm_a_dtap_message_elements, tvb, offset, len - offset, ENC_NA);
}
else
{
@ -7398,6 +7371,11 @@ proto_register_gsm_a_dtap(void)
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_timezone,
{ "Timezone", "gsm_a.dtap.timezone",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_u2u_prot_discr,
{ "User-user protocol discriminator", "gsm_a.dtap.u2u_prot_discr",
FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(gsm_a_dtap_u2u_prot_discr_vals), 0x00,
@ -7706,7 +7684,7 @@ proto_register_gsm_a_dtap(void)
/* Generated from convert_proto_tree_add_text.pl */
{ &hf_gsm_a_dtap_coding_scheme,
{ "Coding Scheme", "gsm_a.dtap.coding_scheme",
FT_UINT8, BASE_DEC, NULL, 0x70,
FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_coding_scheme_vals), 0x70,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_add_ci,
@ -7794,6 +7772,26 @@ proto_register_gsm_a_dtap(void)
FT_BOOLEAN, 8, TFS(&tfs_full_half), 0x08,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_subaddress,
{ "Subaddress", "gsm_a.dtap.subaddress",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_subaddress_information,
{ "Subaddress information", "gsm_a.dtap.subaddress_information",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_message_elements,
{ "Message Elements", "gsm_a.dtap.message_elements",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_rpdu,
{ "RPDU", "gsm_a.dtap.rpdu",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_configuration,
{ "Configuration", "gsm_a.dtap.configuration",
FT_BOOLEAN, 8, TFS(&tfs_bearer_cap_configuration), 0x04,
@ -8074,6 +8072,16 @@ proto_register_gsm_a_dtap(void)
FT_UINT8, BASE_DEC, NULL, 0x3f,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_subchannel,
{ "Subchannel", "gsm_a.dtap.subchannel",
FT_BOOLEAN, 8, TFS(&tfs_gsm_a_dtap_subchannel), 0x01,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_ack_element,
{ "Acknowledgment element", "gsm_a.dtap.ack_element",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_channel_coding03,
{ "Channel coding", "gsm_a.dtap.channel_coding",
FT_UINT8, BASE_DEC, VALS(gsm_channel_coding_vals), 0x03,
@ -8084,6 +8092,21 @@ proto_register_gsm_a_dtap(void)
FT_UINT8, BASE_DEC, VALS(gsm_channel_coding_vals), 0x30,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_loop_mechanism0E,
{ "Loop mechanism", "gsm_a.dtap.loop_mechanism",
FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_loop_mech_vals), 0x0e,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_loop_mechanism1C,
{ "Loop mechanism", "gsm_a.dtap.loop_mechanism",
FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_loop_mech_vals), 0x1c,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_multislot_tch,
{ "Multi-slot TCH loop", "gsm_a.dtap.multislot_tch",
FT_BOOLEAN, 8, TFS(&tfs_multislot_tch), 0x01,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_tp_tested_device,
{ "Tested device", "gsm_a.dtap.tp_tested_device",
FT_UINT8, BASE_DEC, NULL, 0x0,
@ -8094,6 +8117,16 @@ proto_register_gsm_a_dtap(void)
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_mode_flag,
{ "Mode flag", "gsm_a.dtap.mode_flag",
FT_BOOLEAN, 8, TFS(&tfs_gsm_a_dtap_mode_flag), 0x01,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_egprs_mode_flag,
{ "EGPRS Mode flag", "gsm_a.dtap.egprs_mode_flag",
FT_BOOLEAN, 8, TFS(&tfs_gsm_a_dtap_egprs_mode_flag), 0x01,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_downlink_timeslot_offset,
{ "Downlink Timeslot Offset", "gsm_a.dtap.downlink_timeslot_offset",
FT_UINT8, BASE_DEC, NULL, 0x0E,
@ -8104,6 +8137,11 @@ proto_register_gsm_a_dtap(void)
FT_UINT8, BASE_DEC, VALS(gsm_positioning_technology_vals), 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_ue_test_loop_mode,
{ "UE test loop mode", "gsm_a.dtap.ue_test_loop_mode",
FT_UINT8, BASE_DEC, VALS(gsm_a_dtap_ue_test_loop_mode_vals), 0x03,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_ue_positioning_technology,
{ "UE positioning technology", "gsm_a.dtap.ue_positioning_technology",
FT_UINT8, BASE_DEC, VALS(gsm_positioning_technology_vals), 0x0,
@ -8164,10 +8202,40 @@ proto_register_gsm_a_dtap(void)
FT_UINT8, BASE_DEC, NULL, DTAP_TIE_MASK,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_timeslot_number,
{ "Timeslot number", "gsm_a_dtap.timeslot_number",
FT_UINT8, BASE_DEC, NULL, 0xe0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_uplink_rlc_sdu_size,
{ "Uplink RLC SDU size", "gsm_a_dtap.uplink_rlc_sdu_size",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_radio_bearer,
{ "Radio Bearer", "gsm_a_dtap.radio_bearer",
FT_UINT8, BASE_DEC, NULL, 0x1F,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_mbms_short_transmission_identity,
{ "MBMS short transmission identity", "gsm_a_dtap.mbms_short_transmission_identity",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_ue_received_rlc_sdu_counter_value,
{ "UE received RLC SDU counter value", "gsm_a_dtap.ue_received_rlc_sdu_counter_value",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_gsm_a_dtap_num_lb_entities,
{ "Number of LB entities", "gsm_a_dtap.num_lb_entities",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
};
/* Setup protocol subtree array */
#define NUM_INDIVIDUAL_ELEMS 21
#define NUM_INDIVIDUAL_ELEMS 22
gint *ett[NUM_INDIVIDUAL_ELEMS +
NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_CC +
NUM_GSM_DTAP_MSG_SMS + NUM_GSM_DTAP_MSG_SS + NUM_GSM_DTAP_MSG_TP +
@ -8182,6 +8250,7 @@ proto_register_gsm_a_dtap(void)
{ &ei_gsm_a_dtap_keypad_info_not_dtmf_digit, { "gsm_a.dtap.keypad_info_not_dtmf_digit", PI_MALFORMED, PI_WARN, "Keypad information contains character that is not a DTMF digit", EXPFILL }},
{ &ei_gsm_a_dtap_extraneous_data, { "gsm_a.dtap.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
{ &ei_gsm_a_dtap_missing_mandatory_element, { "gsm_a.dtap.missing_mandatory_element", PI_PROTOCOL, PI_WARN, "Missing Mandatory element, rest of dissection is suspect", EXPFILL }},
{ &ei_gsm_a_dtap_coding_scheme, { "gsm_a.dtap.coding_scheme.unknown", PI_PROTOCOL, PI_WARN, "Text string encoded according to an unknown Coding Scheme", EXPFILL }},
};
expert_module_t* expert_a_dtap;
@ -8207,6 +8276,7 @@ proto_register_gsm_a_dtap(void)
ett[18] = &ett_bc_oct_7;
ett[19] = &ett_epc_ue_tl_a_lb_setup;
ett[20] = &ett_mm_timer;
ett[21] = &ett_ue_test_loop_mode;
last_offset = NUM_INDIVIDUAL_ELEMS;

File diff suppressed because it is too large Load Diff