diff options
author | martinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-01-24 03:05:21 +0000 |
---|---|---|
committer | martinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7> | 2012-01-24 03:05:21 +0000 |
commit | 9dfe1c1c6dfb5baf9cba5daf1d3efc3037edc940 (patch) | |
tree | 63a31cae22b82db295969defab7ce113dae2efbe | |
parent | 7f307111d289eb8cceb68c47cb51ac3fe0fd8c59 (diff) |
Use bitfields to make channel_hash_key struct fit into one word.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40683 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | epan/dissectors/packet-rlc-lte.c | 13 |
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, |