[E212]Modify dissect_e212_mcc_mnc() to take E212 number type as an
argument. While at it remove deprecated APIs Change-Id: Ib1a7e9d7aeba6379fb4492816a0ac602e67493c6 Reviewed-on: https://code.wireshark.org/review/6534 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
36aca292fb
commit
20e2c05d9b
|
@ -151,7 +151,7 @@ GPRSRecord
|
|||
return offset;
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_gprscdr_plmn_id);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, TRUE);
|
||||
|
||||
#.FN_BODY GPRSRecord VAL_PTR = &branch_taken
|
||||
proto_item *item;
|
||||
|
|
|
@ -669,7 +669,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LAIFixedLength);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_LAI, TRUE);
|
||||
|
||||
#.FN_BODY RadioResourceInformation VAL_PTR = ¶meter_tvb
|
||||
tvbuff_t *parameter_tvb;
|
||||
|
|
|
@ -156,12 +156,12 @@ ProtocolIE-Field/value ie_field_value
|
|||
tvbuff_t *parameter_tvb=NULL;
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
3, 3, FALSE, ¶meter_tvb);
|
||||
if(tvb_length(tvb)==0)
|
||||
if(tvb_reported_length(tvb)==0)
|
||||
return offset;
|
||||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, TRUE);
|
||||
#.END
|
||||
|
||||
#.FN_BODY Positioning-Method-And-Usage VAL_PTR = ¶meter_tvb
|
||||
|
|
|
@ -126,7 +126,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
#.END
|
||||
|
||||
#.FN_BODY IPAddress VAL_PTR = ¶meter_tvb
|
||||
|
@ -138,7 +138,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
proto_tree_add_item(tree, hf_m3ap_IPAddress, parameter_tvb, 0, tvb_len, ENC_NA);
|
||||
#.END
|
||||
|
||||
|
@ -152,7 +152,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
|
||||
time_str = tvb_ntp_fmt_ts(parameter_tvb, 0);
|
||||
proto_tree_add_string(tree, hf_m3ap_Absolute_Time_ofMBMS_Data_value, parameter_tvb, 0, tvb_len, time_str);
|
||||
|
@ -167,7 +167,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
|
||||
dissect_gtpv2_mbms_service_area(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
#.END
|
||||
|
@ -182,7 +182,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
|
||||
proto_item_append_text(actx->created_item, " ");
|
||||
dissect_gtpv2_mbms_session_duration(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
|
@ -197,7 +197,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
dissect_gtpv2_mbms_time_to_data_xfer(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
#.END
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
#.END
|
||||
|
||||
# FN_BODY MBMSSessionDuration VAL_PTR = ¶meter_tvb
|
||||
|
|
|
@ -213,7 +213,7 @@ obj_id = NULL;
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
#.END
|
||||
|
||||
#.FN_BODY ENBname VAL_PTR = parameter_tvb
|
||||
|
|
|
@ -165,7 +165,7 @@ Error-Indication N sabp.proc.imsg id-Error-Indication
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_sabp_e212);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, FALSE);
|
||||
|
||||
#.FN_BODY Data-Coding-Scheme VAL_PTR = ¶meter_tvb
|
||||
tvbuff_t *parameter_tvb=NULL;
|
||||
|
|
|
@ -105,7 +105,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
#.END
|
||||
|
||||
#.TYPE_ATTR
|
||||
|
|
|
@ -83,7 +83,7 @@ ProtocolIE-ContainerPairList
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
#.END
|
||||
|
||||
#.FN_BODY TargeteNBtoSource-eNBTransparentContainer VAL_PTR = ¶meter_tvb
|
||||
|
|
|
@ -1546,7 +1546,7 @@ dissect_bssap_global_cn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
*/
|
||||
plmn_item = proto_tree_add_item(global_cn_id_tree, hf_bssap_plmn_id, tvb, offset, 3, ENC_NA);
|
||||
plmn_tree = proto_item_add_subtree(plmn_item, ett_bssap_plmn);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, plmn_tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, plmn_tree, offset, E212_NONE, TRUE);
|
||||
offset = offset + 3;
|
||||
|
||||
/* Octet 6 - 7 CN-Id (INTEGER 0..4095) */
|
||||
|
|
|
@ -615,7 +615,7 @@ dissect_diameter_3gpp_tmgi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
|
|||
|
||||
proto_tree_add_item(sub_tree, hf_diameter_mbms_service_id, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
offset = offset+3;
|
||||
offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, offset, TRUE);
|
||||
offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, offset, E212_NONE, TRUE);
|
||||
|
||||
return offset;
|
||||
|
||||
|
|
|
@ -2714,9 +2714,9 @@ dissect_e212_mcc_mnc_wmem_packet_str(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
}
|
||||
|
||||
int
|
||||
dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian)
|
||||
dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, e212_number_type_t number_type, gboolean little_endian)
|
||||
{
|
||||
dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_NONE, little_endian);
|
||||
dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, number_type, little_endian);
|
||||
return offset +3;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ typedef enum {
|
|||
gchar* dissect_e212_mcc_mnc_wmem_packet_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, e212_number_type_t number_type, gboolean little_endian);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
int dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian);
|
||||
int dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, e212_number_type_t number_type, gboolean little_endian);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
int dissect_e212_mcc_mnc_in_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset);
|
||||
|
|
|
@ -1142,7 +1142,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
|||
break;
|
||||
case 0x13: /* location information */
|
||||
/* MCC/MNC / LAC / CellID */
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, elem_tree, pos, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, elem_tree, pos, E212_NONE, TRUE);
|
||||
proto_tree_add_item(elem_tree, hf_ctlv_loci_lac, tvb, pos+3, 2, ENC_BIG_ENDIAN);
|
||||
if (len == 5)
|
||||
break;
|
||||
|
@ -1372,7 +1372,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
|||
break;
|
||||
case 0x79: /* PLMN list */
|
||||
for (i = 0; i < len; i+=3) {
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, elem_tree, pos+3*i, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, elem_tree, pos+3*i, E212_NONE, TRUE);
|
||||
}
|
||||
break;
|
||||
case 0x7a:/* Broadcast Network Information */
|
||||
|
|
|
@ -1732,7 +1732,7 @@ dissect_gprscdr_PLMN_Id(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
|
|||
return offset;
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_gprscdr_plmn_id);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, TRUE);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1610,9 +1610,9 @@ be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offs
|
|||
/* FALLTHRU */
|
||||
case 0x0c: /* For identification of a UTRAN cell for cell load information: */
|
||||
if (disc != 0x0b)
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
|
||||
else
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, FALSE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, FALSE);
|
||||
/* FALLTHRU */
|
||||
|
||||
case 0x01:
|
||||
|
|
|
@ -2152,7 +2152,7 @@ de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
|
|||
|
||||
mcc_mnc_aux(octs, mcc, mnc);
|
||||
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, subtree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, subtree, curr_offset, E212_LAI, TRUE);
|
||||
|
||||
value = tvb_get_ntohs(tvb, curr_offset);
|
||||
|
||||
|
@ -2328,7 +2328,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guin
|
|||
/* MCC/MNC*/
|
||||
/* MCC, Mobile country code (octet 6a, octet 6b bits 1 to 4)*/
|
||||
/* MNC, Mobile network code (octet 6b bits 5 to 8, octet 6c) */
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
|
||||
}
|
||||
if ((oct&0x20) == 0x20) {
|
||||
/* MBMS Session Identity (octet 7)
|
||||
|
|
|
@ -3256,7 +3256,7 @@ de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
|
|||
"Routing area identification: %x-%x-%u-%u",
|
||||
mcc, mnc, lac, rac);
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, E212_RAI, TRUE);
|
||||
|
||||
proto_tree_add_item(subtree, hf_gsm_a_lac, tvb, curr_offset+3, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(subtree, hf_gsm_a_gm_rac, tvb, curr_offset+5, 1, ENC_BIG_ENDIAN);
|
||||
|
@ -4275,7 +4275,7 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
|
|||
{
|
||||
if (e_len > 0) {
|
||||
if (prot >= 0xff00) {
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, pco_tree, curr_offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, pco_tree, curr_offset, E212_NONE, TRUE);
|
||||
if ((e_len - 3) > 0) {
|
||||
proto_tree_add_item(pco_tree, hf_gsm_a_gm_pco_app_spec_info, tvb, curr_offset+3, e_len-3, ENC_NA);
|
||||
}
|
||||
|
@ -5502,7 +5502,7 @@ de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset,
|
|||
curr_offset += 3;
|
||||
|
||||
NO_MORE_DATA_CHECK(len);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
|
||||
|
||||
EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
|
||||
|
||||
|
|
|
@ -4290,7 +4290,7 @@ dissect_gsm_map_LAIFixedLength(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LAIFixedLength);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_LAI, TRUE);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3279,7 +3279,7 @@ decode_gtp_rai(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree *
|
|||
ext_tree_rai = proto_tree_add_subtree(tree, tvb, offset, 1, ett_gtp_ies[GTP_EXT_RAI], NULL,
|
||||
val_to_str_ext_const(GTP_EXT_RAI, >p_val_ext, "Unknown message"));
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, ext_tree_rai, offset+1, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, ext_tree_rai, offset+1, E212_RAI, TRUE);
|
||||
proto_tree_add_item(ext_tree_rai, hf_gtp_rai_lac, tvb, offset + 4, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(ext_tree_rai, hf_gtp_rai_rac, tvb, offset + 6, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
|
@ -5294,7 +5294,7 @@ decode_gtp_target_id(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree
|
|||
* octets 4-n. Also the optional "iE-Extensions" parameter shall not be included into the GTP IE.
|
||||
*/
|
||||
/* Octet 4-6 MCC + MNC */
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, ext_tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, ext_tree, offset, E212_NONE, TRUE);
|
||||
offset+=3;
|
||||
/* Octet 7-8 LAC */
|
||||
proto_tree_add_item(ext_tree, hf_gtp_rai_lac, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
|
@ -5729,7 +5729,7 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
* registered. RAI is defined in sub-clause 4.2 of 3GPP TS 23.003
|
||||
* [2].
|
||||
*/
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_RAI, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_rai_lac, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset+=2;
|
||||
|
@ -5740,7 +5740,7 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
* Area Identity (TAI) of where the user currently is registered.
|
||||
* TAI is defined in sub-clause 8.21.4 of 3GPP TS 29.274.
|
||||
*/
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_tac, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
|
@ -5749,7 +5749,7 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
* Global Identifier (ECGI) of where the user currently is registered.
|
||||
* ECGI is defined in sub-clause 8.21.5 of 3GPP TS 29.274.
|
||||
*/
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_eci, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
|
@ -5760,11 +5760,11 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
* TAI is defined in sub-clause 8.21.4 of 3GPP TS 29.274.
|
||||
* ECGI is defined in sub-clause 8.21.5 of 3GPP TS 29.274.
|
||||
*/
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_tac, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(tree, hf_gtp_eci, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
|
@ -5828,7 +5828,7 @@ decode_gtp_usr_loc_inf(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tr
|
|||
*/
|
||||
rai_tree = proto_tree_add_subtree(ext_tree, tvb, offset + 1, 7, ett_gtp_uli_rai, NULL, "Routeing Area Identity (RAI)");
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, rai_tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, rai_tree, offset, E212_RAI, TRUE);
|
||||
offset+=3;
|
||||
proto_tree_add_item(rai_tree, hf_gtp_rai_lac, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset+=2;
|
||||
|
@ -6284,7 +6284,7 @@ decode_gtp_sel_plmn_id(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tr
|
|||
proto_tree_add_item(ext_tree, hf_gtp_ext_length, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset = offset + 2;
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, ext_tree, offset, FALSE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, ext_tree, offset, E212_NONE, FALSE);
|
||||
return 3 + length;
|
||||
|
||||
}
|
||||
|
|
|
@ -1430,7 +1430,7 @@ dissect_gtpv2_tgt_rnc_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pr
|
|||
"Routing area identification: %x-%x-%u-%u",
|
||||
mcc, mnc, lac, rnc_id);
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, E212_RAI, TRUE);
|
||||
curr_offset+=3;
|
||||
|
||||
proto_tree_add_item(subtree, hf_gtpv2_lac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
|
||||
|
@ -1490,7 +1490,7 @@ dissect_gtpv2_tgt_global_cell_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
|
|||
"Routing area identification: %x-%x-%u-%u",
|
||||
mcc, mnc, lac, tgt_cell_id);
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, E212_RAI, TRUE);
|
||||
|
||||
proto_tree_add_item(subtree, hf_gtpv2_lac, tvb, curr_offset + 3, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(subtree, hf_gtpv2_tgt_g_cell_id, tvb, curr_offset + 5, 2, ENC_BIG_ENDIAN);
|
||||
|
@ -1538,7 +1538,7 @@ dissect_gtpv2_sai(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_ite
|
|||
* 6 MNC digit 3 MCC digit 3
|
||||
* 7 MNC digit 2 MNC digit 1
|
||||
*/
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_SAI, TRUE);
|
||||
offset += 3;
|
||||
|
||||
/* The Location Area Code (LAC) consists of 2 octets. Bit 8 of Octet 8 is the most significant bit and bit 1 of Octet 9 the
|
||||
|
@ -2434,7 +2434,7 @@ dissect_gtpv2_g_cn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto
|
|||
{
|
||||
int offset = 0;
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, 0, E212_NONE, TRUE);
|
||||
offset += 3;
|
||||
|
||||
/* >CN-ID M INTEGER (0..4095) */
|
||||
|
@ -2653,7 +2653,7 @@ dissect_gtpv2_tra_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, prot
|
|||
guint16 tid;
|
||||
guint32 bit_offset;
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, 0, E212_NONE, TRUE);
|
||||
offset += 3;
|
||||
|
||||
/* Append Trace ID to main tree */
|
||||
|
@ -3971,7 +3971,7 @@ dissect_gtpv2_guti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_it
|
|||
|
||||
offset = 0;
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, 0, E212_NONE, TRUE);
|
||||
offset += 3;
|
||||
|
||||
proto_tree_add_item(tree, hf_gtpv2_mme_grp_id, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
|
@ -4268,7 +4268,7 @@ dissect_gtpv2_target_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
|
|||
switch (target_type) {
|
||||
case 0:
|
||||
new_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
dissect_e212_mcc_mnc(new_tvb, pinfo, tree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(new_tvb, pinfo, tree, 0, E212_NONE, TRUE);
|
||||
offset += 3;
|
||||
/* LAC */
|
||||
proto_tree_add_item(tree, hf_gtpv2_lac, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
|
@ -5063,7 +5063,7 @@ dissect_gtpv2_tmgi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot
|
|||
proto_tree_add_item(tree, hf_gtpv2_mbms_service_id, tvb, offset, 3, ENC_NA);
|
||||
offset += 3;
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
offset += 3;
|
||||
|
||||
if (length > offset)
|
||||
|
|
|
@ -768,12 +768,12 @@ dissect_lcsap_PLMN_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p
|
|||
tvbuff_t *parameter_tvb=NULL;
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
3, 3, FALSE, ¶meter_tvb);
|
||||
if(tvb_length(tvb)==0)
|
||||
if(tvb_reported_length(tvb)==0)
|
||||
return offset;
|
||||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, TRUE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, TRUE);
|
||||
|
||||
|
||||
return offset;
|
||||
|
|
|
@ -586,7 +586,7 @@ dissect_m3ap_Absolute_Time_ofMBMS_Data(tvbuff_t *tvb _U_, int offset _U_, asn1_c
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
|
||||
time_str = tvb_ntp_fmt_ts(parameter_tvb, 0);
|
||||
proto_tree_add_string(tree, hf_m3ap_Absolute_Time_ofMBMS_Data_value, parameter_tvb, 0, tvb_len, time_str);
|
||||
|
@ -880,7 +880,7 @@ dissect_m3ap_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -954,7 +954,7 @@ dissect_m3ap_IPAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
proto_tree_add_item(tree, hf_m3ap_IPAddress, parameter_tvb, 0, tvb_len, ENC_NA);
|
||||
|
||||
|
||||
|
@ -1048,7 +1048,7 @@ dissect_m3ap_MBMS_Service_Area(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
|
||||
dissect_gtpv2_mbms_service_area(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
|
||||
|
@ -1070,7 +1070,7 @@ dissect_m3ap_MBMS_Session_Duration(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
|
||||
proto_item_append_text(actx->created_item, " ");
|
||||
dissect_gtpv2_mbms_session_duration(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
|
@ -1114,7 +1114,7 @@ dissect_m3ap_MinimumTimeToMBMSDataTransfer(tvbuff_t *tvb _U_, int offset _U_, as
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
tvb_len = tvb_reported_length(parameter_tvb);
|
||||
dissect_gtpv2_mbms_time_to_data_xfer(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
|
||||
|
||||
|
|
|
@ -1057,7 +1057,7 @@ de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
case 6:
|
||||
/* GUTI */
|
||||
curr_offset++;
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
|
||||
/* MME Group ID octet 7 - 8 */
|
||||
proto_tree_add_item(tree, hf_nas_eps_emm_mme_grp_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
|
||||
curr_offset+=2;
|
||||
|
@ -1562,7 +1562,7 @@ de_emm_trac_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
|
||||
curr_offset = offset;
|
||||
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
|
||||
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
|
||||
curr_offset+=2;
|
||||
|
||||
|
@ -1616,7 +1616,7 @@ de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
* MNC digit 3 MCC digit 3 octet 3
|
||||
* MNC digit 2 MNC digit 1 octet 4
|
||||
*/
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
|
||||
/* type of list = "000" */
|
||||
/* TAC 1 octet 5
|
||||
* TAC 1 (continued) octet 6
|
||||
|
@ -1639,7 +1639,7 @@ de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
* MNC digit 3 MCC digit 3 octet 3
|
||||
* MNC digit 2 MNC digit 1 octet 4
|
||||
*/
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
|
||||
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
|
||||
curr_offset+=2;
|
||||
break;
|
||||
|
@ -1655,7 +1655,7 @@ de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
* MNC digit 3 MCC digit 3 octet 3
|
||||
* MNC digit 2 MNC digit 1 octet 4
|
||||
*/
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, TRUE);
|
||||
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, TRUE);
|
||||
proto_tree_add_item(tree, hf_nas_eps_emm_tai_tac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
|
||||
curr_offset+=2;
|
||||
}
|
||||
|
|
|
@ -2666,7 +2666,7 @@ dissect_ranap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
|
||||
|
||||
return offset;
|
||||
|
|
|
@ -1809,7 +1809,7 @@ dissect_s1ap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
|
||||
|
||||
return offset;
|
||||
|
|
|
@ -700,7 +700,7 @@ dissect_sabp_T_pLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_sabp_e212);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, FALSE);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -559,7 +559,7 @@ dissect_sbc_ap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
|
||||
|
||||
return offset;
|
||||
|
|
|
@ -150,7 +150,7 @@ de_sgsap_ecgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offse
|
|||
|
||||
curr_offset = offset;
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
curr_offset += 3;
|
||||
|
||||
proto_tree_add_item(tree, hf_sgsap_eci, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -175,7 +175,7 @@ de_sgsap_g_cn_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of
|
|||
|
||||
curr_offset = offset;
|
||||
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, TRUE);
|
||||
dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, TRUE);
|
||||
curr_offset += 3;
|
||||
|
||||
proto_tree_add_item(tree, hf_sgsap_cn_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -1319,7 +1319,7 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
|
|||
octet = tvb_get_guint8(tvb,ie_offset);
|
||||
ie_offset++;
|
||||
if ( octet == 0 ){
|
||||
ie_offset = dissect_e212_mcc_mnc(tvb, pinfo, urr_ie_tree, ie_offset, TRUE);
|
||||
ie_offset = dissect_e212_mcc_mnc(tvb, pinfo, urr_ie_tree, ie_offset, E212_NONE, TRUE);
|
||||
proto_tree_add_item(urr_ie_tree, hf_uma_urr_lac, tvb, ie_offset, 2, ENC_BIG_ENDIAN);
|
||||
/*ie_offset = ie_offset + 2;*/
|
||||
/* The octets 9-12 are coded as shown in 3GPP TS 25.331, Table 'Cell identity'.
|
||||
|
@ -1636,7 +1636,7 @@ dissect_uma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
|||
proto_tree_add_item(uma_tree, hf_uma_skip_ind, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
if ((octet & 0xf0) != 0 ){
|
||||
proto_tree_add_text(uma_tree, tvb,offset,-1,"Skip this message");
|
||||
return tvb_length(tvb);
|
||||
return tvb_reported_length(tvb);
|
||||
}
|
||||
|
||||
proto_tree_add_item(uma_tree, hf_uma_pd, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
@ -1671,7 +1671,7 @@ dissect_uma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
|||
break;
|
||||
}
|
||||
|
||||
return tvb_length(tvb);
|
||||
return tvb_reported_length(tvb);
|
||||
}
|
||||
|
||||
static guint
|
||||
|
@ -1686,7 +1686,7 @@ dissect_uma_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
{
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, uma_desegment, UMA_HEADER_SIZE,
|
||||
get_uma_pdu_len, dissect_uma, data);
|
||||
return tvb_length(tvb);
|
||||
return tvb_reported_length(tvb);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1712,7 +1712,7 @@ dissect_uma_urlc_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
proto_tree_add_item(uma_tree, hf_uma_urlc_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",val_to_str_ext(octet, &uma_urlc_msg_type_vals_ext, "Unknown URLC (%u)"));
|
||||
col_set_fence(pinfo->cinfo,COL_INFO);
|
||||
msg_len = tvb_length_remaining(tvb,offset) - 1;
|
||||
msg_len = tvb_reported_length_remaining(tvb,offset) - 1;
|
||||
|
||||
switch ( octet ){
|
||||
|
||||
|
@ -1731,7 +1731,7 @@ dissect_uma_urlc_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
return offset;
|
||||
default:
|
||||
proto_tree_add_text(uma_tree, tvb,offset,-1,"Wrong message type %u",octet);
|
||||
return tvb_length(tvb);
|
||||
return tvb_reported_length(tvb);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1532,7 +1532,7 @@ dissect_x2ap_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE);
|
||||
dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, FALSE);
|
||||
|
||||
|
||||
return offset;
|
||||
|
|
Loading…
Reference in New Issue