aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rlc-lte.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2012-01-24 03:05:21 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2012-01-24 03:05:21 +0000
commit13316398dd3a0e1258633bd92f4ff07f40fb0386 (patch)
tree63a31cae22b82db295969defab7ce113dae2efbe /epan/dissectors/packet-rlc-lte.c
parente36b1c6dafa542ed854a626bee717736d5d9eda7 (diff)
Use bitfields to make channel_hash_key struct fit into one word.
svn path=/trunk/; revision=40683
Diffstat (limited to 'epan/dissectors/packet-rlc-lte.c')
-rw-r--r--epan/dissectors/packet-rlc-lte.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index 3d64962193..a32bdc3539 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -47,6 +47,8 @@
/* TODO:
- add intermediate results to segments leading to final reassembly
- use multiple active rlc_channel_reassembly_info's per channel
+ - sequence analysis gets confused when we change cells and skip back
+ to SN 0. Maybe add cell-id to context and add to channel/result key?
*/
/********************************/
@@ -322,10 +324,10 @@ static guint16 s_lengths[MAX_RLC_SDUS];
/* Channel key */
typedef struct
{
- guint16 ueId;
- guint16 channelType;
- guint16 channelId;
- guint8 direction;
+ unsigned ueId : 16;
+ unsigned channelType : 3;
+ unsigned channelId : 5;
+ unsigned direction : 1;
} channel_hash_key;
@@ -804,6 +806,8 @@ static gint rlc_channel_equal(gconstpointer v, gconstpointer v2)
const channel_hash_key* val2 = v2;
/* All fields must match */
+ /* N.B. Currently fits into one word, so could return (*v == *v2)
+ if we're sure they're initialised to 0... */
return ((val1->ueId == val2->ueId) &&
(val1->channelType == val2->channelType) &&
(val1->channelId == val2->channelId) &&
@@ -882,7 +886,6 @@ static gpointer get_report_hash_key(guint16 SN, guint32 frameNumber,
-
/* Add to the tree values associated with sequence analysis for this frame */
static void addChannelSequenceInfo(sequence_analysis_report *p,
gboolean isControlFrame,