<p>pespin <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/17574">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">rlcmac: Don't pass array element to CSN1 descriptors<br><br>This way the macros can be used to access the arrays themselves and<br>calculate its static size to enable validation later.<br><br>In the case of Packet_Access_Reject_t, modify the description to use a<br>M_REC_TARRAY_1 object to get rid of access to 2nd element. The new<br>description is the correct one, since the first element is mandatory<br>according to TS 44.060 Table 11.2.1.<br><br>Change-Id: I6f10350d4734360c7a15a702c72b59efd84987ee<br>---<br>M src/gsm_rlcmac.cpp<br>1 file changed, 11 insertions(+), 12 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp</span><br><span>index 40b75ed..db0e54a 100644</span><br><span>--- a/src/gsm_rlcmac.cpp</span><br><span>+++ b/src/gsm_rlcmac.cpp</span><br><span>@@ -902,7 +902,7 @@</span><br><span> </span><br><span> static const</span><br><span> CSN_DESCR_BEGIN       (Additional_access_technologies_t)</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY        (Additional_access_technologies_t, Additional_access_technologies[0], Additional_access_technologies_struct_t, Count_additional_access_technologies),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY        (Additional_access_technologies_t, Additional_access_technologies, Additional_access_technologies_struct_t, Count_additional_access_technologies),</span><br><span> CSN_DESCR_END         (Additional_access_technologies_t)</span><br><span> </span><br><span> gint16 Additional_access_technologies_Dissector(csnStream_t* ar, bitvec* vector, unsigned *readIndex, void* data)</span><br><span>@@ -1365,7 +1365,7 @@</span><br><span> </span><br><span> static const</span><br><span> CSN_DESCR_BEGIN(PSI_Message_List_t)</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (PSI_Message_List_t, PSI_Message[0], PSI_Message_t, Count_PSI_Message),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY (PSI_Message_List_t, PSI_Message, PSI_Message_t, Count_PSI_Message),</span><br><span>   M_FIXED      (PSI_Message_List_t, 1, 0x00),</span><br><span>   M_UINT       (PSI_Message_List_t,  ADDITIONAL_MSG_TYPE,  1),</span><br><span> CSN_DESCR_END  (PSI_Message_List_t)</span><br><span>@@ -1402,7 +1402,7 @@</span><br><span> </span><br><span> static const</span><br><span> CSN_DESCR_BEGIN(SI_Message_List_t)</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (SI_Message_List_t, SI_Message[0], SI_Message_t, Count_SI_Message),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY (SI_Message_List_t, SI_Message, SI_Message_t, Count_SI_Message),</span><br><span>   M_FIXED      (SI_Message_List_t, 1, 0x00),</span><br><span>   M_UINT       (SI_Message_List_t,  ADDITIONAL_MSG_TYPE,  1),</span><br><span> CSN_DESCR_END  (SI_Message_List_t)</span><br><span>@@ -2602,8 +2602,7 @@</span><br><span>   M_UINT       (Packet_Access_Reject_t,  MESSAGE_TYPE,  6),</span><br><span>   M_UINT       (Packet_Access_Reject_t,  PAGE_MODE,  2),</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  M_TYPE       (Packet_Access_Reject_t, Reject, Reject_t),</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (Packet_Access_Reject_t, Reject[1], Reject_t, Count_Reject),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY_1(Packet_Access_Reject_t, Reject, Reject_t, Count_Reject),</span><br><span>   M_PADDING_BITS(Packet_Access_Reject_t),</span><br><span> CSN_DESCR_END  (Packet_Access_Reject_t)</span><br><span> </span><br><span>@@ -3572,7 +3571,7 @@</span><br><span>   M_UINT       (ENH_NC_Measurement_Report_t,  SCALE,  1),</span><br><span>   M_NEXT_EXIST (ENH_NC_Measurement_Report_t, Exist_Serving_Cell_Data, 1),</span><br><span>   M_TYPE       (ENH_NC_Measurement_Report_t, Serving_Cell_Data, Serving_Cell_Data_t),</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (ENH_NC_Measurement_Report_t, RepeatedInvalid_BSIC_Info[0], RepeatedInvalid_BSIC_Info_t, Count_RepeatedInvalid_BSIC_Info),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY (ENH_NC_Measurement_Report_t, RepeatedInvalid_BSIC_Info, RepeatedInvalid_BSIC_Info_t, Count_RepeatedInvalid_BSIC_Info),</span><br><span>   M_NEXT_EXIST (ENH_NC_Measurement_Report_t, Exist_ReportBitmap, 1),</span><br><span>   M_VAR_TARRAY (ENH_NC_Measurement_Report_t, REPORTING_QUANTITY_Instances, REPORTING_QUANTITY_Instance_t, Count_REPORTING_QUANTITY_Instances),</span><br><span> CSN_DESCR_END  (ENH_NC_Measurement_Report_t)</span><br><span>@@ -3713,7 +3712,7 @@</span><br><span>   M_UINT          (EnhancedMeasurementReport_t,  SCALE,  1),</span><br><span>   M_NEXT_EXIST    (EnhancedMeasurementReport_t, Exist_ServingCellData, 1),</span><br><span>   M_TYPE          (EnhancedMeasurementReport_t, ServingCellData, EMR_ServingCell_t),</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY    (EnhancedMeasurementReport_t, RepeatedInvalid_BSIC_Info[0], RepeatedInvalid_BSIC_Info_t,</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY    (EnhancedMeasurementReport_t, RepeatedInvalid_BSIC_Info, RepeatedInvalid_BSIC_Info_t,</span><br><span>                     Count_RepeatedInvalid_BSIC_Info),</span><br><span>   M_NEXT_EXIST    (EnhancedMeasurementReport_t, Exist_ReportBitmap, 1),</span><br><span>   M_VAR_TARRAY    (EnhancedMeasurementReport_t, REPORTING_QUANTITY_Instances, REPORTING_QUANTITY_Instance_t, Count_REPORTING_QUANTITY_Instances),</span><br><span>@@ -4472,7 +4471,7 @@</span><br><span> </span><br><span> static const</span><br><span> CSN_DESCR_BEGIN(NonHoppingPCCCH_t)</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (NonHoppingPCCCH_t, Carriers[0], Non_Hopping_PCCCH_Carriers_t, Count_Carriers),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY (NonHoppingPCCCH_t, Carriers, Non_Hopping_PCCCH_Carriers_t, Count_Carriers),</span><br><span> CSN_DESCR_END  (NonHoppingPCCCH_t)</span><br><span> </span><br><span> static const</span><br><span>@@ -4484,7 +4483,7 @@</span><br><span> static const</span><br><span> CSN_DESCR_BEGIN(HoppingPCCCH_t)</span><br><span>   M_UINT(HoppingPCCCH_t, MA_NUMBER, 4),</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (HoppingPCCCH_t, Carriers[0], Hopping_PCCCH_Carriers_t, Count_Carriers),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY (HoppingPCCCH_t, Carriers, Hopping_PCCCH_Carriers_t, Count_Carriers),</span><br><span> CSN_DESCR_END  (HoppingPCCCH_t)</span><br><span> </span><br><span> static const</span><br><span>@@ -4510,10 +4509,10 @@</span><br><span>   M_NEXT_EXIST (PSI2_t, Exist_Non_GPRS_Cell_Options, 1),</span><br><span>   M_TYPE       (PSI2_t,  Non_GPRS_Cell_Options, Non_GPRS_Cell_Options_t),</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (PSI2_t, Reference_Frequency[0], Reference_Frequency_t, Count_Reference_Frequency),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY (PSI2_t, Reference_Frequency, Reference_Frequency_t, Count_Reference_Frequency),</span><br><span>   M_TYPE       (PSI2_t,  Cell_Allocation, Cell_Allocation_t),</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (PSI2_t, GPRS_MA[0], PSI2_MA_t, Count_GPRS_MA),</span><br><span style="color: hsl(0, 100%, 40%);">-  M_REC_TARRAY (PSI2_t, PCCCH_Description[0], PCCCH_Description_t, Count_PCCCH_Description),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY (PSI2_t, GPRS_MA, PSI2_MA_t, Count_GPRS_MA),</span><br><span style="color: hsl(120, 100%, 40%);">+  M_REC_TARRAY (PSI2_t, PCCCH_Description, PCCCH_Description_t, Count_PCCCH_Description),</span><br><span>   M_PADDING_BITS(PSI2_t),</span><br><span> CSN_DESCR_END  (PSI2_t)</span><br><span> /*< End Packet System Information Type 2 message content >*/</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/17574">change 17574</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17574"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I6f10350d4734360c7a15a702c72b59efd84987ee </div>
<div style="display:none"> Gerrit-Change-Number: 17574 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>