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
Michael Black
OpenXG-RAN
Commits
46438c7c
Commit
46438c7c
authored
Jul 13, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE/ESM: move _default_eps_bearer_context_data to nas_user_t
parent
404c3461
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
36 deletions
+30
-36
openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c
openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c
+7
-32
openair3/NAS/UE/ESM/SAP/esm_sap.c
openair3/NAS/UE/ESM/SAP/esm_sap.c
+1
-1
openair3/NAS/UE/ESM/esmData.h
openair3/NAS/UE/ESM/esmData.h
+11
-2
openair3/NAS/UE/ESM/esm_main.c
openair3/NAS/UE/ESM/esm_main.c
+9
-0
openair3/NAS/UE/ESM/esm_proc.h
openair3/NAS/UE/ESM/esm_proc.h
+1
-1
openair3/NAS/UE/user_defs.h
openair3/NAS/UE/user_defs.h
+1
-0
No files found.
openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c
View file @
46438c7c
...
@@ -63,19 +63,6 @@ Description Defines the default EPS bearer context activation ESM
...
@@ -63,19 +63,6 @@ Description Defines the default EPS bearer context activation ESM
/******************* 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 *******************/
/****************************************************************************/
/****************************************************************************/
/*
* --------------------------------------------------------------------------
* Internal data handled by the default EPS bearer context activation
* procedure in the UE
* --------------------------------------------------------------------------
*/
static
struct
{
int
ebi
;
/* EPS bearer identity of the default EPS bearer associated
* to the PDN connection to be activated */
}
_default_eps_bearer_context_data
=
{
ESM_EBI_UNASSIGNED
};
/****************************************************************************/
/****************************************************************************/
/****************** 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 ******************/
/****************************************************************************/
/****************************************************************************/
...
@@ -101,7 +88,6 @@ static struct {
...
@@ -101,7 +88,6 @@ static struct {
** Outputs: esm_cause: Cause code returned upon ESM procedure **
** Outputs: esm_cause: Cause code returned upon ESM procedure **
** failure **
** failure **
** Return: RETURNok, RETURNerror **
** Return: RETURNok, RETURNerror **
** Others: _default_eps_bearer_context_data **
** **
** **
***************************************************************************/
***************************************************************************/
int
esm_proc_default_eps_bearer_context_request
(
nas_user_t
*
user
,
int
pid
,
int
ebi
,
int
esm_proc_default_eps_bearer_context_request
(
nas_user_t
*
user
,
int
pid
,
int
ebi
,
...
@@ -110,6 +96,7 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
...
@@ -110,6 +96,7 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
{
{
LOG_FUNC_IN
;
LOG_FUNC_IN
;
esm_data_t
*
esm_data
=
user
->
esm_data
;
esm_data_t
*
esm_data
=
user
->
esm_data
;
default_eps_bearer_context_data_t
*
default_eps_bearer_context_data
=
user
->
default_eps_bearer_context_data
;
int
rc
=
RETURNerror
;
int
rc
=
RETURNerror
;
LOG_TRACE
(
INFO
,
"ESM-PROC - Default EPS bearer context activation "
LOG_TRACE
(
INFO
,
"ESM-PROC - Default EPS bearer context activation "
...
@@ -144,7 +131,7 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
...
@@ -144,7 +131,7 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
if
(
ebi
!=
ESM_EBI_UNASSIGNED
)
{
if
(
ebi
!=
ESM_EBI_UNASSIGNED
)
{
/* Default EPS bearer contextx successfully created */
/* Default EPS bearer contextx successfully created */
_default_eps_bearer_context_data
.
ebi
=
ebi
;
default_eps_bearer_context_data
->
ebi
=
ebi
;
rc
=
RETURNok
;
rc
=
RETURNok
;
}
else
{
}
else
{
/* No resource available */
/* No resource available */
...
@@ -311,10 +298,9 @@ int esm_proc_default_eps_bearer_context_reject(nas_user_t *user, int is_standalo
...
@@ -311,10 +298,9 @@ int esm_proc_default_eps_bearer_context_reject(nas_user_t *user, int is_standalo
** **
** **
** Outputs: None **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Return: RETURNok, RETURNerror **
** Others: _default_eps_bearer_context_data **
** **
** **
***************************************************************************/
***************************************************************************/
int
esm_proc_default_eps_bearer_context_complete
(
void
)
int
esm_proc_default_eps_bearer_context_complete
(
default_eps_bearer_context_data_t
*
default_eps_bearer_context_data
)
{
{
LOG_FUNC_IN
;
LOG_FUNC_IN
;
...
@@ -322,7 +308,7 @@ int esm_proc_default_eps_bearer_context_complete(void)
...
@@ -322,7 +308,7 @@ int esm_proc_default_eps_bearer_context_complete(void)
"ESM-PROC - Default EPS bearer context activation complete"
);
"ESM-PROC - Default EPS bearer context activation complete"
);
/* Reset default EPS bearer context internal data */
/* Reset default EPS bearer context internal data */
_default_eps_bearer_context_data
.
ebi
=
ESM_EBI_UNASSIGNED
;
default_eps_bearer_context_data
->
ebi
=
ESM_EBI_UNASSIGNED
;
LOG_FUNC_RETURN
(
RETURNok
);
LOG_FUNC_RETURN
(
RETURNok
);
}
}
...
@@ -340,18 +326,17 @@ int esm_proc_default_eps_bearer_context_complete(void)
...
@@ -340,18 +326,17 @@ int esm_proc_default_eps_bearer_context_complete(void)
** ACCEPT message was sent. **
** ACCEPT message was sent. **
** **
** **
** Inputs: None **
** Inputs: None **
** Others: _default_eps_bearer_context_data **
** **
** **
** Outputs: None **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Return: RETURNok, RETURNerror **
** Others: _default_eps_bearer_context_data **
** **
** **
***************************************************************************/
***************************************************************************/
int
esm_proc_default_eps_bearer_context_failure
(
nas_user_t
*
user
)
int
esm_proc_default_eps_bearer_context_failure
(
nas_user_t
*
user
)
{
{
LOG_FUNC_IN
;
LOG_FUNC_IN
;
default_eps_bearer_context_data_t
*
default_eps_bearer_context_data
=
user
->
default_eps_bearer_context_data
;
int
ebi
=
_default_eps_bearer_context_data
.
ebi
;
int
ebi
=
default_eps_bearer_context_data
->
ebi
;
int
pid
,
bid
;
int
pid
,
bid
;
LOG_TRACE
(
WARNING
,
LOG_TRACE
(
WARNING
,
...
@@ -362,18 +347,8 @@ int esm_proc_default_eps_bearer_context_failure(nas_user_t *user)
...
@@ -362,18 +347,8 @@ int esm_proc_default_eps_bearer_context_failure(nas_user_t *user)
if
(
rc
!=
RETURNerror
)
{
if
(
rc
!=
RETURNerror
)
{
/* Reset default EPS bearer context internal data */
/* Reset default EPS bearer context internal data */
_default_eps_bearer_context_data
.
ebi
=
ESM_EBI_UNASSIGNED
;
default_eps_bearer_context_data
->
ebi
=
ESM_EBI_UNASSIGNED
;
}
}
LOG_FUNC_RETURN
(
rc
);
LOG_FUNC_RETURN
(
rc
);
}
}
/****************************************************************************/
/********************* L O C A L F U N C T I O N S *********************/
/****************************************************************************/
/*
* --------------------------------------------------------------------------
* Timer handlers
* --------------------------------------------------------------------------
*/
openair3/NAS/UE/ESM/SAP/esm_sap.c
View file @
46438c7c
...
@@ -260,7 +260,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
...
@@ -260,7 +260,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
* The activate default ESP bearer context accept message
* The activate default ESP bearer context accept message
* has been successfully delivered to the other side
* has been successfully delivered to the other side
*/
*/
rc
=
esm_proc_default_eps_bearer_context_complete
();
rc
=
esm_proc_default_eps_bearer_context_complete
(
user
->
default_eps_bearer_context_data
);
if
(
rc
!=
RETURNerror
)
{
if
(
rc
!=
RETURNerror
)
{
rc
=
esm_proc_pdn_connectivity_complete
(
user
);
rc
=
esm_proc_pdn_connectivity_complete
(
user
);
...
...
openair3/NAS/UE/ESM/esmData.h
View file @
46438c7c
...
@@ -58,6 +58,17 @@ Description Defines internal private data handled by EPS Session
...
@@ -58,6 +58,17 @@ Description Defines internal private data handled by EPS Session
/************************ G L O B A L T Y P E S ************************/
/************************ G L O B A L T Y P E S ************************/
/****************************************************************************/
/****************************************************************************/
/*
* --------------------------------------------------------------------------
* Internal data handled by the default EPS bearer context activation
* procedure in the UE
* --------------------------------------------------------------------------
*/
typedef
struct
{
int
ebi
;
/* EPS bearer identity of the default EPS bearer associated
* to the PDN connection to be activated */
}
default_eps_bearer_context_data_t
;
/*
/*
* Minimal and maximal value of an EPS bearer identity:
* Minimal and maximal value of an EPS bearer identity:
* The EPS Bearer Identity (EBI) identifies a message flow
* The EPS Bearer Identity (EBI) identifies a message flow
...
@@ -73,8 +84,6 @@ typedef enum {
...
@@ -73,8 +84,6 @@ typedef enum {
ESM_EBR_STATE_MAX
ESM_EBR_STATE_MAX
}
esm_ebr_state
;
}
esm_ebr_state
;
/*
/*
* -----------------------
* -----------------------
* EPS bearer context data
* EPS bearer context data
...
...
openair3/NAS/UE/ESM/esm_main.c
View file @
46438c7c
...
@@ -77,12 +77,21 @@ void esm_main_initialize(nas_user_t *user, esm_indication_callback_t cb)
...
@@ -77,12 +77,21 @@ void esm_main_initialize(nas_user_t *user, esm_indication_callback_t cb)
LOG_FUNC_IN
;
LOG_FUNC_IN
;
int
i
;
int
i
;
esm_data_t
*
esm_data
=
calloc
(
1
,
sizeof
(
esm_data_t
));
esm_data_t
*
esm_data
=
calloc
(
1
,
sizeof
(
esm_data_t
));
if
(
esm_data
==
NULL
)
{
if
(
esm_data
==
NULL
)
{
LOG_TRACE
(
ERROR
,
"ESM-MAIN - Can't malloc esm_data"
);
LOG_TRACE
(
ERROR
,
"ESM-MAIN - Can't malloc esm_data"
);
// FIXME Stop here !!!
// FIXME Stop here !!!
}
}
user
->
esm_data
=
esm_data
;
user
->
esm_data
=
esm_data
;
default_eps_bearer_context_data_t
*
default_eps_bearer_context
=
calloc
(
1
,
sizeof
(
default_eps_bearer_context_data_t
));
if
(
default_eps_bearer_context
==
NULL
)
{
LOG_TRACE
(
ERROR
,
"ESM-MAIN - Can't malloc default_eps_bearer_context"
);
// FIXME Stop here !!!
}
default_eps_bearer_context
->
ebi
=
ESM_EBI_UNASSIGNED
;
user
->
default_eps_bearer_context_data
=
default_eps_bearer_context
;
/* Total number of active EPS bearer contexts */
/* Total number of active EPS bearer contexts */
esm_data
->
n_ebrs
=
0
;
esm_data
->
n_ebrs
=
0
;
/* List of active PDN connections */
/* List of active PDN connections */
...
...
openair3/NAS/UE/ESM/esm_proc.h
View file @
46438c7c
...
@@ -154,7 +154,7 @@ int esm_proc_pdn_disconnect_reject(nas_user_t *user, int pti, int *esm_cause);
...
@@ -154,7 +154,7 @@ int esm_proc_pdn_disconnect_reject(nas_user_t *user, int pti, int *esm_cause);
int
esm_proc_default_eps_bearer_context_request
(
nas_user_t
*
user
,
int
pid
,
int
ebi
,
int
esm_proc_default_eps_bearer_context_request
(
nas_user_t
*
user
,
int
pid
,
int
ebi
,
const
esm_proc_qos_t
*
esm_qos
,
int
*
esm_cause
);
const
esm_proc_qos_t
*
esm_qos
,
int
*
esm_cause
);
int
esm_proc_default_eps_bearer_context_complete
(
void
);
int
esm_proc_default_eps_bearer_context_complete
(
default_eps_bearer_context_data_t
*
default_eps_bearer_context_data
);
int
esm_proc_default_eps_bearer_context_failure
(
nas_user_t
*
user
);
int
esm_proc_default_eps_bearer_context_failure
(
nas_user_t
*
user
);
int
esm_proc_default_eps_bearer_context_accept
(
nas_user_t
*
user
,
int
is_standalone
,
int
ebi
,
int
esm_proc_default_eps_bearer_context_accept
(
nas_user_t
*
user
,
int
is_standalone
,
int
ebi
,
...
...
openair3/NAS/UE/user_defs.h
View file @
46438c7c
...
@@ -64,6 +64,7 @@ typedef struct {
...
@@ -64,6 +64,7 @@ typedef struct {
esm_data_t
*
esm_data
;
// ESM internal data (used within ESM only)
esm_data_t
*
esm_data
;
// ESM internal data (used within ESM only)
esm_pt_data_t
*
esm_pt_data
;
esm_pt_data_t
*
esm_pt_data
;
esm_ebr_data_t
*
esm_ebr_data
;
// EPS bearer contexts
esm_ebr_data_t
*
esm_ebr_data
;
// EPS bearer contexts
default_eps_bearer_context_data_t
*
default_eps_bearer_context_data
;
// Eps Mobility Management
// Eps Mobility Management
emm_fsm_state_t
emm_fsm_status
;
// Current EPS Mobility Management status
emm_fsm_state_t
emm_fsm_status
;
// Current EPS Mobility Management status
emm_data_t
*
emm_data
;
// EPS mobility management data
emm_data_t
*
emm_data
;
// EPS mobility management data
...
...
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