summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mac-lte.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--epan/dissectors/packet-mac-lte.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index e6c882fc..363a9bc5 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -3151,7 +3151,7 @@ static gint dissect_rar_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
proto_item *ul_grant_ti;
guint32 timing_advance;
guint32 ul_grant;
- guint16 temp_crnti;
+ guint32 temp_crnti;
const gchar *rapid_description;
guint32 bits_offset;
@@ -3356,7 +3356,7 @@ static gint dissect_rar_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* Temporary C-RNTI */
proto_tree_add_item_ret_uint(rar_body_tree, hf_mac_lte_rar_temporary_crnti, tvb, offset, 2,
- ENC_BIG_ENDIAN, (guint32*)&temp_crnti);
+ ENC_BIG_ENDIAN, &temp_crnti);
offset += 2;
rapid_description = get_mac_lte_rapid_description(rapid);
@@ -3379,6 +3379,7 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
{
guint number_of_rars = 0; /* No of RAR bodies expected following headers */
guint8 *rapids = (guint8 *)wmem_alloc(pinfo->pool, MAX_RAR_PDUS * sizeof(guint8));
+ guint32 temp_rapid;
gboolean backoff_indicator_seen = FALSE;
guint32 backoff_indicator = 0;
guint8 extension;
@@ -3469,7 +3470,8 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
const gchar *rapid_description;
proto_tree_add_item_ret_uint(rar_header_tree, hf_mac_lte_rar_rapid, tvb, offset, 1,
- ENC_BIG_ENDIAN, (guint32*)&rapids[number_of_rars]);
+ ENC_BIG_ENDIAN, &temp_rapid);
+ rapids[number_of_rars] = (guint8)temp_rapid;
rapid_description = get_mac_lte_rapid_description(rapids[number_of_rars]);
@@ -6260,7 +6262,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
proto_tree *bsr_tree;
proto_item *bsr_ti, *bsr_median_ti;
proto_item *buffer_size_ti;
- guint8 buffer_size[4];
+ guint32 buffer_size[4];
int hfindex[4];
value_string_ext *p_vs_ext;
guint32 *p_buffer_size_median;
@@ -6294,7 +6296,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* LCID Group 0 */
buffer_size_ti = proto_tree_add_item_ret_uint(bsr_tree, hfindex[0],
tvb, offset, 1,
- ENC_BIG_ENDIAN, (guint32*)&buffer_size[0]);
+ ENC_BIG_ENDIAN, &buffer_size[0]);
if (global_mac_lte_show_BSR_median) {
/* Add value that can be graphed */
@@ -6302,7 +6304,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
proto_item_set_generated(bsr_median_ti);
}
- if (buffer_size[0] >= global_mac_lte_bsr_warn_threshold) {
+ if ((gint)buffer_size[0] >= global_mac_lte_bsr_warn_threshold) {
expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG 0 exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,
@@ -6313,7 +6315,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* LCID Group 1 */
buffer_size_ti = proto_tree_add_item_ret_uint(bsr_tree, hfindex[1],
tvb, offset, 2,
- ENC_BIG_ENDIAN, (guint32*)&buffer_size[1]);
+ ENC_BIG_ENDIAN, &buffer_size[1]);
if (global_mac_lte_show_BSR_median) {
/* Add value that can be graphed */
@@ -6322,7 +6324,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
offset++;
- if (buffer_size[1] >= global_mac_lte_bsr_warn_threshold) {
+ if ((gint)buffer_size[1] >= global_mac_lte_bsr_warn_threshold) {
expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG 1 exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,
@@ -6333,7 +6335,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* LCID Group 2 */
buffer_size_ti = proto_tree_add_item_ret_uint(bsr_tree, hfindex[2],
tvb, offset, 2,
- ENC_BIG_ENDIAN, (guint32*)&buffer_size[2]);
+ ENC_BIG_ENDIAN, &buffer_size[2]);
if (global_mac_lte_show_BSR_median) {
/* Add value that can be graphed */
@@ -6342,7 +6344,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
offset++;
- if (buffer_size[2] >= global_mac_lte_bsr_warn_threshold) {
+ if ((gint)buffer_size[2] >= global_mac_lte_bsr_warn_threshold) {
expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG 2 exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,
@@ -6353,7 +6355,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* LCID Group 3 */
buffer_size_ti = proto_tree_add_item_ret_uint(bsr_tree, hfindex[3],
tvb, offset, 1,
- ENC_BIG_ENDIAN, (guint32*)&buffer_size[3]);
+ ENC_BIG_ENDIAN, &buffer_size[3]);
if (global_mac_lte_show_BSR_median) {
/* Add value that can be graphed */
@@ -6362,7 +6364,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
offset++;
- if (buffer_size[3] >= global_mac_lte_bsr_warn_threshold) {
+ if ((gint)buffer_size[3] >= global_mac_lte_bsr_warn_threshold) {
expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded,
"UE %u - BSR for LCG 3 exceeds threshold: %u (%s)",
p_mac_lte_info->ueid,