Add a ReTX count (resends being caused by HARQ NACKs).

svn path=/trunk/; revision=27739
This commit is contained in:
Martin Mathieson 2009-03-16 15:39:52 +00:00
parent 247337bad7
commit c3265c9fdf
3 changed files with 40 additions and 5 deletions

View File

@ -1330,9 +1330,12 @@ static void attach_mac_lte_info(packet_info *pinfo)
p_mac_lte_info->rntiType = outhdr_values[i++];
p_mac_lte_info->direction = outhdr_values[i++];
p_mac_lte_info->subframeNumber = outhdr_values[i++];
p_mac_lte_info->is_predefined_data = outhdr_values[i++];
p_mac_lte_info->isPredefinedData = outhdr_values[i++];
p_mac_lte_info->rnti = outhdr_values[i++];
p_mac_lte_info->ueid = outhdr_values[i++];
if (outhdr_values_found > 8) {
p_mac_lte_info->reTxCount = outhdr_values[i++];
}
p_mac_lte_info->length = outhdr_values[i++];
/* Store info in packet */

View File

@ -61,6 +61,7 @@ static int hf_mac_lte_context_subframe_number = -1;
static int hf_mac_lte_context_predefined_frame = -1;
static int hf_mac_lte_context_length = -1;
static int hf_mac_lte_context_bch_transport_channel = -1;
static int hf_mac_lte_context_retx_count = -1;
/* MAC SCH header fields */
static int hf_mac_lte_ulsch_header = -1;
@ -344,6 +345,10 @@ static gboolean global_mac_lte_single_rar = FALSE;
December '08 spec says they should be ignored... */
static gboolean global_mac_lte_check_reserved_bits = TRUE;
/* If this PDU has been NACK'd (by HARQ) more than a certain number of times,
we trigger an expert warning. */
static gint global_mac_lte_retx_counter_trigger = 3;
/* Dissect a single Random Access Reponse body */
@ -1035,24 +1040,37 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
PROTO_ITEM_SET_GENERATED(ti);
ti = proto_tree_add_uint(mac_lte_tree, hf_mac_lte_context_predefined_frame,
tvb, 0, 0, p_mac_lte_info->is_predefined_data);
tvb, 0, 0, p_mac_lte_info->isPredefinedData);
PROTO_ITEM_SET_GENERATED(ti);
ti = proto_tree_add_uint(mac_lte_tree, hf_mac_lte_context_length,
tvb, 0, 0, p_mac_lte_info->length);
PROTO_ITEM_SET_GENERATED(ti);
if (p_mac_lte_info->reTxCount) {
ti = proto_tree_add_uint(mac_lte_tree, hf_mac_lte_context_retx_count,
tvb, 0, 0, p_mac_lte_info->reTxCount);
PROTO_ITEM_SET_GENERATED(ti);
if (p_mac_lte_info->reTxCount >= global_mac_lte_retx_counter_trigger) {
expert_add_info_format(pinfo, ti, PI_SEQUENCE, PI_ERROR,
"Frame has now been NACK'd %u times",
p_mac_lte_info->reTxCount);
}
}
/* Set context-info parts of tap struct */
tap_info.rnti = p_mac_lte_info->rnti;
tap_info.rnti_type = p_mac_lte_info->rntiType;
tap_info.is_predefined_data = p_mac_lte_info->is_predefined_data;
tap_info.is_predefined_data = p_mac_lte_info->isPredefinedData;
tap_info.reTxCount = p_mac_lte_info->reTxCount;
tap_info.direction = p_mac_lte_info->direction;
/* Also set total number of bytes (won't be used for UL/DL-SCH) */
tap_info.single_number_of_bytes = tvb_length_remaining(tvb, offset);
/* If we know its predefined data, don't try to decode any further */
if (p_mac_lte_info->is_predefined_data) {
if (p_mac_lte_info->isPredefinedData) {
proto_tree_add_item(mac_lte_tree, hf_mac_lte_predefined_pdu, tvb, offset, -1, FALSE);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, "Predefined data (%u bytes)", tvb_length_remaining(tvb, offset));
@ -1171,6 +1189,12 @@ void proto_register_mac_lte(void)
"Transport channel BCH data was carried on", HFILL
}
},
{ &hf_mac_lte_context_retx_count,
{ "ReTX count",
"mac-lte.bch-transport-channel", FT_UINT8, BASE_DEC, 0, 0x0,
"Number of times this PDU has been retransmitted", HFILL
}
},
/*******************************************/
@ -1453,6 +1477,7 @@ void proto_register_mac_lte(void)
/* Preferences */
mac_lte_module = prefs_register_protocol(proto_mac_lte, NULL);
/* TODO: delete/obselete this preference? */
prefs_register_bool_preference(mac_lte_module, "single_rar",
"Expect single RAR bodies",
"When dissecting an RA_RNTI frame, expect to find only one RAR body "
@ -1463,6 +1488,11 @@ void proto_register_mac_lte(void)
"Warn if reserved bits are not 0",
"When set, an expert warning will indicate if reserved bits are not zero",
&global_mac_lte_check_reserved_bits);
prefs_register_uint_preference(mac_lte_module, "retx_count_warn",
"Number of Re-Transmits before expert warning triggered",
"Number of Re-Transmits before expert warning triggered (note that this",
10, &global_mac_lte_retx_counter_trigger);
}

View File

@ -50,8 +50,9 @@ typedef struct mac_lte_info
guint16 rnti;
guint16 ueid;
guint16 subframeNumber;
guint8 is_predefined_data;
guint8 isPredefinedData;
guint16 length;
guint8 reTxCount;
} mac_lte_info;
@ -60,6 +61,7 @@ typedef struct mac_lte_tap_info {
guint16 rnti;
guint8 rnti_type;
guint8 is_predefined_data;
guint8 reTxCount;
guint8 direction;
/* Number of bytes (which part is used depends upon context settings) */