Commit 9c6a83e6 authored by Lionel Gauthier's avatar Lionel Gauthier

Old rev code


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7373 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent c1f14990
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_CONSTANTS_H__
# define __RLC_UM_CONSTANTS_H__
// SN Field
# define RLC_UM_SN_7BITS_MASK 0xFF
// li field (values shifted 1 bit left)
# define RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU 32
# define RLC_UM_LI_FIRST_PDU_BYTE_IS_FIRST_SDU_BYTE 0xFFF8
# define RLC_LI7_PDU_PADDING 0xFFFE
//----------------------------------------------------------
// Events defined for state model of the acknowledged mode entity
# define RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT 0x00
# define RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT 0x01
# define RLC_UM_RECEIVE_CRLC_SUSPEND_REQ_EVENT 0x10
# define RLC_UM_TRANSMIT_CRLC_SUSPEND_CNF_EVENT 0x11
# define RLC_UM_RECEIVE_CRLC_RESUME_REQ_EVENT 0x12
# endif
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_CONTROL_PRIMITIVES_H__
# define __RLC_UM_CONTROL_PRIMITIVES_H__
//-----------------------------------------------------------------------------
# include "rlc_um_entity.h"
# include "mem_block.h"
# include "rrm_config_structs.h"
//-----------------------------------------------------------------------------
extern void config_req_rlc_um (struct rlc_um_entity *rlcP, UM * config_umP, void *upper_layerP, void *(*data_indP) (void *, struct mem_block * sduP), uint8_t rb_idP);
extern void send_rlc_um_control_primitive (struct rlc_um_entity *rlcP, struct mem_block *cprimitiveP);
extern void init_rlc_um (struct rlc_um_entity *rlcP);
extern void rlc_um_reset_state_variables (struct rlc_um_entity *rlcP);
extern void rlc_um_free_all_resources (struct rlc_um_entity *rlcP);
extern void rlc_um_set_configured_parameters (struct rlc_um_entity *rlcP, struct mem_block *cprimitiveP);
# endif
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_ENTITY_H__
# define __RLC_UM_ENTITY_H__
//# include "platform.h"
# include "list.h"
# include "rlc_primitives.h"
# include "rlc_def.h"
# ifndef NO_THREAD_SAFE
# if !defined(USER_MODE) && defined(RTAI_ENABLED)
# include <rtai.h>
# include <rtai_posix.h>
# else
# include <pthread.h>
# endif
# endif
struct rlc_um_entity {
# ifndef NO_THREAD_SAFE
pthread_mutex_t mutex_input_buffer;
# endif
uint8_t allocation;
uint8_t protocol_state;
// for stats and trace purpose :
uint16_t data_plane; // act as a boolean
//*****************************************************************************
// TRANSMITER
//*****************************************************************************
//-----------------------------
// protocol variables
//-----------------------------
uint16_t first_li_in_next_pdu; // indicates :
// value = 000000000000000 that the previous PDU was exactly
// with the last segment of an RLC SDU and there is no LI that
// indicates the end of the SDU in the previous RLC PDU.
// value = 111111111111011 The last segment of an RLC SDU was one octet
// short of exactly filling the previous RLC PDU and there is no LI that
// indicates the end of the SDU in the previous RLC PDU. The remaining one
// octet in the previous RLC PDU is ignored.
// value = 111111111111110 AMD PDU: The rest of the RLC PDU includes a
// piggybacked STATUS PDU.
// value = 111111111111111 The rest of the RLC PDU is padding. The padding
// length can be zero.
uint8_t vt_us; // This state variable contains the "Sequence Number"
// of the next UMD PDU to be transmitted. It shall be
// incremented by 1 each time a UMD PDU is transmitted.
// The initial value of this variable is 0.
//-----------------------------
// discard info
//-----------------------------
uint8_t sdu_discard_mode;
//-----------------------------
// timers
//-----------------------------
uint16_t timer_discard_init;
uint32_t *frame_tick_milliseconds; // pointer on this tick variable handled by RRC : READ ONLY
//-----------------------------
// tranmission
//-----------------------------
// sdu communication;
mem_block **input_sdus; // should be accessed as an array
mem_block *input_sdus_alloc; // allocation of the array
uint16_t size_input_sdus_buffer;
uint16_t nb_sdu;
uint16_t next_sdu_index; // next location of incoming sdu
uint16_t current_sdu_index;
uint32_t buffer_occupancy;
uint16_t data_pdu_size;
uint16_t data_pdu_size_in_bits;
uint16_t nb_pdu_requested_by_mac;
uint8_t li_one_byte_short_to_add_in_next_pdu;
uint8_t li_exactly_filled_to_add_in_next_pdu;
uint8_t li_length_15_was_used_for_previous_pdu;
cnt_list_up pdus_to_mac_layer;
//-----------------------------
// C-SAP
//-----------------------------
list c_sap;
//-----------------------------
// Mapping info
//-----------------------------
uint8_t logical_channel_identity;
void *upper_layer; // may be PDCP or (RRC)
//*****************************************************************************
// RECEIVER
//*****************************************************************************
//-----------------------------
// protocol variables
//-----------------------------
uint8_t vr_us; // This state variable contains the "Sequence Number"
// following that of the last UMD PDU received. When a UMD PDU
// with "Sequence Number" equal to x is received, the state
// variable shall set equal to x + 1.
// The initial value of this variable is 0
//-----------------------------
// receiver
//-----------------------------
// the current output sdu is the first in the list
list output_sdu_list;
mem_block *output_sdu_in_construction;
unsigned int output_sdu_size_to_write; // for writing in sdu
//struct rlc_um_data_ind output_rlc_primitive;// for writing header in rt_fifo
list_up pdus_from_mac_layer;
uint8_t last_reassemblied_sn:7;
uint8_t rb_id;
void *(*rlc_data_ind) (void *, mem_block * sduP, uint8_t);
uint32_t tx_sdus;
uint32_t rx_sdus;
uint32_t tx_pdus;
uint32_t rx_pdus;
uint32_t rx_pdus_in_error;
uint8_t first_pdu;
};
# endif
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
#ifndef USER_MODE
# define __NO_VERSION__
# ifdef RTAI
# include <rtai.h>
# else
/* RTLINUX */
# include <rtl.h>
# endif
# include <asm/page.h>
#else
# include <stdlib.h>
# include <stdio.h>
# include <fcntl.h>
# include <signal.h>
# include <sys/types.h>
# include <sys/stat.h>
#endif
//-----------------------------------------------------------------------------
#include "print.h"
#include "platform.h"
#include "rlc_um_entity.h"
#include "rlc_um_constants.h"
#include "rlc_def.h"
#include "debug_l2.h"
//-----------------------------------------------------------------------------
#ifdef DEBUG_RLC_UM_FSM
# define PRINT_RLC_UM_FSM msg
#else
# define PRINT_RLC_UM_FSM //
#endif
//-----------------------------------------------------------------------------
int
rlc_um_fsm_notify_event (struct rlc_um_entity *rlcP, uint8_t eventP)
{
//-----------------------------------------------------------------------------
switch (rlcP->protocol_state) {
//-------------------------------
// RLC_NULL_STATE
//-------------------------------
case RLC_NULL_STATE:
switch (eventP) {
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT:
PRINT_RLC_UM_FSM ("[RLC_UM %p][FSM] RLC_NULL_STATE -> RLC_DATA_TRANSFER_READY_STATE\n", rlcP);
rlcP->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
return 1;
break;
default:
msg ("[RLC_UM %p][FSM] WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM NULL_STATE\n", rlcP, eventP);
return 0;
}
break;
//-------------------------------
// RLC_DATA_TRANSFER_READY_STATE
//-------------------------------
case RLC_DATA_TRANSFER_READY_STATE:
switch (eventP) {
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT:
PRINT_RLC_UM_FSM ("[RLC_UM %p][FSM] RLC_DATA_TRANSFER_READY_STATE -> RLC_NULL_STATE\n", rlcP);
rlcP->protocol_state = RLC_NULL_STATE;
return 1;
break;
case RLC_UM_RECEIVE_CRLC_SUSPEND_REQ_EVENT:
case RLC_UM_TRANSMIT_CRLC_SUSPEND_CNF_EVENT:
PRINT_RLC_UM_FSM ("[RLC_UM %p][FSM] RLC_DATA_TRANSFER_READY_STATE -> RLC_LOCAL_SUSPEND_STATE\n", rlcP);
rlcP->protocol_state = RLC_LOCAL_SUSPEND_STATE;
return 1;
break;
default:
msg ("[RLC_UM %p][FSM] WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM DATA_TRANSFER_READY_STATE\n", rlcP, eventP);
return 0;
}
break;
//-------------------------------
// RLC_LOCAL_SUSPEND_STATE
//-------------------------------
case RLC_LOCAL_SUSPEND_STATE:
switch (eventP) {
case RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_NULL_STATE_EVENT:
PRINT_RLC_UM_FSM ("[RLC_UM %p][FSM] RLC_LOCAL_SUSPEND_STATE -> RLC_NULL_STATE\n", rlcP);
rlcP->protocol_state = RLC_NULL_STATE;
return 1;
break;
case RLC_UM_RECEIVE_CRLC_RESUME_REQ_EVENT:
PRINT_RLC_UM_FSM ("[RLC_UM %p][FSM] RLC_LOCAL_SUSPEND_STATE -> RLC_DATA_TRANSFER_READY_STATE\n", rlcP);
rlcP->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
return 1;
break;
default:
msg ("[RLC_UM %p][FSM] WARNING PROTOCOL ERROR - EVENT %02X hex NOT EXPECTED FROM RLC_LOCAL_SUSPEND_STATE\n", rlcP, eventP);
return 0;
}
break;
default:
msg ("[RLC_UM %p][FSM] ERROR UNKNOWN STATE %d\n", rlcP, rlcP->protocol_state);
return 0;
}
}
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_FSM_PROTO_EXTERN_H__
# define __RLC_UM_FSM_PROTO_EXTERN_H__
//-----------------------------------------------------------------------------
# include "platform.h"
# include "rlc_um_entity.h"
//-----------------------------------------------------------------------------
extern int rlc_um_fsm_notify_event (struct rlc_um_entity *rlcP, uint8_t eventP);
# endif
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_PROTO_EXTERN_H__
# define __RLC_UM_PROTO_EXTERN_H__
# include "rlc_um_entity.h"
# include "mem_block.h"
extern void rlc_um_get_pdus (void *argP);
extern void rlc_um_rx (void *argP, struct mac_data_ind data_indP);
extern struct mac_status_resp rlc_um_mac_status_indication (void *rlcP, uint16_t no_tbP, uint16_t tb_sizeP, struct mac_status_ind tx_statusP);
extern struct mac_data_req rlc_um_mac_data_request (void *rlcP);
extern void rlc_um_mac_data_indication (void *rlcP, struct mac_data_ind data_indP);
extern void rlc_um_data_req (void *rlcP, struct mem_block *sduP);
# endif
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
#ifndef USER_MODE
# define __NO_VERSION__
# ifdef RTAI
# include <rtai.h>
# else
/* RTLINUX */
# include <rtl.h>
# endif
#else
# include <stdio.h>
# include <stdlib.h>
#endif
//-----------------------------------------------------------------------------
#include "print.h"
#include "rlc_um_entity.h"
#include "rlc_um_structs.h"
#include "rlc_primitives.h"
#include "rlc_um_constants.h"
#include "lists_proto_extern.h"
#include "protocol_vars_extern.h"
#include "debug_l2.h"
#include "LAYER2/MAC/extern.h"
#define DEBUG_RLC_UM_DISPLAY_ASCII_DATA
#define DEBUG_RLC_UM_SEND_SDU
//-----------------------------------------------------------------------------
void
rlc_um_reassembly (uint8_t * srcP, uint16_t lengthP, struct rlc_um_entity *rlcP)
{
//-----------------------------------------------------------------------------
int sdu_max_size;
#ifdef DEBUG_RLC_UM_DISPLAY_ASCII_DATA
int index;
#endif
#ifdef DEBUG_RLC_UM_REASSEMBLY
msg ("[RLC_UM][RB %d][REASSEMBLY] reassembly() %d bytes\n", rlcP->rb_id, lengthP);
#endif
if ((rlcP->data_plane)) {
sdu_max_size = RLC_SDU_MAX_SIZE_DATA_PLANE;
} else {
sdu_max_size = RLC_SDU_MAX_SIZE_CONTROL_PLANE;
}
if (rlcP->output_sdu_in_construction == NULL) {
rlcP->output_sdu_in_construction = get_free_mem_block (sdu_max_size + sizeof (struct rlc_indication));
rlcP->output_sdu_size_to_write = 0;
}
if ((rlcP->output_sdu_in_construction)) {
#ifdef DEBUG_RLC_UM_DISPLAY_ASCII_DATA
msg ("[RLC_UM][RB %d][REASSEMBLY] DATA :", rlcP->rb_id);
for (index = 0; index < lengthP; index++) {
msg ("%02X-", srcP[index]);
}
msg ("\n");
#endif
memcpy (&rlcP->output_sdu_in_construction->data[rlcP->output_sdu_size_to_write + sizeof (struct rlc_indication)], srcP, lengthP);
rlcP->output_sdu_size_to_write += lengthP;
} else {
msg ("[RLC_UM][RB %d][REASSEMBLY] ERROR OUTPUT SDU IS NULL\n", rlcP->rb_id);
}
}
//-----------------------------------------------------------------------------
void
rlc_um_send_sdu (struct rlc_um_entity *rlcP)
{
//-----------------------------------------------------------------------------
if ((rlcP->output_sdu_in_construction)) {
#ifdef DEBUG_RLC_UM_SEND_SDU
msg ("[RLC_UM][RB %d][SEND_SDU] %d bytes \n", rlcP->rb_id, rlcP->output_sdu_size_to_write);
#endif
if (rlcP->output_sdu_size_to_write > 0) {
#ifdef DEBUG_RLC_STATS
rlcP->rx_sdus += 1;
#endif
((struct rlc_indication *) (rlcP->output_sdu_in_construction->data))->type = RLC_UM_DATA_IND;
((struct rlc_indication *) (rlcP->output_sdu_in_construction->data))->primitive.um_ind.data_size = rlcP->output_sdu_size_to_write;
#ifdef BENCH_QOS_L2
fprintf (bench_l2, "[SDU DELIVERY] FRAME %d SIZE %d RB %d RLC-UM %p\n", mac_xface->frame, rlcP->output_sdu_size_to_write, rlcP->rb_id, rlcP);
#endif
rlcP->rlc_data_ind (rlcP->upper_layer, rlcP->output_sdu_in_construction, rlcP->rb_id);
} else {
#ifdef DEBUG_RLC_UM_SEND_SDU
msg ("[RLC_UM][RB %d][SEND_SDU] ERROR SIZE 0\n", rlcP->rb_id, rlcP->output_sdu_size_to_write);
#endif
free_mem_block (rlcP->output_sdu_in_construction);
}
rlcP->output_sdu_in_construction = NULL;
rlcP->output_sdu_size_to_write = 0;
}
}
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_REASSEMBLY_PROTO_EXTERN_H__
# define __RLC_UM_REASSEMBLY_PROTO_EXTERN_H__
//-----------------------------------------------------------------------------
# include "rlc_um_entity.h"
//-----------------------------------------------------------------------------
extern void rlc_um_reassembly (uint8_t * srcP, uint16_t lengthP, struct rlc_um_entity *rlcP);
extern void rlc_um_send_sdu (struct rlc_um_entity *rlcP);
# endif
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_RECEIVER_PROTO_EXTERN_H__
# define __RLC_UM_RECEIVER_PROTO_EXTERN_H__
# include "rlc_um_entity.h"
# include "mac_primitives.h"
void rlc_um_receive_15 (struct rlc_um_entity *rlcP, struct mac_data_ind data_indP);
void rlc_um_receive_7 (struct rlc_um_entity *rlcP, struct mac_data_ind data_indP);
# endif
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_SEGMENT_PROTO_EXTERN_H__
# define __RLC_UM_SEGMENT_PROTO_EXTERN_H__
//-----------------------------------------------------------------------------
# include "rlc_um_entity.h"
# include "rlc_um_structs.h"
# include "rlc_um_constants.h"
# include "lists_structs.h"
//-----------------------------------------------------------------------------
extern void rlc_um_segment_15 (struct rlc_um_entity *rlcP);
extern void rlc_um_segment_7 (struct rlc_um_entity *rlcP);
# endif
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/******************************************************************************
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*******************************************************************************/
# ifndef __RLC_UM_STRUCTS_H__
# define __RLC_UM_STRUCTS_H__
# include "platform.h"
# include "L1H_structs.h"
# include "lists_structs.h"
# include "rlc_am_constants.h"
# include "mac_primitives.h"
# include "rlc_primitives.h"
//-----------------------
struct rlc_um_tx_sdu_management {
uint8_t *first_byte;
int32_t sdu_creation_time;
uint16_t sdu_remaining_size;
uint16_t sdu_segmented_size;
uint16_t sdu_size;
uint8_t use_special_li;
};
//-----------------------
struct rlc_um_tx_pdu_management {
uint8_t *first_byte;
uint8_t *payload;
uint16_t data_size; // size of payload (not included byte1, LIs, and padding)
uint8_t dummy[MAC_HEADER_MAX_SIZE];
};
//-----------------------
struct rlc_um_rx_pdu_management {
uint8_t *first_byte;
uint8_t sn;
};
//-----------------------
struct rlc_um_tx_data_pdu_management {
union {
struct rlc_um_tx_pdu_management tx_pdu_mngmnt;
struct mac_tb_req tb_req;
struct mac_tx_tb_management tb_mngt;
L1H_TrChBlkData_MAC_Interface l1h_TrChBlkData_MAC_Interface;
# ifdef BYPASS_L1
struct rlc_um_rx_pdu_management dummy1;
struct mac_tb_ind dummy2;
struct mac_rx_tb_management dummy3;
struct rlc_output_primitive dummy4;
# endif
} dummy;
};
//-----------------------
struct rlc_um_rx_data_pdu_struct {
uint8_t byte1;
uint8_t li_data_7[1];
};
//-----------------------
struct rlc_um_tx_data_pdu_struct {
uint8_t byte1;
uint8_t li_data_7[1];
};
//-----------------------
struct rlc_um_data_req_alloc { // alloc enought bytes for sdu mngt also
union {
struct rlc_um_data_req dummy1;
struct rlc_um_tx_sdu_management dummy2;
} dummy;
};
# endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment