Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
openairinterface5G
Commits
0bd3c9ec
Commit
0bd3c9ec
authored
May 06, 2015
by
gauthier
Browse files
Old rev code
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@7371
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
e1e61893
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
openair2/LAYER2/PDCP/COPYING
deleted
100644 → 0
View file @
e1e61893
This diff is collapsed.
Click to expand it.
openair2/LAYER2/PDCP/pdcp.c
deleted
100755 → 0
View file @
e1e61893
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2011 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/
/*! \file pdcp.c
* \brief pdcp interface with RLC
* \author Lionel GAUTHIER and Navid Nikaein
* \date 2009
* \version 0.5
*/
#define PDCP_C
//#include "rtos_header.h"
#ifndef USER_MODE
#include <rtai_fifos.h>
#endif
#include "pdcp.h"
#include "LAYER2/RLC/rlc.h"
#include "LAYER2/MAC/extern.h"
//#include "mpls.h"
//#include "w3g4free_extern.h"
#define PDCP_DATA_REQ_DEBUG 1
#define PDCP_DATA_IND_DEBUG 1
//#define IDROMEL_NEMO 1
extern
rlc_op_status_t
rlc_data_req
(
module_id_t
,
rb_id_t
,
mui_t
,
confirm_t
,
sdu_size_t
,
mem_block_t
*
);
//-----------------------------------------------------------------------------
void
pdcp_data_req
(
module_id_t
module_idP
,
rb_id_t
rab_idP
,
sdu_size_t
data_sizeP
,
char
*
sduP
)
{
//-----------------------------------------------------------------------------
mem_block_t
*
new_sdu
=
NULL
;
// int i;
if
((
data_sizeP
>
0
))
{
if
(
data_sizeP
>
MAX_IP_PACKET_SIZE
)
{
msg
(
"[PDCP] REQ FOR SIZE %d !!!Abort
\n
"
,
data_sizeP
);
mac_xface
->
macphy_exit
(
""
);
}
new_sdu
=
get_free_mem_block
(
data_sizeP
);
if
(
new_sdu
)
{
#ifdef PDCP_DATA_REQ_DEBUG
msg
(
"[PDCP] TTI %d, INST %d: PDCP_DATA_REQ size %d RAB %d:
\n
"
,
Mac_rlc_xface
->
frame
,
module_idP
,
data_sizeP
,
rab_idP
);
// for (i=0;i<20;i++)
// msg("%02X.",((unsigned char*)sduP)[i]);
// msg("\n");
#endif //PDCP_DATA_REQ_DEBUG
// PROCESS OF DECOMPRESSION HERE:
memcpy
(
&
new_sdu
->
data
[
0
],
sduP
,
data_sizeP
);
rlc_data_req
(
module_idP
,
rab_idP
,
RLC_MUI_UNDEFINED
,
RLC_SDU_CONFIRM_NO
,
data_sizeP
,
new_sdu
);
if
(
Mac_rlc_xface
->
Is_cluster_head
[
module_idP
]
==
1
)
{
Pdcp_stats_tx
[
module_idP
][(
rab_idP
&
RAB_OFFSET2
)
>>
RAB_SHIFT2
][(
rab_idP
&
RAB_OFFSET
)
-
DTCH
]
++
;
Pdcp_stats_tx_bytes
[
module_idP
][(
rab_idP
&
RAB_OFFSET2
)
>>
RAB_SHIFT2
][(
rab_idP
&
RAB_OFFSET
)
-
DTCH
]
+=
data_sizeP
;
}
else
{
Pdcp_stats_tx
[
module_idP
][(
rab_idP
&
RAB_OFFSET2
)
>>
RAB_SHIFT2
][(
rab_idP
&
RAB_OFFSET
)
-
DTCH
]
++
;
Pdcp_stats_tx_bytes
[
module_idP
][(
rab_idP
&
RAB_OFFSET2
)
>>
RAB_SHIFT2
][(
rab_idP
&
RAB_OFFSET
)
-
DTCH
]
+=
data_sizeP
;
}
}
else
{
msg
(
"[PDCP][RAB %d][ERROR] PDCP_DATA_REQ OUT OF MEMORY
\n
"
,
rab_idP
);
}
// free_mem_block (sduP);
}
else
{
msg
(
"[PDCP][RAB %d][ERROR] PDCP_DATA_REQ SDU SIZE %d
\n
"
,
rab_idP
,
data_sizeP
);
}
}
//-----------------------------------------------------------------------------
void
pdcp_data_ind
(
module_id_t
module_idP
,
rb_id_t
rab_idP
,
sdu_size_t
data_sizeP
,
mem_block_t
*
sduP
)
{
//-----------------------------------------------------------------------------
mem_block_t
*
new_sdu
=
NULL
;
int
i
;
if
((
data_sizeP
>
0
))
{
// if(Mac_rlc_xface->Is_cluster_head[0]==1 && Mac_rlc_xface->frame%10==0)
//msg("[PDCP][RAB %d][INST %d] PDCP_DATA_IND size %d\n", rab_idP,module_idP,data_sizeP);
#ifdef PDCP_DATA_IND_DEBUG
msg
(
"[PDCP][RAB %d][INST %d] TTI %d PDCP_DATA_IND size %d
\n
"
,
rab_idP
,
module_idP
,
Mac_rlc_xface
->
frame
,
data_sizeP
);
for
(
i
=
0
;
i
<
20
;
i
++
)
{
msg
(
"%02X."
,(
unsigned
char
)
sduP
->
data
[
i
]);
}
msg
(
"
\n
"
);
#endif //PDCP_DATA_IND_DEBUG
new_sdu
=
get_free_mem_block
(
data_sizeP
+
sizeof
(
pdcp_data_ind_header_t
));
if
(
new_sdu
)
{
memset
(
new_sdu
->
data
,
0
,
sizeof
(
pdcp_data_ind_header_t
));
((
pdcp_data_ind_header_t
*
)
new_sdu
->
data
)
->
rb_id
=
rab_idP
;
((
pdcp_data_ind_header_t
*
)
new_sdu
->
data
)
->
data_size
=
data_sizeP
;
// Here there is no virtualization possible
#ifdef IDROMEL_NEMO
if
(
Mac_rlc_xface
->
Is_cluster_head
[
module_idP
]
==
0
)
{
((
pdcp_data_ind_header_t
*
)
new_sdu
->
data
)
->
inst
=
rab_idP
/
8
;
}
else
{
((
pdcp_data_ind_header_t
*
)
new_sdu
->
data
)
->
inst
=
0
;
}
#else
((
pdcp_data_ind_header_t
*
)
new_sdu
->
data
)
->
inst
=
module_idP
;
#endif
// PROCESS OF DECOMPRESSION HERE:
memcpy
(
&
new_sdu
->
data
[
sizeof
(
pdcp_data_ind_header_t
)],
&
sduP
->
data
[
0
],
data_sizeP
);
list_add_tail_eurecom
(
new_sdu
,
&
pdcp_sdu_list
);
if
(
Mac_rlc_xface
->
Is_cluster_head
[
module_idP
]
==
1
)
{
Pdcp_stats_rx
[
module_idP
][(
rab_idP
&
RAB_OFFSET2
)
>>
RAB_SHIFT2
][(
rab_idP
&
RAB_OFFSET
)
-
DTCH
]
++
;
Pdcp_stats_rx_bytes
[
module_idP
][(
rab_idP
&
RAB_OFFSET2
)
>>
RAB_SHIFT2
][(
rab_idP
&
RAB_OFFSET
)
-
DTCH
]
+=
data_sizeP
;
}
else
{
Pdcp_stats_rx
[
module_idP
][(
rab_idP
&
RAB_OFFSET2
)
>>
RAB_SHIFT2
][(
rab_idP
&
RAB_OFFSET
)
-
DTCH
]
++
;
Pdcp_stats_rx_bytes
[
module_idP
][(
rab_idP
&
RAB_OFFSET2
)
>>
RAB_SHIFT2
][(
rab_idP
&
RAB_OFFSET
)
-
DTCH
]
+=
data_sizeP
;
}
}
free_mem_block
(
sduP
);
}
}
//-----------------------------------------------------------------------------
void
pdcp_run
(
void
)
{
//-----------------------------------------------------------------------------
// NAS -> PDCP traffic
#ifndef PDCP_USE_NETLINK
#ifdef USER_MODE
//#define PDCP_DUMMY_BUFFER_SIZE 38
// unsigned char pdcp_dummy_buffer[PDCP_DUMMY_BUFFER_SIZE];
//msg("[PDCP] PDCP Run Id %d\n",modId);
/*
if(Mac_rlc_xface->frame %1 == 0 && (Mac_rlc_xface->frame > 30)) {
if (Mac_rlc_xface->Is_cluster_head[0] ==0){
pdcp_data_req(0,5,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
pdcp_data_req(0,4,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
// pdcp_data_req(0,4,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
// pdcp_data_req(3,4,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
//pdcp_data_req(4,4,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
}
// if (Mac_rlc_xface->Is_cluster_head[modId] == 1 && Mac_rlc_xface->frame %20 == 0) {
else{
pdcp_data_req(0,20,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
pdcp_data_req(0,21,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
pdcp_data_req(0,12,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
pdcp_data_req(0,13,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
//pdcp_data_req(0,20,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
}
// pdcp_data_req(0,28,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
// pdcp_data_req(0,36,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
}*/
#endif
#endif
unsigned
int
diff
,
i
,
k
,
j
;
if
((
Mac_rlc_xface
->
frame
%
128
)
==
0
)
{
// for(i=0;i<NB_INST;i++)
for
(
i
=
0
;
i
<
NB_UE_INST
;
i
++
)
for
(
j
=
0
;
j
<
NB_CNX_CH
;
j
++
)
for
(
k
=
0
;
k
<
NB_RAB_MAX
;
k
++
)
{
diff
=
Pdcp_stats_tx_bytes
[
i
][
j
][
k
];
Pdcp_stats_tx_bytes
[
i
][
j
][
k
]
=
0
;
Pdcp_stats_tx_rate
[
i
][
j
][
k
]
=
(
diff
*
8
)
>>
7
;
// (Pdcp_stats_tx_rate[i][k]*1+(7*diff*8)>>7)/8;
diff
=
Pdcp_stats_rx_bytes
[
i
][
j
][
k
];
Pdcp_stats_rx_bytes
[
i
][
j
][
k
]
=
0
;
Pdcp_stats_rx_rate
[
i
][
j
][
k
]
=
(
diff
*
8
)
>>
7
;
//(Pdcp_stats_rx_rate[i][k]*1 + (7*diff*8)>>7)/8;
}
}
// printf("[PDCP]Read sdus from NAS\n");
pdcp_fifo_read_input_sdus
();
// PDCP -> NAS traffic
pdcp_fifo_flush_sdus
();
/*printf("PDCP TTI %d\n", Mac_rlc_xface->frame);
for (i = 0; i < 3; i++) {
printf("[RLC_RRC][MOD ID %d] AM:", i);
for (j = 0; j < RLC_MAX_NUM_INSTANCES_RLC_AM; j++) {
printf("%d", rlc[i].m_rlc_am_array[j].allocation);
}
printf("\n[RLC_RRC][MOD ID %d] UM:", i);
for (j = 0; j < RLC_MAX_NUM_INSTANCES_RLC_UM; j++) {
printf("%d", rlc[i].m_rlc_um_array[j].allocation);
}
printf("\n");
}*/
}
//-----------------------------------------------------------------------------
void
pdcp_config_req
(
module_id_t
module_idP
,
rb_id_t
rab_idP
)
{
//-----------------------------------------------------------------------------
//msg ("[PDCP] pdcp_confiq_req()\n");
}
//-----------------------------------------------------------------------------
void
pdcp_config_release
(
module_id_t
module_idP
,
rb_id_t
rab_idP
)
{
//-----------------------------------------------------------------------------
//msg ("[PDCP] pdcp_config_release()\n");
}
//-----------------------------------------------------------------------------
int
pdcp_module_init
()
{
//-----------------------------------------------------------------------------
#ifndef USER_MODE
int
ret
;
ret
=
rtf_create
(
PDCP2NW_DRIVER_FIFO
,
32768
);
if
(
ret
<
0
)
{
printk
(
"[openair][MAC][INIT] Cannot create PDCP2NAS fifo %d (ERROR %d)
\n
"
,
PDCP2NW_DRIVER_FIFO
,
ret
);
return
(
-
1
);
}
else
{
printk
(
"[openair][MAC][INIT] Created PDCP2NAS fifo %d
\n
"
,
PDCP2NW_DRIVER_FIFO
);
rtf_reset
(
PDCP2NW_DRIVER_FIFO
);
}
ret
=
rtf_create
(
NW_DRIVER2PDCP_FIFO
,
32768
);
if
(
ret
<
0
)
{
printk
(
"[openair][MAC][INIT] Cannot create NAS2PDCP fifo %d (ERROR %d)
\n
"
,
NW_DRIVER2PDCP_FIFO
,
ret
);
return
(
-
1
);
}
else
{
printk
(
"[openair][MAC][INIT] Created NAS2PDCP fifo %d
\n
"
,
NW_DRIVER2PDCP_FIFO
);
rtf_reset
(
NW_DRIVER2PDCP_FIFO
);
}
pdcp_2_nas_irq
=
0
;
pdcp_input_sdu_remaining_size_to_read
=
0
;
pdcp_input_sdu_size_read
=
0
;
#endif
return
(
0
);
}
//-----------------------------------------------------------------------------
void
pdcp_module_cleanup
()
//-----------------------------------------------------------------------------
{
#ifndef USER_MODE
rtf_destroy
(
NW_DRIVER2PDCP_FIFO
);
rtf_destroy
(
PDCP2NW_DRIVER_FIFO
);
#endif
}
//-----------------------------------------------------------------------------
void
pdcp_layer_init
()
{
//-----------------------------------------------------------------------------
unsigned
int
i
,
j
,
k
;
list_init
(
&
pdcp_sdu_list
,
NULL
);
msg
(
"[PDCP] pdcp_layer_init
\n
"
);
pdcp_output_sdu_bytes_to_write
=
0
;
pdcp_output_header_bytes_to_write
=
0
;
pdcp_input_sdu_remaining_size_to_read
=
0
;
// for (i=0;i<NB_INST;i++)
for
(
i
=
0
;
i
<
NB_UE_INST
;
i
++
)
for
(
k
=
0
;
k
<
NB_CNX_CH
;
k
++
)
for
(
j
=
0
;
j
<
NB_RAB_MAX
;
j
++
)
{
Pdcp_stats_tx
[
i
][
k
][
j
]
=
0
;
Pdcp_stats_tx_bytes
[
i
][
k
][
j
]
=
0
;
Pdcp_stats_tx_bytes_last
[
i
][
k
][
j
]
=
0
;
Pdcp_stats_tx_rate
[
i
][
k
][
j
]
=
0
;
Pdcp_stats_rx
[
i
][
k
][
j
]
=
0
;
Pdcp_stats_rx_bytes
[
i
][
k
][
j
]
=
0
;
Pdcp_stats_rx_bytes_last
[
i
][
k
][
j
]
=
0
;
Pdcp_stats_rx_rate
[
i
][
k
][
j
]
=
0
;
}
}
//-----------------------------------------------------------------------------
void
pdcp_layer_cleanup
()
//-----------------------------------------------------------------------------
{
list_free
(
&
pdcp_sdu_list
);
}
#ifndef USER_MODE
EXPORT_SYMBOL
(
pdcp_2_nas_irq
);
#endif //USER_MODE
openair2/LAYER2/PDCP/pdcp.h
deleted
100755 → 0
View file @
e1e61893
/*
pdcp.h
-------------------
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
***************************************************************************/
#ifndef __PDCP_H__
# define __PDCP_H__
//-----------------------------------------------------------------------------
# ifdef PDCP_C
# define private_pdcp(x) x
# define protected_pdcp(x) x
# define public_pdcp(x) x
# else
# define private_pdcp(x)
# define public_pdcp(x) extern x
# ifdef PDCP_FIFO_C
# define protected_pdcp(x) extern x
# else
# define protected_pdcp(x)
# endif
# endif
# ifdef PDCP_FIFO_C
# define private_pdcp_fifo(x) x
# define protected_pdcp_fifo(x) x
# define public_pdcp_fifo(x) x
# else
# define private_pdcp_fifo(x)
# define public_pdcp_fifo(x) extern x
# ifdef PDCP_C
# define protected_pdcp_fifo(x) extern x
# else
# define protected_pdcp_fifo(x)
# endif
# endif
//-----------------------------------------------------------------------------
#ifndef NON_ACCESS_STRATUM
//#include "rtos_header.h"
//#include "openair_defs.h"
//#include "platform_types.h"
//#include "platform_constants.h"
#include "UTIL/MEM/mem_block.h"
#include "UTIL/LISTS/list.h"
#include "COMMON/mac_rrc_primitives.h"
#endif //NON_ACCESS_STRATUM
//-----------------------------------------------------------------------------
public_pdcp
(
unsigned
int
Pdcp_stats_tx
[
NB_MODULES_MAX
][
NB_CNX_CH
][
NB_RAB_MAX
]);
public_pdcp
(
unsigned
int
Pdcp_stats_tx_bytes
[
NB_MODULES_MAX
][
NB_CNX_CH
][
NB_RAB_MAX
]);
public_pdcp
(
unsigned
int
Pdcp_stats_tx_bytes_last
[
NB_MODULES_MAX
][
NB_CNX_CH
][
NB_RAB_MAX
]);
public_pdcp
(
unsigned
int
Pdcp_stats_tx_rate
[
NB_MODULES_MAX
][
NB_CNX_CH
][
NB_RAB_MAX
]);
public_pdcp
(
unsigned
int
Pdcp_stats_rx
[
NB_MODULES_MAX
][
NB_CNX_CH
][
NB_RAB_MAX
]);
public_pdcp
(
unsigned
int
Pdcp_stats_rx_bytes
[
NB_MODULES_MAX
][
NB_CNX_CH
][
NB_RAB_MAX
]);
public_pdcp
(
unsigned
int
Pdcp_stats_rx_bytes_last
[
NB_MODULES_MAX
][
NB_CNX_CH
][
NB_RAB_MAX
]);
public_pdcp
(
unsigned
int
Pdcp_stats_rx_rate
[
NB_MODULES_MAX
][
NB_CNX_CH
][
NB_RAB_MAX
]);
public_pdcp
(
void
pdcp_data_req
(
module_id_t
,
rb_id_t
,
sdu_size_t
,
char
*
);)
public_pdcp
(
void
pdcp_data_ind
(
module_id_t
,
rb_id_t
,
sdu_size_t
,
mem_block_t
*
);)
public_pdcp
(
void
pdcp_config_req
(
module_id_t
,
rb_id_t
);)
public_pdcp
(
void
pdcp_config_release
(
module_id_t
,
rb_id_t
);)
public_pdcp
(
void
pdcp_run
(
void
);)
public_pdcp
(
int
pdcp_module_init
();)
public_pdcp
(
void
pdcp_module_cleanup
();)
public_pdcp
(
void
pdcp_layer_init
();)
public_pdcp
(
void
pdcp_layer_cleanup
();)
#define PDCP2NW_DRIVER_FIFO 21
#define NW_DRIVER2PDCP_FIFO 22
protected_pdcp_fifo
(
int
pdcp_fifo_flush_sdus
();)
protected_pdcp_fifo
(
int
pdcp_fifo_read_input_sdus_remaining_bytes
();)
protected_pdcp_fifo
(
int
pdcp_fifo_read_input_sdus
();)
//-----------------------------------------------------------------------------
typedef
struct
pdcp_data_req_header_t
{
rb_id_t
rb_id
;
sdu_size_t
data_size
;
int
inst
;
}
pdcp_data_req_header_t
;
typedef
struct
pdcp_data_ind_header_t
{
rb_id_t
rb_id
;
sdu_size_t
data_size
;
int
inst
;
}
pdcp_data_ind_header_t
;
typedef
struct
pdcp_t
{
char
allocation
;
// here ROHC variables for header compression/decompression
}
pdcp_t
;
protected_pdcp
(
signed
int
pdcp_2_nas_irq
;)
protected_pdcp
(
pdcp_t
pdcp_array
[
MAX_MODULES
][
MAX_RAB
];)
protected_pdcp
(
sdu_size_t
pdcp_output_sdu_bytes_to_write
;)
protected_pdcp
(
sdu_size_t
pdcp_output_header_bytes_to_write
;)
protected_pdcp
(
list_t
pdcp_sdu_list
;)
protected_pdcp
(
int
pdcp_sent_a_sdu
;)
protected_pdcp
(
pdcp_data_req_header_t
pdcp_input_header
;)
protected_pdcp
(
char
pdcp_input_sdu_buffer
[
MAX_IP_PACKET_SIZE
];)
protected_pdcp
(
sdu_size_t
pdcp_input_index_header
;)
protected_pdcp
(
sdu_size_t
pdcp_input_sdu_size_read
;)
protected_pdcp
(
sdu_size_t
pdcp_input_sdu_remaining_size_to_read
;)
#endif
openair2/LAYER2/PDCP/pdcp_control_primitive.c
deleted
100755 → 0
View file @
e1e61893
/***************************************************************************
pdcp_control_primitives.c
-------------------
begin : Mon Dec 10 2001
copyright : (C) 2001 by EURECOM
email : Lionel.Gauthier@eurecom.fr
-------------------
description
This file contains the functions used for configuration of pdcp
***************************************************************************/
#include "rtos_header.h"
#include "platform.h"
#include "protocol_vars_extern.h"
#include "print.h"
//-----------------------------------------------------------------------------
#include "rlc.h"
#include "pdcp.h"
#include "debug_l2.h"
//-----------------------------------------------------------------------------
void
configure_pdcp_req
(
struct
pdcp_entity
*
pdcpP
,
void
*
rlcP
,
uint8_t
rlc_sap_typeP
,
uint8_t
header_compression_typeP
)
{
//-----------------------------------------------------------------------------
mem_block
*
mb
;
mb
=
get_free_mem_block
(
sizeof
(
struct
cpdcp_primitive
));
((
struct
cpdcp_primitive
*
)
mb
->
data
)
->
type
=
CPDCP_CONFIG_REQ
;
((
struct
cpdcp_primitive
*
)
mb
->
data
)
->
primitive
.
config_req
.
rlc_sap
=
rlcP
;
((
struct
cpdcp_primitive
*
)
mb
->
data
)
->
primitive
.
config_req
.
rlc_type_sap
=
rlc_sap_typeP
;
((
struct
cpdcp_primitive
*
)
mb
->
data
)
->
primitive
.
config_req
.
header_compression_type
=
header_compression_typeP
;
send_pdcp_control_primitive
(
pdcpP
,
mb
);
}
openair2/LAYER2/PDCP/pdcp_control_primitives_proto_extern.h
deleted
100755 → 0
View file @
e1e61893
/***************************************************************************
pdcp_control_primitives_proto_extern.h
-------------------
begin : Mon Dec 10 2001
copyright : (C) 2001 by EURECOM
email : Lionel.Gauthier@eurecom.fr
-------------------
description
This file contains the prototypes of functions used for configuration of pdcp
***************************************************************************/
#ifndef PDCP_CONTROL_PRIMITIVES_PROTO_EXTERN_H
# define PDCP_CONTROL_PRIMITIVES_PROTO_EXTERN_H
# include "pdcp.h"
void
rrc_configure_pdcp
(
struct
pdcp_entity
*
pdcpP
,
void
*
rlcP
,
uint8_t
rlc_sap_typeP
,
uint8_t
header_compression_typeP
);
#endif
openair2/LAYER2/PDCP/pdcp_entity.h
deleted
100755 → 0
View file @
e1e61893
/*
pdcp_entity.h
-------------------
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
***************************************************************************/
#ifndef __PDCP_ENTITY_H__
# define __PDCP_ENTITY_H__
# include "list.h"
struct
pdcp_entity
{
unsigned
short
id
;
// for resource management purpose
unsigned
char
allocation
;
void
*
rlc_sap
;
//-----------------------------
// C-SAP
//-----------------------------
list
c_sap
;
//-----------------------------
// tranmission
//-----------------------------
list
input_sdu_list
;
void
*
rlc
;
//-----------------------------
// receiver
//-----------------------------
//struct list output_sdu_list;
#ifdef ROHC
void
(
*
pdcp_process_input_sdus
)
(
struct
pdcp_entity
*
pdcpP
,
uint16_t
data_sizeP
,
mem_block
*
sduP
);
#else
void
(
*
pdcp_process_input_sdus
)
(
struct
pdcp_entity
*
pdcpP
);
#endif
unsigned
char
rb_id
;
// for traces
unsigned
char
rlc_type_sap
;
// am, um, tr
struct
rb_dispatcher
*
rb_dispatch
;
};
#endif
openair2/LAYER2/PDCP/pdcp_fifo.c
deleted
100755 → 0
View file @
e1e61893
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2011 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/
/*! \file pdcp_fifo.c
* \brief pdcp interface with linux IP interface
* \author Lionel GAUTHIER and Navid Nikaein
* \date 2009
* \version 0.5
* \warning This component can be runned only in user-space
* @ingroup pdcp
*/
#define PDCP_FIFO_C
#include "pdcp.h"
#ifdef USER_MODE
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define rtf_put write
#define rtf_get read
#else
#include <rtai_fifos.h>
#endif //USER_MODE
#include "../MAC/extern.h"
#include "SIMULATION/ETH_TRANSPORT/extern.h"
#define PDCP_DEBUG 1
//#define IDROMEL_NEMO 1
#ifdef USER_MODE
#include "UTIL/OCG/OCG.h"
#include "UTIL/OCG/OCG_extern.h"
#endif
#ifdef PDCP_USE_NETLINK
#include <sys/socket.h>
#include <linux/netlink.h>
extern
struct
sockaddr_nl
nas_src_addr
,
nas_dest_addr
;
extern
struct
nlmsghdr
*
nas_nlh
;
extern
struct
iovec
nas_iov
;
extern
int
nas_sock_fd
;
extern
struct
msghdr
nas_msg
;
#define MAX_PAYLOAD 1600
/* maximum payload size*/
unsigned
char
pdcp_read_state
=
0
;