aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2009-04-21 12:35:50 +0000
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2009-04-21 12:35:50 +0000
commit2f0eced54f79c1530a2c9ab16a8dcdb0a4705a67 (patch)
tree77763560bc93d676bf250f80c3a62dcfff3cee17
parent30e5d5a0619be72239c2078766a77199a01294c0 (diff)
Also show number of RAR bodies/entries in stats.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28104 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-mac-lte.c13
-rw-r--r--epan/dissectors/packet-mac-lte.h1
-rw-r--r--gtk/mac_lte_stat_dlg.c11
3 files changed, 20 insertions, 5 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index 383a73514d..d921fd6583 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -419,7 +419,7 @@ static gint dissect_rar_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* Dissect Random Access Reponse (RAR) PDU */
static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- gint offset, mac_lte_info *p_mac_lte_info)
+ gint offset, mac_lte_info *p_mac_lte_info, mac_lte_tap_info *tap_info)
{
gint number_of_rars = 0; /* No of RAR bodies expected following headers */
gboolean backoff_indicator_seen = FALSE;
@@ -524,6 +524,9 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
for (n=0; n < number_of_rars; n++) {
offset = dissect_rar_entry(tvb, pinfo, tree, offset);
}
+
+ /* Update TAP info */
+ tap_info->number_of_rars += number_of_rars;
}
@@ -1177,7 +1180,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case RA_RNTI:
/* RAR PDU */
- dissect_rar(tvb, pinfo, mac_lte_tree, offset, p_mac_lte_info);
+ dissect_rar(tvb, pinfo, mac_lte_tree, offset, p_mac_lte_info, &tap_info);
break;
case C_RNTI:
@@ -1202,9 +1205,9 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* Queue tap info */
- if (!pinfo->in_error_pkt) {
- tap_queue_packet(mac_lte_tap, pinfo, &tap_info);
- }
+ /* TODO: if any of above (esp RRC dissection) throws exception, this isn't reached,
+ but if call too early, won't have details... */
+ tap_queue_packet(mac_lte_tap, pinfo, &tap_info);
}
diff --git a/epan/dissectors/packet-mac-lte.h b/epan/dissectors/packet-mac-lte.h
index 21d807ee04..40755eb900 100644
--- a/epan/dissectors/packet-mac-lte.h
+++ b/epan/dissectors/packet-mac-lte.h
@@ -72,5 +72,6 @@ typedef struct mac_lte_tap_info {
guint32 single_number_of_bytes;
guint32 bytes_for_lcid[11];
guint32 sdus_for_lcid[11];
+ guint8 number_of_rars;
} mac_lte_tap_info;
diff --git a/gtk/mac_lte_stat_dlg.c b/gtk/mac_lte_stat_dlg.c
index 61f30f3a2e..0acaedab67 100644
--- a/gtk/mac_lte_stat_dlg.c
+++ b/gtk/mac_lte_stat_dlg.c
@@ -145,6 +145,7 @@ typedef struct mac_lte_common_stats {
guint32 pch_frames;
guint32 pch_bytes;
guint32 rar_frames;
+ guint32 rar_entries;
} mac_lte_common_stats;
static const char * selected_ue_row_names[] = {"UL SDUs", "UL Bytes", "DL SDUs", "DL Bytes"};
@@ -156,6 +157,7 @@ static GtkWidget *mac_lte_common_bch_bytes;
static GtkWidget *mac_lte_common_pch_frames;
static GtkWidget *mac_lte_common_pch_bytes;
static GtkWidget *mac_lte_common_rar_frames;
+static GtkWidget *mac_lte_common_rar_entries;
/* Labels in selected UE 'table' */
static GtkWidget *selected_ue_column_entry[NUM_CHANNEL_COLUMNS][5];
@@ -296,6 +298,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
return 1;
case RA_RNTI:
common_stats.rar_frames++;
+ common_stats.rar_entries += si->number_of_rars;
return 1;
default:
@@ -508,6 +511,9 @@ mac_lte_stat_draw(void *phs)
gtk_label_set_text(GTK_LABEL(mac_lte_common_pch_bytes), buff);
g_snprintf(buff, sizeof(buff), "RAR Frames: %u", common_stats.rar_frames);
gtk_label_set_text(GTK_LABEL(mac_lte_common_rar_frames), buff);
+ g_snprintf(buff, sizeof(buff), "RAR Entries: %u", common_stats.rar_entries);
+ gtk_label_set_text(GTK_LABEL(mac_lte_common_rar_entries), buff);
+
/* Per-UE table entries */
ues_store = GTK_LIST_STORE(gtk_tree_view_get_model(hs->ue_table));
@@ -676,6 +682,11 @@ static void mac_lte_stat_dlg_create(void)
gtk_container_add(GTK_CONTAINER(common_row_hbox), mac_lte_common_rar_frames);
gtk_widget_show(mac_lte_common_rar_frames);
+ mac_lte_common_rar_entries = gtk_label_new("RAR Entries:");
+ gtk_misc_set_alignment(GTK_MISC(mac_lte_common_rar_entries), 0.0f, .5f);
+ gtk_container_add(GTK_CONTAINER(common_row_hbox), mac_lte_common_rar_entries);
+ gtk_widget_show(mac_lte_common_rar_entries);
+
/**********************************************/
/* UL/DL-SCH data */
/**********************************************/