Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
5367d5dc
Commit
5367d5dc
authored
Jul 22, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE/EMM: move _lowerlayer_data to nas_user_t
parent
1ca4d551
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
47 deletions
+60
-47
openair3/NAS/UE/EMM/LowerLayer.c
openair3/NAS/UE/EMM/LowerLayer.c
+17
-28
openair3/NAS/UE/EMM/LowerLayer.h
openair3/NAS/UE/EMM/LowerLayer.h
+1
-18
openair3/NAS/UE/EMM/LowerLayer_defs.h
openair3/NAS/UE/EMM/LowerLayer_defs.h
+33
-0
openair3/NAS/UE/nas_ue_task.c
openair3/NAS/UE/nas_ue_task.c
+7
-1
openair3/NAS/UE/user_defs.h
openair3/NAS/UE/user_defs.h
+2
-0
No files found.
openair3/NAS/UE/EMM/LowerLayer.c
View file @
5367d5dc
...
@@ -60,17 +60,6 @@ Description Defines EMM procedures executed by the Non-Access Stratum
...
@@ -60,17 +60,6 @@ Description Defines EMM procedures executed by the Non-Access Stratum
/******************* L O C A L D E F I N I T I O N S *******************/
/******************* L O C A L D E F I N I T I O N S *******************/
/****************************************************************************/
/****************************************************************************/
/*
* Data structure used to handle EMM procedures executed by the UE upon
* receiving lower layer notifications
*/
static
struct
{
lowerlayer_success_callback_t
success
;
/* Successful data delivery */
lowerlayer_failure_callback_t
failure
;
/* Lower layer failure */
lowerlayer_release_callback_t
release
;
/* NAS signalling release */
void
*
args
;
/* EMM procedure argument parameters */
}
_lowerlayer_data
;
/****************************************************************************/
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
/****************************************************************************/
...
@@ -293,17 +282,17 @@ int lowerlayer_data_req(nas_user_t *user, const OctetString *data)
...
@@ -293,17 +282,17 @@ int lowerlayer_data_req(nas_user_t *user, const OctetString *data)
** Others: _lowerlayer_data **
** Others: _lowerlayer_data **
** **
** **
***************************************************************************/
***************************************************************************/
int
emm_proc_lowerlayer_initialize
(
lowerlayer_success_callback_t
success
,
int
emm_proc_lowerlayer_initialize
(
lowerlayer_
data_t
*
lowerlayer_data
,
lowerlayer_
success_callback_t
success
,
lowerlayer_failure_callback_t
failure
,
lowerlayer_failure_callback_t
failure
,
lowerlayer_release_callback_t
release
,
lowerlayer_release_callback_t
release
,
void
*
args
)
void
*
args
)
{
{
LOG_FUNC_IN
;
LOG_FUNC_IN
;
_lowerlayer_data
.
success
=
success
;
lowerlayer_data
->
success
=
success
;
_lowerlayer_data
.
failure
=
failure
;
lowerlayer_data
->
failure
=
failure
;
_lowerlayer_data
.
release
=
release
;
lowerlayer_data
->
release
=
release
;
_lowerlayer_data
.
args
=
args
;
lowerlayer_data
->
args
=
args
;
LOG_FUNC_RETURN
(
RETURNok
);
LOG_FUNC_RETURN
(
RETURNok
);
}
}
...
@@ -324,17 +313,17 @@ int emm_proc_lowerlayer_initialize(lowerlayer_success_callback_t success,
...
@@ -324,17 +313,17 @@ int emm_proc_lowerlayer_initialize(lowerlayer_success_callback_t success,
** Others: None **
** Others: None **
** **
** **
***************************************************************************/
***************************************************************************/
int
emm_proc_lowerlayer_success
(
void
)
int
emm_proc_lowerlayer_success
(
lowerlayer_data_t
*
lowerlayer_data
)
{
{
LOG_FUNC_IN
;
LOG_FUNC_IN
;
int
rc
=
RETURNok
;
int
rc
=
RETURNok
;
lowerlayer_success_callback_t
emm_callback
=
_lowerlayer_data
.
success
;
lowerlayer_success_callback_t
emm_callback
=
lowerlayer_data
->
success
;
if
(
emm_callback
)
{
if
(
emm_callback
)
{
rc
=
(
*
emm_callback
)(
_lowerlayer_data
.
args
);
rc
=
(
*
emm_callback
)(
lowerlayer_data
->
args
);
_lowerlayer_data
.
success
=
NULL
;
lowerlayer_data
->
success
=
NULL
;
}
}
LOG_FUNC_RETURN
(
rc
);
LOG_FUNC_RETURN
(
rc
);
...
@@ -356,17 +345,17 @@ int emm_proc_lowerlayer_success(void)
...
@@ -356,17 +345,17 @@ int emm_proc_lowerlayer_success(void)
** Others: None **
** Others: None **
** **
** **
***************************************************************************/
***************************************************************************/
int
emm_proc_lowerlayer_failure
(
int
is_initial
)
int
emm_proc_lowerlayer_failure
(
lowerlayer_data_t
*
lowerlayer_data
,
int
is_initial
)
{
{
LOG_FUNC_IN
;
LOG_FUNC_IN
;
int
rc
=
RETURNok
;
int
rc
=
RETURNok
;
lowerlayer_failure_callback_t
emm_callback
=
_lowerlayer_data
.
failure
;
lowerlayer_failure_callback_t
emm_callback
=
lowerlayer_data
->
failure
;
if
(
emm_callback
)
{
if
(
emm_callback
)
{
rc
=
(
*
emm_callback
)(
is_initial
,
_lowerlayer_data
.
args
);
rc
=
(
*
emm_callback
)(
is_initial
,
lowerlayer_data
->
args
);
_lowerlayer_data
.
failure
=
NULL
;
lowerlayer_data
->
failure
=
NULL
;
}
}
LOG_FUNC_RETURN
(
rc
);
LOG_FUNC_RETURN
(
rc
);
...
@@ -387,17 +376,17 @@ int emm_proc_lowerlayer_failure(int is_initial)
...
@@ -387,17 +376,17 @@ int emm_proc_lowerlayer_failure(int is_initial)
** Others: None **
** Others: None **
** **
** **
***************************************************************************/
***************************************************************************/
int
emm_proc_lowerlayer_release
(
void
)
int
emm_proc_lowerlayer_release
(
lowerlayer_data_t
*
lowerlayer_data
)
{
{
LOG_FUNC_IN
;
LOG_FUNC_IN
;
int
rc
=
RETURNok
;
int
rc
=
RETURNok
;
lowerlayer_release_callback_t
emm_callback
=
_lowerlayer_data
.
release
;
lowerlayer_release_callback_t
emm_callback
=
lowerlayer_data
->
release
;
if
(
emm_callback
)
{
if
(
emm_callback
)
{
rc
=
(
*
emm_callback
)(
_lowerlayer_data
.
args
);
rc
=
(
*
emm_callback
)(
lowerlayer_data
->
args
);
_lowerlayer_data
.
release
=
NULL
;
lowerlayer_data
->
release
=
NULL
;
}
}
LOG_FUNC_RETURN
(
rc
);
LOG_FUNC_RETURN
(
rc
);
...
...
openair3/NAS/UE/EMM/LowerLayer.h
View file @
5367d5dc
...
@@ -49,28 +49,11 @@ Description Defines EMM procedures executed by the Non-Access Stratum
...
@@ -49,28 +49,11 @@ Description Defines EMM procedures executed by the Non-Access Stratum
/********************* G L O B A L C O N S T A N T S *******************/
/********************* G L O B A L C O N S T A N T S *******************/
/****************************************************************************/
/****************************************************************************/
/*
* Type of EMM procedure callback function executed whenever data are
* successfully delivered to the network
*/
typedef
int
(
*
lowerlayer_success_callback_t
)(
void
*
);
/*
* Type of EMM procedure callback function executed when data are not
* delivered to the network because a lower layer failure occurred
*/
typedef
int
(
*
lowerlayer_failure_callback_t
)(
int
,
void
*
);
/*
* Type of EMM procedure callback function executed when NAS signalling
* connection is released
*/
typedef
int
(
*
lowerlayer_release_callback_t
)(
void
*
);
/****************************************************************************/
/****************************************************************************/
/************************ G L O B A L T Y P E S ************************/
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
/****************************************************************************/
/****************************************************************************/
/****************************************************************************/
/******************** G L O B A L V A R I A B L E S ********************/
/******************** G L O B A L V A R I A B L E S ********************/
/****************************************************************************/
/****************************************************************************/
...
...
openair3/NAS/UE/EMM/LowerLayer_defs.h
0 → 100644
View file @
5367d5dc
#ifndef _LOWER_LAYER_DEFS_H
#define _LOWER_LAYER_DEFS_H
/*
* Type of EMM procedure callback function executed whenever data are
* successfully delivered to the network
*/
typedef
int
(
*
lowerlayer_success_callback_t
)(
void
*
);
/*
* Type of EMM procedure callback function executed when data are not
* delivered to the network because a lower layer failure occurred
*/
typedef
int
(
*
lowerlayer_failure_callback_t
)(
int
,
void
*
);
/*
* Type of EMM procedure callback function executed when NAS signalling
* connection is released
*/
typedef
int
(
*
lowerlayer_release_callback_t
)(
void
*
);
/*
* Data structure used to handle EMM procedures executed by the UE upon
* receiving lower layer notifications
*/
typedef
struct
{
lowerlayer_success_callback_t
success
;
/* Successful data delivery */
lowerlayer_failure_callback_t
failure
;
/* Lower layer failure */
lowerlayer_release_callback_t
release
;
/* NAS signalling release */
void
*
args
;
/* EMM procedure argument parameters */
}
lowerlayer_data_t
;
#endif
openair3/NAS/UE/nas_ue_task.c
View file @
5367d5dc
...
@@ -107,7 +107,13 @@ void *nas_ue_task(void *args_p)
...
@@ -107,7 +107,13 @@ void *nas_ue_task(void *args_p)
user
->
at_response
=
calloc
(
1
,
sizeof
(
at_response_t
));
user
->
at_response
=
calloc
(
1
,
sizeof
(
at_response_t
));
if
(
user
->
at_response
==
NULL
)
{
if
(
user
->
at_response
==
NULL
)
{
LOG_E
(
NAS
,
"[UE %d] Can't allocate memory for user_at_commands
\n
"
,
0
);
LOG_E
(
NAS
,
"[UE %d] Can't allocate memory for at_response
\n
"
,
0
);
exit
(
EXIT_FAILURE
);
}
user
->
lowerlayer_data
=
calloc
(
1
,
sizeof
(
lowerlayer_data_t
));
if
(
user
->
lowerlayer_data
==
NULL
)
{
LOG_E
(
NAS
,
"[UE %d] Can't allocate memory for lowerlayer_data
\n
"
,
0
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
...
...
openair3/NAS/UE/user_defs.h
View file @
5367d5dc
...
@@ -52,6 +52,7 @@ Description NAS type definition to manage a user equipment
...
@@ -52,6 +52,7 @@ Description NAS type definition to manage a user equipment
#include "EMM/emmData.h"
#include "EMM/emmData.h"
#include "EMM/Authentication.h"
#include "EMM/Authentication.h"
#include "EMM/IdleMode_defs.h"
#include "EMM/IdleMode_defs.h"
#include "EMM/LowerLayer_defs.h"
#include "API/USIM/usim_api.h"
#include "API/USIM/usim_api.h"
#include "API/USER/user_api_defs.h"
#include "API/USER/user_api_defs.h"
#include "SecurityModeControl.h"
#include "SecurityModeControl.h"
...
@@ -81,6 +82,7 @@ typedef struct {
...
@@ -81,6 +82,7 @@ typedef struct {
//
//
user_at_commands_t
*
user_at_commands
;
//decoded data received from the user application layer
user_at_commands_t
*
user_at_commands
;
//decoded data received from the user application layer
user_api_id_t
*
user_api_id
;
user_api_id_t
*
user_api_id
;
lowerlayer_data_t
*
lowerlayer_data
;
}
nas_user_t
;
}
nas_user_t
;
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment