diff options
author | Anders Broman <anders.broman@ericsson.com> | 2020-01-24 14:31:15 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-01-28 13:34:08 +0100 |
commit | 72c102acf8f79979dc536f1247c3e1a6261ada05 (patch) | |
tree | 75ccb8f7f5f238ae2e0980a6a819c856692bab52 /src | |
parent | cdbc5dbd1cba638f0ad5aa475d0bf97fe5c4bcff (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/csn1.cpp | 2 | ||||
-rw-r--r-- | src/csn1.h | 4 | ||||
-rw-r--r-- | src/gsm_rlcmac.cpp | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/csn1.cpp b/src/csn1.cpp index 6203a440..9ddb9c18 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -190,6 +190,7 @@ csnStreamDecoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector, unsig case CSN_NULL: { /* Empty member! */ + bit_offset += pDescr->i; pDescr++; break; } @@ -631,6 +632,7 @@ csnStreamDecoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector, unsig case CSN_NULL: { /* Empty member! */ + bit_offset += pDescr->i; pDescr++; break; } @@ -592,8 +592,8 @@ gint16 csnStreamEncoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector #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 339279c4..c1d3b978 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -605,7 +605,7 @@ CSN_DESCR_END (PBCCH_Not_present_t) 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 @@ CSN_DESCR_END (PriorityAndEUTRAN_ParametersDescription_PMO_t) 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 |