move common code file in common directory
remove several unused files remove mem_block_t that is never used in a different way than a simple heap buffer move up IP address type and remove duplications of the same struct declaration
This commit is contained in:
@@ -217,7 +217,7 @@ bool test_pdcp_data_req(void)
|
||||
unsigned int index = 0;
|
||||
|
||||
/*
|
||||
* Create an unsigned char buffer out of mem_block_t
|
||||
* Create an unsigned char buffer out of uint8_t
|
||||
*/
|
||||
pdcp_test_pdu_buffer = (unsigned char*) calloc(1, pdcp_test_pdu_buffer_size);
|
||||
|
||||
@@ -244,8 +244,8 @@ bool test_pdcp_data_req(void)
|
||||
msg("[TEST] Starting to dissect PDU created by PDCP...\n");
|
||||
|
||||
/*
|
||||
* XXX mem_block_t doesn't hold buffer size, how do we keep the size
|
||||
* information if we pass mem_block_ts via a linked list?
|
||||
* XXX uint8_t doesn't hold buffer size, how do we keep the size
|
||||
* information if we pass uint8_ts via a linked list?
|
||||
*/
|
||||
|
||||
if (pdcp_test_pdu_buffer_size == 0 ) {
|
||||
@@ -254,11 +254,11 @@ bool test_pdcp_data_req(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Serialize incoming mem_block_t into an unsigned character array
|
||||
* Serialize incoming uint8_t into an unsigned character array
|
||||
* and add removed PDU to RX list in order to use it in the next test
|
||||
* (test_pdcp_data_ind())
|
||||
*/
|
||||
mem_block_t* pdcp_test_pdu = list_remove_head(&test_pdu_tx_list);
|
||||
uint8_t* pdcp_test_pdu = list_remove_head(&test_pdu_tx_list);
|
||||
memcpy(pdcp_test_pdu_buffer, pdcp_test_pdu->data, pdcp_test_pdu_buffer_size);
|
||||
list_add_tail_eurecom(pdcp_test_pdu, &test_pdu_rx_list);
|
||||
|
||||
@@ -314,7 +314,7 @@ bool test_pdcp_data_ind(void)
|
||||
* every single element in the list
|
||||
*/
|
||||
list_t test_pdu_indication_list;
|
||||
mem_block_t* test_sdu = NULL;
|
||||
uint8_t* test_sdu = NULL;
|
||||
/*
|
||||
* pdcp_data_req() method prepended PDU header in front of DUMMY_BUFFER so
|
||||
* the size should be 12 bytes
|
||||
@@ -354,7 +354,7 @@ bool test_pdcp_data_ind(void)
|
||||
/*
|
||||
* Get pdcp_data_ind_header_t added by pdcp_data_ind()
|
||||
*/
|
||||
mem_block_t* test_data_ind_header = list_remove_head(&test_pdu_indication_list);
|
||||
uint8_t* test_data_ind_header = list_remove_head(&test_pdu_indication_list);
|
||||
|
||||
if (test_data_ind_header == NULL) {
|
||||
msg("[TEST] Data indication header is not valid!\n");
|
||||
|
||||
@@ -112,8 +112,8 @@ bool init_pdcp_entity(pdcp_t *pdcp_entity);
|
||||
//-----------------------------------------------------------------------------
|
||||
void pdcp_rlc_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP) //-----------------------------------------------------------------------------
|
||||
{
|
||||
mem_block_t* tb_src;
|
||||
mem_block_t* tb_dst;
|
||||
uint8_t *tb_src;
|
||||
uint8_t *tb_dst;
|
||||
unsigned int tb_size;
|
||||
|
||||
data_indP->no_tb = 0;
|
||||
@@ -130,7 +130,7 @@ void pdcp_rlc_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_dat
|
||||
*tx_packetsP = *tx_packetsP + 1;
|
||||
|
||||
if (*drop_countP == 0) {
|
||||
tb_dst = get_free_mem_block(sizeof (mac_rlc_max_rx_header_size_t) + tb_size, __func__);
|
||||
tb_dst = malloc16(sizeof(mac_rlc_max_rx_header_size_t) + tb_size);
|
||||
|
||||
if (tb_dst != NULL) {
|
||||
((struct mac_tb_ind *) (tb_dst->data))->first_bit = 0;
|
||||
@@ -154,7 +154,7 @@ void pdcp_rlc_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_dat
|
||||
*dropped_tx_packetsP = *dropped_tx_packetsP + 1;
|
||||
}
|
||||
|
||||
free_mem_block(tb_src, __func__);
|
||||
free(tb_src);
|
||||
|
||||
if (data_indP->no_tb > 0) {
|
||||
printf("[RLC-LOOP] Exchange %d TBs\n",data_indP->no_tb);
|
||||
|
||||
Reference in New Issue
Block a user