csn1: Update M_NULL CSN_DESCR to match wireshark
Port from iwireshark.git commit cc6d4341e65ef2e8d8488fe0ac0f236ece0dd844.
It looks like it makes no difference to us now, but other EGPRS messages
may use it in the future.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I34039370c292e62790a38abb59f55c69fffa88e8
diff --git a/src/csn1.cpp b/src/csn1.cpp
index 6203a44..9ddb9c1 100644
--- a/src/csn1.cpp
+++ b/src/csn1.cpp
@@ -190,6 +190,7 @@
case CSN_NULL:
{ /* Empty member! */
+ bit_offset += pDescr->i;
pDescr++;
break;
}
@@ -631,6 +632,7 @@
case CSN_NULL:
{ /* Empty member! */
+ bit_offset += pDescr->i;
pDescr++;
break;
}
diff --git a/src/csn1.h b/src/csn1.h
index 1015e69..39e6625 100644
--- a/src/csn1.h
+++ b/src/csn1.h
@@ -592,8 +592,8 @@
#define M_PADDING_BITS(_STRUCT)\
{CSN_PADDING_BITS, 0, {0}, 0, TRUE, "Padding", {(StreamSerializeFcn_t)0}}
-#define M_NULL(_STRUCT, _MEMBER)\
- {CSN_NULL, 0, {0}, offsetof(_STRUCT, _MEMBER), FALSE, #_MEMBER, {(StreamSerializeFcn_t)0}}
+#define M_NULL(_STRUCT, _MEMBER, _SKIP_BITS)\
+ {CSN_NULL, _SKIP_BITS, {0}, offsetof(_STRUCT, _MEMBER), FALSE, #_MEMBER, {(StreamSerializeFcn_t)0}}
#define M_THIS_EXIST(_STRUCT)\
{CSN_EXIST, 0, {0}, offsetof(_STRUCT, Exist), FALSE, "Exist", {(StreamSerializeFcn_t)0}}
diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp
index 339279c..c1d3b97 100644
--- a/src/gsm_rlcmac.cpp
+++ b/src/gsm_rlcmac.cpp
@@ -605,7 +605,7 @@
static const
CSN_ChoiceElement_t SI13_PBCCH_Description_Channel[] =
{/* this one is used in SI13*/
- {2, 0x00 , M_NULL(PBCCH_Description_t, u.dummy)},/*Default to BCCH carrier*/
+ {2, 0x00 , M_NULL(PBCCH_Description_t, u.dummy, 0)},/*Default to BCCH carrier*/
{2, 0x01 , M_UINT(PBCCH_Description_t, u.ARFCN, 10)},
{1, 0x01 , M_UINT(PBCCH_Description_t, u.MAIO, 6)},
};
@@ -3064,7 +3064,7 @@
static const
CSN_DESCR_BEGIN (Delete_All_Stored_Individual_Priorities_t)
- M_NULL (Delete_All_Stored_Individual_Priorities_t, dummy),
+ M_NULL (Delete_All_Stored_Individual_Priorities_t, dummy, 0),
CSN_DESCR_END (Delete_All_Stored_Individual_Priorities_t)
static const