Ported fixes and improvements from Wireshark for RLC/MAC control block decoding. Part 1.
Generic improvements to the csn.1 dissector include:
• Added a flag to the type descriptor structure so that any type can (potentially) flagged as xxx_OR_NULL. This was specifically needed for UINT_OR_NULL for the ms capabilities struct.
• Changed the CSN_SERIALIZE so that the length of the length field can be specified.
• For CSN_NEXT_EXIST removed the requirement that the next type be CSN_END, to allow truncation of multiple IEs.
• For CSN_LEFT_ALIGNED_VAR_BITMAP corrected the handling of bit_offset.
• Added a new type CSN_PADDING_BITS to make inspection of padding bits more convenient.
• Improved the CSN_RECURSIVE_TARRAY_1 to show the array index.
Improvements to the gsm_rlcmac dissector include:
• Rework the definition of EGPRS Ack/Nack Description so that the length IE (and absence thereof) is handled correctly.
• Added Padding Bits definitions to all PDUs
• Change the Multislot_capability_t and Content_t definitions to allow truncation at any IE
diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h
index afec146..017b311 100644
--- a/src/gsm_rlcmac.h
+++ b/src/gsm_rlcmac.h
@@ -454,9 +454,6 @@
typedef struct
{
- gboolean Exist_LENGTH;
- guint8 LENGTH;
-
guint8 FINAL_ACK_INDICATION;
guint8 BEGINNING_OF_WINDOW;
guint8 END_OF_WINDOW;
@@ -469,8 +466,20 @@
guint16 URBB_LENGTH;
guint8 URBB[URBB_MAX_BITS/8];
+} EGPRS_AckNack_Desc_t;
+
+typedef struct
+{
+ guint8 UnionType;
+ EGPRS_AckNack_Desc_t Desc;
} EGPRS_AckNack_t;
+typedef struct
+{
+ guint8 LENGTH;
+ EGPRS_AckNack_Desc_t Desc;
+} EGPRS_AckNack_w_len_t;
+
/* <P1 Rest Octets>
* <P2 Rest Octets>