aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-03-26 15:03:33 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-03-26 16:03:27 +0100
commit007056e4ad3615b30d54effd4ded49755a115b4d (patch)
treebd415d3e9a8bf329dbd48933e6f1cde7f2ae982b
parent754b093d16f269a41d421c437dc47bfa0a2ed9c3 (diff)
gsm_rlcmac: Use 'struct bitvec' instead of 'bitvec'
The later is only accepted when compiling as c++. Change-Id: Ib5004643d4eff3bc9d11b66ddaf262f1c0d2aef6
-rw-r--r--src/gsm_rlcmac.cpp24
-rw-r--r--src/gsm_rlcmac.h14
-rw-r--r--tests/rlcmac/RLCMACTest.cpp2
3 files changed, 20 insertions, 20 deletions
diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp
index a2aae90..0d769ce 100644
--- a/src/gsm_rlcmac.cpp
+++ b/src/gsm_rlcmac.cpp
@@ -188,7 +188,7 @@ CSN_DESCR_BEGIN (EGPRS_AckNack_Desc_t)
CSN_DESCR_END (EGPRS_AckNack_Desc_t)
/*< EGPRS Ack/Nack Description IE >*/
-gint16 Egprs_Ack_Nack_Desc_w_len_Dissector(csnStream_t* ar, bitvec *vector, unsigned *readIndex, void* data)
+gint16 Egprs_Ack_Nack_Desc_w_len_Dissector(csnStream_t* ar, struct bitvec *vector, unsigned *readIndex, void* data)
{
if (ar->direction == 0)
{
@@ -749,7 +749,7 @@ CSN_DESCR_BEGIN(Receive_N_PDU_Number_t)
M_UINT (Receive_N_PDU_Number_t, value, 8),
CSN_DESCR_END (Receive_N_PDU_Number_t)
-gint16 Receive_N_PDU_Number_list_Dissector(csnStream_t* ar, bitvec *vector, unsigned *readIndex, void* data)
+gint16 Receive_N_PDU_Number_list_Dissector(csnStream_t* ar, struct bitvec *vector, unsigned *readIndex, void* data)
{
if (ar->direction == 0)
{
@@ -885,7 +885,7 @@ CSN_DESCR_BEGIN (Content_t)
CSN_DESCR_END (Content_t)
-gint16 Content_Dissector(csnStream_t* ar, bitvec *vector, unsigned *readIndex, void* data)
+gint16 Content_Dissector(csnStream_t* ar, struct bitvec *vector, unsigned *readIndex, void* data)
{
if (ar->direction == 0)
{
@@ -909,7 +909,7 @@ CSN_DESCR_BEGIN (Additional_access_technologies_t)
M_REC_TARRAY (Additional_access_technologies_t, Additional_access_technologies, Additional_access_technologies_struct_t, Count_additional_access_technologies),
CSN_DESCR_END (Additional_access_technologies_t)
-gint16 Additional_access_technologies_Dissector(csnStream_t* ar, bitvec* vector, unsigned *readIndex, void* data)
+static gint16 Additional_access_technologies_Dissector(csnStream_t* ar, struct bitvec *vector, unsigned *readIndex, void* data)
{
if (ar->direction == 0)
{
@@ -4951,7 +4951,7 @@ static const struct value_string rlcmac_dl_msg_names[] = {
};
/* Returns 0 on success, negative on error. */
-int decode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data)
+int decode_gsm_rlcmac_uplink(struct bitvec *vector, RlcMacUplink_t * data)
{
csnStream_t ar;
int ret;
@@ -5076,7 +5076,7 @@ int decode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data)
}
/* Returns 0 on success, negative on error. */
-int decode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data)
+int decode_gsm_rlcmac_downlink(struct bitvec *vector, RlcMacDownlink_t * data)
{
csnStream_t ar;
/* See RLC/MAC downlink control block structure in TS 44.060 / 10.3.1 */
@@ -5288,7 +5288,7 @@ int decode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data)
}
/* Returns 0 on success, negative on error. */
-int encode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data)
+int encode_gsm_rlcmac_uplink(struct bitvec *vector, RlcMacUplink_t * data)
{
csnStream_t ar;
unsigned writeIndex = 0;
@@ -5400,7 +5400,7 @@ int encode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data)
}
/* Returns 0 on success, negative on error. */
-int encode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data)
+int encode_gsm_rlcmac_downlink(struct bitvec *vector, RlcMacDownlink_t * data)
{
csnStream_t ar;
int ret;
@@ -5609,7 +5609,7 @@ int encode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data)
return ret;
}
-void decode_gsm_rlcmac_uplink_data(bitvec * vector, RlcMacUplinkDataBlock_t * data)
+void decode_gsm_rlcmac_uplink_data(struct bitvec *vector, RlcMacUplinkDataBlock_t * data)
{
unsigned readIndex = 0;
//unsigned dataLen = 0;
@@ -5687,7 +5687,7 @@ void decode_gsm_rlcmac_uplink_data(bitvec * vector, RlcMacUplinkDataBlock_t * da
}
}
-void encode_gsm_rlcmac_downlink_data(bitvec * vector, RlcMacDownlinkDataBlock_t * data)
+void encode_gsm_rlcmac_downlink_data(struct bitvec *vector, RlcMacDownlinkDataBlock_t * data)
{
unsigned writeIndex = 0;
@@ -5745,7 +5745,7 @@ void encode_gsm_rlcmac_downlink_data(bitvec * vector, RlcMacDownlinkDataBlock_t
}
}
-int decode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t *data)
+int decode_gsm_ra_cap(struct bitvec *vector, MS_Radio_Access_capability_t *data)
{
csnStream_t ar;
int ret;
@@ -5771,7 +5771,7 @@ int decode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t *data)
/* This function is not actually used by osmo-pcu itself, and only needed for
* the RLCMAC unit test. Having it here is better than making the internal
* CSN.1 definitions (in particular, MS_Radio_Access_capability_t) non-static. */
-int encode_gsm_ra_cap(bitvec *vector, MS_Radio_Access_capability_t *data)
+int encode_gsm_ra_cap(struct bitvec *vector, MS_Radio_Access_capability_t *data)
{
unsigned writeIndex = 0;
csnStream_t ar;
diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h
index d0bd9f6..1a448e4 100644
--- a/src/gsm_rlcmac.h
+++ b/src/gsm_rlcmac.h
@@ -5328,11 +5328,11 @@ typedef struct
} EnhancedMeasurementReport_t;
- int decode_gsm_rlcmac_uplink(bitvec *vector, RlcMacUplink_t *data);
- int decode_gsm_rlcmac_downlink(bitvec *vector, RlcMacDownlink_t *data);
- int encode_gsm_rlcmac_downlink(bitvec *vector, RlcMacDownlink_t *data);
- int encode_gsm_rlcmac_uplink(bitvec *vector, RlcMacUplink_t *data);
- void decode_gsm_rlcmac_uplink_data(bitvec * vector, RlcMacUplinkDataBlock_t * data);
- void encode_gsm_rlcmac_downlink_data(bitvec * vector, RlcMacDownlinkDataBlock_t * data);
- int decode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t * data);
+ int decode_gsm_rlcmac_uplink(struct bitvec *vector, RlcMacUplink_t *data);
+ int decode_gsm_rlcmac_downlink(struct bitvec *vector, RlcMacDownlink_t *data);
+ int encode_gsm_rlcmac_downlink(struct bitvec *vector, RlcMacDownlink_t *data);
+ int encode_gsm_rlcmac_uplink(struct bitvec *vector, RlcMacUplink_t *data);
+ void decode_gsm_rlcmac_uplink_data(struct bitvec *vector, RlcMacUplinkDataBlock_t * data);
+ void encode_gsm_rlcmac_downlink_data(struct bitvec *vector, RlcMacDownlinkDataBlock_t * data);
+ int decode_gsm_ra_cap(struct bitvec *vector, MS_Radio_Access_capability_t * data);
#endif /* __PACKET_GSM_RLCMAC_H__ */
diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp
index 200cac8..a21c22d 100644
--- a/tests/rlcmac/RLCMACTest.cpp
+++ b/tests/rlcmac/RLCMACTest.cpp
@@ -215,7 +215,7 @@ void testCsnLeftAlignedVarBmpBounds(void *test_ctx)
msgb_free(m);
}
-int encode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t * data);
+int encode_gsm_ra_cap(struct bitvec *vector, MS_Radio_Access_capability_t * data);
void testRAcap(void *test_ctx)
{