Commit 490d0f0f authored by winckel's avatar winckel

Modified makefiles to integrate UE NAS lib.

Corrected some NAS file to compile without C99 mode option.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4633 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 15e3d8cb
...@@ -372,6 +372,8 @@ int emm_proc_attach_accept(long t3412, long t3402, long t3423, ...@@ -372,6 +372,8 @@ int emm_proc_attach_accept(long t3412, long t3402, long t3423,
emm_sap_t emm_sap; emm_sap_t emm_sap;
esm_sap_t esm_sap; esm_sap_t esm_sap;
int rc; int rc;
int i;
int j;
LOG_TRACE(INFO, "EMM-PROC - EPS attach accepted by the network"); LOG_TRACE(INFO, "EMM-PROC - EPS attach accepted by the network");
...@@ -381,7 +383,7 @@ int emm_proc_attach_accept(long t3412, long t3402, long t3423, ...@@ -381,7 +383,7 @@ int emm_proc_attach_accept(long t3412, long t3402, long t3423,
/* Delete old TAI list and store the received TAI list */ /* Delete old TAI list and store the received TAI list */
_emm_data.ltai.n_tais = n_tais; _emm_data.ltai.n_tais = n_tais;
for (int i = 0; (i < n_tais) && (i < EMM_DATA_TAI_MAX); i++) { for (i = 0; (i < n_tais) && (i < EMM_DATA_TAI_MAX); i++) {
_emm_data.ltai.tai[i] = tai[i]; _emm_data.ltai.tai[i] = tai[i];
} }
...@@ -404,13 +406,13 @@ int emm_proc_attach_accept(long t3412, long t3402, long t3423, ...@@ -404,13 +406,13 @@ int emm_proc_attach_accept(long t3412, long t3402, long t3423,
/* Update the stored list of equivalent PLMNs */ /* Update the stored list of equivalent PLMNs */
_emm_data.nvdata.eplmn.n_plmns = 0; _emm_data.nvdata.eplmn.n_plmns = 0;
if (n_eplmns > 0) { if (n_eplmns > 0) {
for (int i = 0; (i < n_eplmns) && (i < EMM_DATA_EPLMN_MAX); i++) { for (i = 0; (i < n_eplmns) && (i < EMM_DATA_EPLMN_MAX); i++) {
int is_forbidden = FALSE; int is_forbidden = FALSE;
if (!_emm_data.is_emergency) { if (!_emm_data.is_emergency) {
/* If the attach procedure is not for emergency bearer /* If the attach procedure is not for emergency bearer
* services, the UE shall remove from the list any PLMN * services, the UE shall remove from the list any PLMN
* code that is already in the list of forbidden PLMNs */ * code that is already in the list of forbidden PLMNs */
for (int j = 0; j < _emm_data.fplmn.n_plmns; j++) { for (j = 0; j < _emm_data.fplmn.n_plmns; j++) {
if (PLMNS_ARE_EQUAL(eplmn[i], _emm_data.fplmn.plmn[j])) { if (PLMNS_ARE_EQUAL(eplmn[i], _emm_data.fplmn.plmn[j])) {
is_forbidden = TRUE; is_forbidden = TRUE;
break; break;
......
...@@ -384,8 +384,10 @@ const char *IdleMode_get_plmn_id(const plmn_t *plmn, int index, size_t *len) ...@@ -384,8 +384,10 @@ const char *IdleMode_get_plmn_id(const plmn_t *plmn, int index, size_t *len)
***************************************************************************/ ***************************************************************************/
int IdleMode_get_plmn_fullname_index(const char *plmn) int IdleMode_get_plmn_fullname_index(const char *plmn)
{ {
int index;
/* Get the index of the PLMN identifier with specified full name */ /* Get the index of the PLMN identifier with specified full name */
for (int index = 0; index < _emm_plmn_list.n_plmns; index++) { for (index = 0; index < _emm_plmn_list.n_plmns; index++) {
if ( strncmp(plmn, _emm_plmn_list.param[index].fullname, if ( strncmp(plmn, _emm_plmn_list.param[index].fullname,
NET_FORMAT_LONG_SIZE) != 0 ) { NET_FORMAT_LONG_SIZE) != 0 ) {
continue; continue;
...@@ -413,8 +415,10 @@ int IdleMode_get_plmn_fullname_index(const char *plmn) ...@@ -413,8 +415,10 @@ int IdleMode_get_plmn_fullname_index(const char *plmn)
***************************************************************************/ ***************************************************************************/
int IdleMode_get_plmn_shortname_index(const char *plmn) int IdleMode_get_plmn_shortname_index(const char *plmn)
{ {
int index;
/* Get the index of the PLMN identifier with specified short name */ /* Get the index of the PLMN identifier with specified short name */
for (int index = 0; index < _emm_plmn_list.n_plmns; index++) { for (index = 0; index < _emm_plmn_list.n_plmns; index++) {
if ( !strncmp(plmn, _emm_plmn_list.param[index].shortname, if ( !strncmp(plmn, _emm_plmn_list.param[index].shortname,
NET_FORMAT_SHORT_SIZE) ) { NET_FORMAT_SHORT_SIZE) ) {
continue; continue;
...@@ -442,8 +446,10 @@ int IdleMode_get_plmn_shortname_index(const char *plmn) ...@@ -442,8 +446,10 @@ int IdleMode_get_plmn_shortname_index(const char *plmn)
***************************************************************************/ ***************************************************************************/
int IdleMode_get_plmn_id_index(const char *plmn) int IdleMode_get_plmn_id_index(const char *plmn)
{ {
int index;
/* Get the index of the PLMN identifier with specified numeric identifier */ /* Get the index of the PLMN identifier with specified numeric identifier */
for (int index = 0; index < _emm_plmn_list.n_plmns; index++) { for (index = 0; index < _emm_plmn_list.n_plmns; index++) {
if ( !strncmp(plmn, _emm_plmn_list.param[index].num, if ( !strncmp(plmn, _emm_plmn_list.param[index].num,
NET_FORMAT_LONG_SIZE) ) { NET_FORMAT_LONG_SIZE) ) {
continue; continue;
...@@ -480,6 +486,7 @@ int emm_proc_initialize(void) ...@@ -480,6 +486,7 @@ int emm_proc_initialize(void)
emm_sap_t emm_sap; emm_sap_t emm_sap;
int rc; int rc;
int i;
if (!_emm_data.usim_is_valid) { if (!_emm_data.usim_is_valid) {
/* The USIM application is not present or not valid */ /* The USIM application is not present or not valid */
...@@ -489,7 +496,7 @@ int emm_proc_initialize(void) ...@@ -489,7 +496,7 @@ int emm_proc_initialize(void)
/* The highest priority is given to either the "equivalent PLMNs" /* The highest priority is given to either the "equivalent PLMNs"
* if available, or the last registered PLMN */ * if available, or the last registered PLMN */
if (_emm_data.nvdata.eplmn.n_plmns > 0) { if (_emm_data.nvdata.eplmn.n_plmns > 0) {
for (int i=0; i < _emm_data.nvdata.eplmn.n_plmns; i++) { for (i=0; i < _emm_data.nvdata.eplmn.n_plmns; i++) {
_emm_plmn_list.plmn[_emm_plmn_list.n_plmns++] = _emm_plmn_list.plmn[_emm_plmn_list.n_plmns++] =
&_emm_data.nvdata.eplmn.plmn[i]; &_emm_data.nvdata.eplmn.plmn[i];
} }
...@@ -515,14 +522,14 @@ int emm_proc_initialize(void) ...@@ -515,14 +522,14 @@ int emm_proc_initialize(void)
/* Each PLMN/access technology combination in the "User /* Each PLMN/access technology combination in the "User
* Controlled PLMN Selector with Access Technology" */ * Controlled PLMN Selector with Access Technology" */
for (int i=0; i < _emm_data.plmn.n_plmns; i++) { for (i=0; i < _emm_data.plmn.n_plmns; i++) {
_emm_plmn_list.plmn[_emm_plmn_list.n_plmns++] = _emm_plmn_list.plmn[_emm_plmn_list.n_plmns++] =
&_emm_data.plmn.plmn[i]; &_emm_data.plmn.plmn[i];
} }
/* Each PLMN/access technology combination in the "Operator /* Each PLMN/access technology combination in the "Operator
* Controlled PLMN Selector with Access Technology" */ * Controlled PLMN Selector with Access Technology" */
for (int i=0; i < _emm_data.oplmn.n_plmns; i++) { for (i=0; i < _emm_data.oplmn.n_plmns; i++) {
_emm_plmn_list.plmn[_emm_plmn_list.n_plmns++] = _emm_plmn_list.plmn[_emm_plmn_list.n_plmns++] =
&_emm_data.oplmn.plmn[i]; &_emm_data.oplmn.plmn[i];
} }
...@@ -536,7 +543,7 @@ int emm_proc_initialize(void) ...@@ -536,7 +543,7 @@ int emm_proc_initialize(void)
/* TODO: Schedule periodic network selection attemps (hpplmn timer) */ /* TODO: Schedule periodic network selection attemps (hpplmn timer) */
/* Initialize the PLMNs' parameters */ /* Initialize the PLMNs' parameters */
for (int i=0; i < _emm_plmn_list.n_plmns; i++) { for (i=0; i < _emm_plmn_list.n_plmns; i++) {
struct plmn_param_t *plmn = &(_emm_plmn_list.param[i]); struct plmn_param_t *plmn = &(_emm_plmn_list.param[i]);
int id = _IldlMode_get_opnn_id(_emm_plmn_list.plmn[i]); int id = _IldlMode_get_opnn_id(_emm_plmn_list.plmn[i]);
if (id < 0) { if (id < 0) {
...@@ -1077,7 +1084,9 @@ static int _IdleMode_plmn_str(char *plmn_str, const plmn_t *plmn) ...@@ -1077,7 +1084,9 @@ static int _IdleMode_plmn_str(char *plmn_str, const plmn_t *plmn)
***************************************************************************/ ***************************************************************************/
static int _IldlMode_get_opnn_id(const plmn_t *plmn) static int _IldlMode_get_opnn_id(const plmn_t *plmn)
{ {
for (int i = 0; i < _emm_data.n_opnns; i++) { int i;
for (i = 0; i < _emm_data.n_opnns; i++) {
if (plmn->MCCdigit1 != _emm_data.opnn[i].plmn->MCCdigit1) { if (plmn->MCCdigit1 != _emm_data.opnn[i].plmn->MCCdigit1) {
continue; continue;
} }
......
...@@ -967,10 +967,12 @@ static int _emm_main_get_imei(imei_t *imei, const char *imei_str) ...@@ -967,10 +967,12 @@ static int _emm_main_get_imei(imei_t *imei, const char *imei_str)
***************************************************************************/ ***************************************************************************/
static int _emm_main_imsi_cmp(imsi_t *imsi1, imsi_t *imsi2) static int _emm_main_imsi_cmp(imsi_t *imsi1, imsi_t *imsi2)
{ {
int i;
if (imsi1->length != imsi2->length) { if (imsi1->length != imsi2->length) {
return FALSE; return FALSE;
} }
for (int i = 0; i < imsi1->length; i++) { for (i = 0; i < imsi1->length; i++) {
if (imsi1->u.value[i] != imsi2->u.value[i]) { if (imsi1->u.value[i] != imsi2->u.value[i]) {
return FALSE; return FALSE;
} }
......
...@@ -112,6 +112,7 @@ int emm_recv_attach_accept(attach_accept_msg *msg, int *emm_cause) ...@@ -112,6 +112,7 @@ int emm_recv_attach_accept(attach_accept_msg *msg, int *emm_cause)
LOG_FUNC_IN; LOG_FUNC_IN;
int rc; int rc;
int i;
LOG_TRACE(INFO, "EMMAS-SAP - Received Attach Accept message"); LOG_TRACE(INFO, "EMMAS-SAP - Received Attach Accept message");
...@@ -152,7 +153,7 @@ int emm_recv_attach_accept(attach_accept_msg *msg, int *emm_cause) ...@@ -152,7 +153,7 @@ int emm_recv_attach_accept(attach_accept_msg *msg, int *emm_cause)
/* Get the tracking area list the UE is registered to */ /* Get the tracking area list the UE is registered to */
int n_tais = msg->tailist.numberofelements; int n_tais = msg->tailist.numberofelements;
tai_t tai[n_tais]; tai_t tai[n_tais];
for (int i = 0; i < n_tais; i++) { for (i = 0; i < n_tais; i++) {
tai[i].plmn.MCCdigit1 = msg->tailist.mccdigit1; tai[i].plmn.MCCdigit1 = msg->tailist.mccdigit1;
tai[i].plmn.MCCdigit2 = msg->tailist.mccdigit2; tai[i].plmn.MCCdigit2 = msg->tailist.mccdigit2;
tai[i].plmn.MCCdigit3 = msg->tailist.mccdigit3; tai[i].plmn.MCCdigit3 = msg->tailist.mccdigit3;
......
...@@ -327,6 +327,7 @@ int esm_proc_eps_bearer_context_deactivate(int is_local, int ebi, ...@@ -327,6 +327,7 @@ int esm_proc_eps_bearer_context_deactivate(int is_local, int ebi,
LOG_FUNC_IN; LOG_FUNC_IN;
int rc = RETURNerror; int rc = RETURNerror;
int i;
if (is_local) { if (is_local) {
if (ebi != ESM_SAP_ALL_EBI) { if (ebi != ESM_SAP_ALL_EBI) {
...@@ -362,7 +363,7 @@ int esm_proc_eps_bearer_context_deactivate(int is_local, int ebi, ...@@ -362,7 +363,7 @@ int esm_proc_eps_bearer_context_deactivate(int is_local, int ebi,
*pid); *pid);
} else { } else {
esm_pdn_t *pdn = _esm_data.pdn[*pid].data; esm_pdn_t *pdn = _esm_data.pdn[*pid].data;
for (int i = 0; i < pdn->n_bearers; i++) { for (i = 0; i < pdn->n_bearers; i++) {
if (pdn->bearer[i]->ebi != ebi) { if (pdn->bearer[i]->ebi != ebi) {
continue; continue;
} }
......
...@@ -630,8 +630,9 @@ static void *_pdn_disconnect_t3492_handler(void *args) ...@@ -630,8 +630,9 @@ static void *_pdn_disconnect_t3492_handler(void *args)
static int _pdn_disconnect_get_default_ebi(int pti) static int _pdn_disconnect_get_default_ebi(int pti)
{ {
int ebi = -1; int ebi = -1;
int i;
for (int i = 0; i < ESM_DATA_PDN_MAX; i++) { for (i = 0; i < ESM_DATA_PDN_MAX; i++) {
if ( (_esm_data.pdn[i].pid != -1) && _esm_data.pdn[i].data ) { if ( (_esm_data.pdn[i].pid != -1) && _esm_data.pdn[i].data ) {
if (_esm_data.pdn[i].data->pti != pti) { if (_esm_data.pdn[i].data->pti != pti) {
continue; continue;
......
...@@ -482,6 +482,7 @@ int esm_ebr_context_check_tft(int pid, int ebi, ...@@ -482,6 +482,7 @@ int esm_ebr_context_check_tft(int pid, int ebi,
LOG_FUNC_IN; LOG_FUNC_IN;
int rc = RETURNerror; int rc = RETURNerror;
int i;
if (pid < ESM_DATA_PDN_MAX) { if (pid < ESM_DATA_PDN_MAX) {
if (pid != _esm_data.pdn[pid].pid) { if (pid != _esm_data.pdn[pid].pid) {
...@@ -493,7 +494,7 @@ int esm_ebr_context_check_tft(int pid, int ebi, ...@@ -493,7 +494,7 @@ int esm_ebr_context_check_tft(int pid, int ebi,
} else if (operation == ESM_EBR_CONTEXT_TFT_CREATE) { } else if (operation == ESM_EBR_CONTEXT_TFT_CREATE) {
esm_pdn_t *pdn = _esm_data.pdn[pid].data; esm_pdn_t *pdn = _esm_data.pdn[pid].data;
/* For each EPS bearer context associated to the PDN connection */ /* For each EPS bearer context associated to the PDN connection */
for (int i = 0; i < pdn->n_bearers; i++) { for (i = 0; i < pdn->n_bearers; i++) {
if (pdn->bearer[i]) { if (pdn->bearer[i]) {
if (pdn->bearer[i]->ebi == ebi) { if (pdn->bearer[i]->ebi == ebi) {
/* Check the packet filter identifiers */ /* Check the packet filter identifiers */
...@@ -545,11 +546,14 @@ int esm_ebr_context_check_tft(int pid, int ebi, ...@@ -545,11 +546,14 @@ int esm_ebr_context_check_tft(int pid, int ebi,
static int _esm_ebr_context_check_identifiers(const network_tft_t *tft1, static int _esm_ebr_context_check_identifiers(const network_tft_t *tft1,
const network_tft_t *tft2) const network_tft_t *tft2)
{ {
int i;
int j;
if ( (tft1 == NULL) || (tft2 == NULL) ) { if ( (tft1 == NULL) || (tft2 == NULL) ) {
return (RETURNok); return (RETURNok);
} }
for (int i = 0; i < tft1->n_pkfs; i++) { for (i = 0; i < tft1->n_pkfs; i++) {
for (int j = 0; j < tft2->n_pkfs; j++) { for (j = 0; j < tft2->n_pkfs; j++) {
/* Packet filters should have been allocated */ /* Packet filters should have been allocated */
if (tft1->pkf[i]->id == tft2->pkf[i]->id) { if (tft1->pkf[i]->id == tft2->pkf[i]->id) {
/* 3GPP TS 24.301, section 6.4.2.5, abnormal cases d.1 /* 3GPP TS 24.301, section 6.4.2.5, abnormal cases d.1
...@@ -582,11 +586,14 @@ static int _esm_ebr_context_check_identifiers(const network_tft_t *tft1, ...@@ -582,11 +586,14 @@ static int _esm_ebr_context_check_identifiers(const network_tft_t *tft1,
static int _esm_ebr_context_check_precedence(const network_tft_t *tft1, static int _esm_ebr_context_check_precedence(const network_tft_t *tft1,
const network_tft_t *tft2) const network_tft_t *tft2)
{ {
int i;
int j;
if ( (tft1 == NULL) || (tft2 == NULL) ) { if ( (tft1 == NULL) || (tft2 == NULL) ) {
return (RETURNok); return (RETURNok);
} }
for (int i = 0; i < tft1->n_pkfs; i++) { for (i = 0; i < tft1->n_pkfs; i++) {
for (int j = 0; j < tft2->n_pkfs; j++) { for (j = 0; j < tft2->n_pkfs; j++) {
/* Packet filters should have been allocated */ /* Packet filters should have been allocated */
if (tft1->pkf[i]->precedence == tft2->pkf[i]->precedence) { if (tft1->pkf[i]->precedence == tft2->pkf[i]->precedence) {
/* 3GPP TS 24.301, section 6.4.2.5, abnormal cases d.2 /* 3GPP TS 24.301, section 6.4.2.5, abnormal cases d.2
......
...@@ -58,11 +58,13 @@ void esm_main_initialize(esm_indication_callback_t cb) ...@@ -58,11 +58,13 @@ void esm_main_initialize(esm_indication_callback_t cb)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
int i;
/* 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 */
_esm_data.n_pdns = 0; _esm_data.n_pdns = 0;
for (int i = 0; i < ESM_DATA_PDN_MAX + 1; i++) { for (i = 0; i < ESM_DATA_PDN_MAX + 1; i++) {
_esm_data.pdn[i].pid = -1; _esm_data.pdn[i].pid = -1;
_esm_data.pdn[i].is_active = FALSE; _esm_data.pdn[i].is_active = FALSE;
_esm_data.pdn[i].data = NULL; _esm_data.pdn[i].data = NULL;
...@@ -135,21 +137,25 @@ void esm_main_cleanup(void) ...@@ -135,21 +137,25 @@ void esm_main_cleanup(void)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
#ifdef NAS_UE int i;
int pid;
int bid;
#ifdef NAS_UE
/* De-activate EPS bearers and clean up PDN connections */ /* De-activate EPS bearers and clean up PDN connections */
for (int pid = 0; pid < ESM_DATA_PDN_MAX; pid++) { for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) {
if (_esm_data.pdn[pid].data) { if (_esm_data.pdn[pid].data) {
esm_pdn_t *pdn = _esm_data.pdn[pid].data; esm_pdn_t *pdn = _esm_data.pdn[pid].data;
if (pdn->apn.length > 0) { if (pdn->apn.length > 0) {
free(pdn->apn.value); free(pdn->apn.value);
} }
/* Release EPS bearer contexts */ /* Release EPS bearer contexts */
for (int bid = 0; bid < pdn->n_bearers; bid++) { for (bid = 0; bid < pdn->n_bearers; bid++) {
if (pdn->bearer[bid]) { if (pdn->bearer[bid]) {
LOG_TRACE(WARNING, "ESM-MAIN - Release EPS bearer " LOG_TRACE(WARNING, "ESM-MAIN - Release EPS bearer "
"context (ebi=%d)", pdn->bearer[bid]->ebi); "context (ebi=%d)", pdn->bearer[bid]->ebi);
/* Delete the TFT */ /* Delete the TFT */
for (int i = 0; i < pdn->bearer[bid]->tft.n_pkfs; i++) { for (i = 0; i < pdn->bearer[bid]->tft.n_pkfs; i++) {
if (pdn->bearer[bid]->tft.pkf[i]) { if (pdn->bearer[bid]->tft.pkf[i]) {
free(pdn->bearer[bid]->tft.pkf[i]); free(pdn->bearer[bid]->tft.pkf[i]);
} }
......
...@@ -103,8 +103,10 @@ void esm_pt_initialize(void) ...@@ -103,8 +103,10 @@ void esm_pt_initialize(void)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
int i;
_esm_pt_data.index = 0; _esm_pt_data.index = 0;
for (int i = 0; i < ESM_PT_DATA_SIZE + 1; i++) { for (i = 0; i < ESM_PT_DATA_SIZE + 1; i++) {
_esm_pt_data.context[i] = NULL; _esm_pt_data.context[i] = NULL;
} }
......
...@@ -399,6 +399,8 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi, ...@@ -399,6 +399,8 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi,
LOG_FUNC_IN; LOG_FUNC_IN;
int esm_cause = ESM_CAUSE_SUCCESS; int esm_cause = ESM_CAUSE_SUCCESS;
int i;
int j;
LOG_TRACE(INFO, "ESM-SAP - Received Activate Dedicated EPS Bearer " LOG_TRACE(INFO, "ESM-SAP - Received Activate Dedicated EPS Bearer "
"Context Request message (pti=%d, ebi=%d)", pti, ebi); "Context Request message (pti=%d, ebi=%d)", pti, ebi);
...@@ -481,7 +483,7 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi, ...@@ -481,7 +483,7 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi,
esm_proc_tft_t tft = {0, {NULL}}; esm_proc_tft_t tft = {0, {NULL}};
/* Get the list of packet filters */ /* Get the list of packet filters */
const PacketFilters *pkfs = &(msg->tft.packetfilterlist.createtft); const PacketFilters *pkfs = &(msg->tft.packetfilterlist.createtft);
for (int i = 0; i < msg->tft.numberofpacketfilters; i++) { for (i = 0; i < msg->tft.numberofpacketfilters; i++) {
/* Create new temporary packet filter */ /* Create new temporary packet filter */
tft.pkf[i] = (network_pkf_t *)malloc(sizeof(network_pkf_t)); tft.pkf[i] = (network_pkf_t *)malloc(sizeof(network_pkf_t));
if (tft.pkf[i] != NULL) { if (tft.pkf[i] != NULL) {
...@@ -500,7 +502,7 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi, ...@@ -500,7 +502,7 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi,
const PacketFilter *pkf = &(pkfs[i]->packetfilter); const PacketFilter *pkf = &(pkfs[i]->packetfilter);
if (pkf->flags & TRAFFIC_FLOW_TEMPLATE_IPV4_REMOTE_ADDR_FLAG) { if (pkf->flags & TRAFFIC_FLOW_TEMPLATE_IPV4_REMOTE_ADDR_FLAG) {
/* IPv4 remote address component */ /* IPv4 remote address component */
for (int j = 0; for (j = 0;
(j < TRAFFIC_FLOW_TEMPLATE_IPV4_ADDR_SIZE) (j < TRAFFIC_FLOW_TEMPLATE_IPV4_ADDR_SIZE)
&& (j < NET_PACKET_FILTER_IPV4_ADDR_SIZE); j++) { && (j < NET_PACKET_FILTER_IPV4_ADDR_SIZE); j++) {
tft.pkf[i]->data.ipv4.addr[j] = pkf->ipv4remoteaddr[j].addr; tft.pkf[i]->data.ipv4.addr[j] = pkf->ipv4remoteaddr[j].addr;
...@@ -508,7 +510,7 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi, ...@@ -508,7 +510,7 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi,
} }
} else if (pkf->flags & TRAFFIC_FLOW_TEMPLATE_IPV6_REMOTE_ADDR_FLAG) { } else if (pkf->flags & TRAFFIC_FLOW_TEMPLATE_IPV6_REMOTE_ADDR_FLAG) {
/* IPv6 remote address component */ /* IPv6 remote address component */
for (int j = 0; for (j = 0;
(j < TRAFFIC_FLOW_TEMPLATE_IPV6_ADDR_SIZE) (j < TRAFFIC_FLOW_TEMPLATE_IPV6_ADDR_SIZE)
&& (j < NET_PACKET_FILTER_IPV6_ADDR_SIZE); j++) { && (j < NET_PACKET_FILTER_IPV6_ADDR_SIZE); j++) {
tft.pkf[i]->data.ipv6.addr[j] = pkf->ipv6remoteaddr[j].addr; tft.pkf[i]->data.ipv6.addr[j] = pkf->ipv6remoteaddr[j].addr;
...@@ -560,7 +562,7 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi, ...@@ -560,7 +562,7 @@ int esm_recv_activate_dedicated_eps_bearer_context_request(int pti, int ebi,
esm_cause = ESM_CAUSE_SUCCESS; esm_cause = ESM_CAUSE_SUCCESS;
} }
/* Release temporary traffic flow template data */ /* Release temporary traffic flow template data */
for (int i = 0; i < tft.n_pkfs; i++) { for (i = 0; i < tft.n_pkfs; i++) {
free(tft.pkf[i]); free(tft.pkf[i]);
} }
/* Return the ESM cause value */ /* Return the ESM cause value */
......
...@@ -711,13 +711,14 @@ int nas_proc_get_pdn_status(int *cids, int *states, int n_pdn_max) ...@@ -711,13 +711,14 @@ int nas_proc_get_pdn_status(int *cids, int *states, int n_pdn_max)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
int cid;
int n_defined_pdn = 0; int n_defined_pdn = 0;
/* Get the maximum number of supported PDN contexts */ /* Get the maximum number of supported PDN contexts */
int n_pdn = esm_main_get_nb_pdns_max(); int n_pdn = esm_main_get_nb_pdns_max();
/* For all PDN contexts */ /* For all PDN contexts */
for (int cid = 1; (cid < n_pdn+1) && (n_defined_pdn < n_pdn_max); cid++) { for (cid = 1; (cid < n_pdn+1) && (n_defined_pdn < n_pdn_max); cid++) {
/* Get the status of this PDN */ /* Get the status of this PDN */
int state = FALSE; int state = FALSE;
int is_defined = esm_main_get_pdn_status(cid, &state); int is_defined = esm_main_get_pdn_status(cid, &state);
...@@ -754,13 +755,14 @@ int nas_proc_get_pdn_param(int *cids, int *types, const char **apns, ...@@ -754,13 +755,14 @@ int nas_proc_get_pdn_param(int *cids, int *types, const char **apns,
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
int cid;
int n_defined_pdn = 0; int n_defined_pdn = 0;
/* Get the maximum number of supported PDN contexts */ /* Get the maximum number of supported PDN contexts */
int n_pdn = esm_main_get_nb_pdns_max(); int n_pdn = esm_main_get_nb_pdns_max();
/* For all PDN contexts */ /* For all PDN contexts */
for (int cid = 1; (cid < n_pdn+1) && (n_defined_pdn < n_pdn_max); cid++) { for (cid = 1; (cid < n_pdn+1) && (n_defined_pdn < n_pdn_max); cid++) {
int emergency, active; int emergency, active;
/* Get PDN connection parameters */ /* Get PDN connection parameters */
int rc = esm_main_get_pdn(cid, types, apns, &emergency, &active); int rc = esm_main_get_pdn(cid, types, apns, &emergency, &active);
......
...@@ -26,14 +26,12 @@ Description Timer utilities ...@@ -26,14 +26,12 @@ Description Timer utilities
#include <stdlib.h> // malloc, free #include <stdlib.h> // malloc, free
#include <sys/time.h> // setitimer #include <sys/time.h> // setitimer
#if !defined(EPC_BUILD) #if defined(ENABLE_ITTI)
# include <signal.h>
# include <time.h> // clock_gettime
#endif
#if defined(NAS_MME) && defined(EPC_BUILD)
# include "intertask_interface.h" # include "intertask_interface.h"
# include "timer.h" # include "timer.h"
#else
# include <signal.h>
# include <time.h> // clock_gettime
#endif #endif
#include "nas_timer.h" #include "nas_timer.h"
#include "commonDef.h" #include "commonDef.h"
......
PROJDIR = $(UE_NAS_DIR)/EURECOM-NAS
include $(UE_NAS_DIR)/EURECOM-NAS/Makefile.inc
libnas_INCLUDES = \
-I$(INCDIR) \
-I$(UTILDIR) \
-I$(USERAPIDIR) \
-I$(NETAPIDIR) \
-I$(EMMDIR) \
-I$(EMMMSGDIR) \
-I$(EMMSAPDIR) \
-I$(ESMDIR) \
-I$(ESMMSGDIR) \
-I$(ESMSAPDIR) \
-I$(MMEAPIDIR) \
-I$(USIMAPIDIR) \
-I$(IESDIR)
OUTDIR = $(UE_NAS_DIR)/ue_objs
libnas_api_OBJS = \
EURECOM-NAS/src/api/mme/mme_api.o \
EURECOM-NAS/src/api/network/nas_message.o
libnas_emm_OBJS = \
EURECOM-NAS/src/emm/Attach.o \
EURECOM-NAS/src/emm/Authentication.o \
EURECOM-NAS/src/emm/Detach.o \
EURECOM-NAS/src/emm/EmmCommon.o \
EURECOM-NAS/src/emm/emm_data_ctx.o \
EURECOM-NAS/src/emm/emm_main.o \
EURECOM-NAS/src/emm/EmmStatusHdl.o \
EURECOM-NAS/src/emm/Identification.o \
EURECOM-NAS/src/emm/IdleMode.o \
EURECOM-NAS/src/emm/LowerLayer.o \
EURECOM-NAS/src/emm/SecurityModeControl.o \
EURECOM-NAS/src/emm/ServiceRequestHdl.o \
EURECOM-NAS/src/emm/TrackingAreaUpdate.o
libnas_emm_msg_OBJS = \
EURECOM-NAS/src/emm/msg/AttachAccept.o \
EURECOM-NAS/src/emm/msg/AuthenticationFailure.o \
EURECOM-NAS/src/emm/msg/CsServiceNotification.o \
EURECOM-NAS/src/emm/msg/ExtendedServiceRequest.o \
EURECOM-NAS/src/emm/msg/IdentityResponse.o \
EURECOM-NAS/src/emm/msg/EmmInformation.o \
EURECOM-NAS/src/emm/msg/ServiceReject.o \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateReject.o \
EURECOM-NAS/src/emm/msg/AttachComplete.o \
EURECOM-NAS/src/emm/msg/AuthenticationReject.o \
EURECOM-NAS/src/emm/msg/DetachAccept.o \
EURECOM-NAS/src/emm/msg/GutiReallocationCommand.o \
EURECOM-NAS/src/emm/msg/emm_msg.o \
EURECOM-NAS/src/emm/msg/SecurityModeCommand.o \
EURECOM-NAS/src/emm/msg/ServiceRequest.o \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateRequest.o \
EURECOM-NAS/src/emm/msg/AttachReject.o \
EURECOM-NAS/src/emm/msg/AuthenticationRequest.o \
EURECOM-NAS/src/emm/msg/DetachRequest.o \
EURECOM-NAS/src/emm/msg/GutiReallocationComplete.o \
EURECOM-NAS/src/emm/msg/SecurityModeComplete.o \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateAccept.o \
EURECOM-NAS/src/emm/msg/UplinkNasTransport.o \
EURECOM-NAS/src/emm/msg/AttachRequest.o \
EURECOM-NAS/src/emm/msg/AuthenticationResponse.o \
EURECOM-NAS/src/emm/msg/DownlinkNasTransport.o \
EURECOM-NAS/src/emm/msg/EmmStatus.o \
EURECOM-NAS/src/emm/msg/IdentityRequest.o \
EURECOM-NAS/src/emm/msg/SecurityModeReject.o \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateComplete.o
libnas_emm_sap_OBJS = \
EURECOM-NAS/src/emm/sap/emm_as.o \
EURECOM-NAS/src/emm/sap/emm_cn.o \
EURECOM-NAS/src/emm/sap/EmmDeregisteredNoImsi.o \
EURECOM-NAS/src/emm/sap/emm_reg.o \
EURECOM-NAS/src/emm/sap/EmmRegisteredUpdateNeeded.o \
EURECOM-NAS/src/emm/sap/EmmDeregisteredNormalService.o \
EURECOM-NAS/src/emm/sap/emm_sap.o \
EURECOM-NAS/src/emm/sap/EmmDeregisteredPlmnSearch.o \
EURECOM-NAS/src/emm/sap/emm_esm.o \
EURECOM-NAS/src/emm/sap/EmmRegisteredAttemptingToUpdate.o \
EURECOM-NAS/src/emm/sap/emm_send.o \
EURECOM-NAS/src/emm/sap/EmmCommonProcedureInitiated.o \
EURECOM-NAS/src/emm/sap/EmmRegistered.o \
EURECOM-NAS/src/emm/sap/EmmDeregisteredAttachNeeded.o \
EURECOM-NAS/src/emm/sap/EmmRegisteredImsiDetachInitiated.o \
EURECOM-NAS/src/emm/sap/EmmServiceRequestInitiated.o \
EURECOM-NAS/src/emm/sap/EmmDeregisteredAttemptingToAttach.o \
EURECOM-NAS/src/emm/sap/emm_fsm.o \
EURECOM-NAS/src/emm/sap/EmmRegisteredInitiated.o \
EURECOM-NAS/src/emm/sap/EmmTrackingAreaUpdatingInitiated.o \
EURECOM-NAS/src/emm/sap/EmmDeregistered.o \
EURECOM-NAS/src/emm/sap/EmmRegisteredLimitedService.o \
EURECOM-NAS/src/emm/sap/EmmDeregisteredInitiated.o \
EURECOM-NAS/src/emm/sap/EmmNull.o \
EURECOM-NAS/src/emm/sap/EmmRegisteredNoCellAvailable.o \
EURECOM-NAS/src/emm/sap/EmmDeregisteredLimitedService.o \
EURECOM-NAS/src/emm/sap/emm_recv.o \
EURECOM-NAS/src/emm/sap/EmmRegisteredNormalService.o \
EURECOM-NAS/src/emm/sap/EmmDeregisteredNoCellAvailable.o \
EURECOM-NAS/src/emm/sap/EmmRegisteredPlmnSearch.o
libnas_esm_OBJS = \
EURECOM-NAS/src/esm/esm_ebr_context.o \
EURECOM-NAS/src/esm/PdnConnectivity.o \
EURECOM-NAS/src/esm/esm_ebr.o \
EURECOM-NAS/src/esm/EpsBearerContextDeactivation.o \
EURECOM-NAS/src/esm/DefaultEpsBearerContextActivation.o \
EURECOM-NAS/src/esm/DedicatedEpsBearerContextActivation.o \
EURECOM-NAS/src/esm/PdnDisconnect.o \
EURECOM-NAS/src/esm/EsmStatusHdl.o \
EURECOM-NAS/src/esm/esm_main.o \
EURECOM-NAS/src/esm/esm_pt.o \
EURECOM-NAS/src/esm/esm_ip.o
libnas_esm_msg_OBJS = \
EURECOM-NAS/src/esm/msg/ModifyEpsBearerContextRequest.o \
EURECOM-NAS/src/esm/msg/DeactivateEpsBearerContextRequest.o \
EURECOM-NAS/src/esm/msg/BearerResourceAllocationReject.o \
EURECOM-NAS/src/esm/msg/BearerResourceModificationRequest.o \
EURECOM-NAS/src/esm/msg/ActivateDedicatedEpsBearerContextRequest.o \
EURECOM-NAS/src/esm/msg/EsmInformationResponse.o \
EURECOM-NAS/src/esm/msg/PdnDisconnectReject.o \
EURECOM-NAS/src/esm/msg/ActivateDedicatedEpsBearerContextAccept.o \
EURECOM-NAS/src/esm/msg/PdnDisconnectRequest.o \
EURECOM-NAS/src/esm/msg/BearerResourceModificationReject.o \
EURECOM-NAS/src/esm/msg/ActivateDefaultEpsBearerContextAccept.o \
EURECOM-NAS/src/esm/msg/ActivateDedicatedEpsBearerContextReject.o \
EURECOM-NAS/src/esm/msg/ModifyEpsBearerContextAccept.o \
EURECOM-NAS/src/esm/msg/DeactivateEpsBearerContextAccept.o \
EURECOM-NAS/src/esm/msg/esm_msg.o \
EURECOM-NAS/src/esm/msg/EsmInformationRequest.o \
EURECOM-NAS/src/esm/msg/ActivateDefaultEpsBearerContextRequest.o \
EURECOM-NAS/src/esm/msg/ModifyEpsBearerContextReject.o \
EURECOM-NAS/src/esm/msg/EsmStatus.o \
EURECOM-NAS/src/esm/msg/PdnConnectivityReject.o \
EURECOM-NAS/src/esm/msg/ActivateDefaultEpsBearerContextReject.o \
EURECOM-NAS/src/esm/msg/PdnConnectivityRequest.o \
EURECOM-NAS/src/esm/msg/BearerResourceAllocationRequest.o
libnas_esm_sap_OBJS = \
EURECOM-NAS/src/esm/sap/esm_recv.o \
EURECOM-NAS/src/esm/sap/esm_send.o \
EURECOM-NAS/src/esm/sap/esm_sap.o
libnas_ies_OBJS = \
EURECOM-NAS/src/ies/UeSecurityCapability.o \
EURECOM-NAS/src/ies/SecurityHeaderType.o \
EURECOM-NAS/src/ies/RadioPriority.o \
EURECOM-NAS/src/ies/EpsAttachResult.o \
EURECOM-NAS/src/ies/ImeisvRequest.o \
EURECOM-NAS/src/ies/EmergencyNumberList.o \
EURECOM-NAS/src/ies/SupportedCodecList.o \
EURECOM-NAS/src/ies/EsmCause.o \
EURECOM-NAS/src/ies/NetworkName.o \
EURECOM-NAS/src/ies/AuthenticationResponseParameter.o \
EURECOM-NAS/src/ies/Cli.o \
EURECOM-NAS/src/ies/AccessPointName.o \
EURECOM-NAS/src/ies/DaylightSavingTime.o \
EURECOM-NAS/src/ies/LcsIndicator.o \
EURECOM-NAS/src/ies/PagingIdentity.o \
EURECOM-NAS/src/ies/EpsMobileIdentity.o \
EURECOM-NAS/src/ies/GutiType.o \
EURECOM-NAS/src/ies/NasKeySetIdentifier.o \
EURECOM-NAS/src/ies/CsfbResponse.o \
EURECOM-NAS/src/ies/PacketFlowIdentifier.o \
EURECOM-NAS/src/ies/ApnAggregateMaximumBitRate.o \
EURECOM-NAS/src/ies/EpsBearerContextStatus.o \
EURECOM-NAS/src/ies/MobileIdentity.o \
EURECOM-NAS/src/ies/AuthenticationFailureParameter.o \
EURECOM-NAS/src/ies/EpsUpdateResult.o \
EURECOM-NAS/src/ies/TimeZone.o \
EURECOM-NAS/src/ies/MessageType.o \
EURECOM-NAS/src/ies/EmmCause.o \
EURECOM-NAS/src/ies/MobileStationClassmark2.o \
EURECOM-NAS/src/ies/AuthenticationParameterRand.o \
EURECOM-NAS/src/ies/PdnAddress.o \
EURECOM-NAS/src/ies/MobileStationClassmark3.o \
EURECOM-NAS/src/ies/ServiceType.o \
EURECOM-NAS/src/ies/RequestType.o \
EURECOM-NAS/src/ies/PlmnList.o \
EURECOM-NAS/src/ies/EpsQualityOfService.o \
EURECOM-NAS/src/ies/NasMessageContainer.o \
EURECOM-NAS/src/ies/EsmInformationTransferFlag.o \
EURECOM-NAS/src/ies/TrafficFlowTemplate.o \
EURECOM-NAS/src/ies/LinkedEpsBearerIdentity.o \
EURECOM-NAS/src/ies/NasSecurityAlgorithms.o \
EURECOM-NAS/src/ies/LlcServiceAccessPointIdentifier.o \
EURECOM-NAS/src/ies/ShortMac.o \
EURECOM-NAS/src/ies/TrafficFlowAggregateDescription.o \
EURECOM-NAS/src/ies/PTmsiSignature.o \
EURECOM-NAS/src/ies/ProtocolDiscriminator.o \
EURECOM-NAS/src/ies/EpsBearerIdentity.o \
EURECOM-NAS/src/ies/TimeZoneAndTime.o \
EURECOM-NAS/src/ies/TrackingAreaIdentityList.o \
EURECOM-NAS/src/ies/QualityOfService.o \
EURECOM-NAS/src/ies/EpsUpdateType.o \
EURECOM-NAS/src/ies/PdnType.o \
EURECOM-NAS/src/ies/UeRadioCapabilityInformationUpdateNeeded.o \
EURECOM-NAS/src/ies/AuthenticationParameterAutn.o \
EURECOM-NAS/src/ies/EpsAttachType.o \
EURECOM-NAS/src/ies/IdentityType2.o \
EURECOM-NAS/src/ies/LcsClientIdentity.o \
EURECOM-NAS/src/ies/DetachType.o \
EURECOM-NAS/src/ies/LocationAreaIdentification.o \
EURECOM-NAS/src/ies/TrackingAreaIdentity.o \
EURECOM-NAS/src/ies/CipheringKeySequenceNumber.o \
EURECOM-NAS/src/ies/MsNetworkCapability.o \
EURECOM-NAS/src/ies/UeNetworkCapability.o \
EURECOM-NAS/src/ies/ProtocolConfigurationOptions.o \
EURECOM-NAS/src/ies/AdditionalUpdateType.o \
EURECOM-NAS/src/ies/TmsiStatus.o \
EURECOM-NAS/src/ies/EsmMessageContainer.o \
EURECOM-NAS/src/ies/Nonce.o \
EURECOM-NAS/src/ies/ProcedureTransactionIdentity.o \
EURECOM-NAS/src/ies/TransactionIdentifier.o \
EURECOM-NAS/src/ies/AdditionalUpdateResult.o \
EURECOM-NAS/src/ies/GprsTimer.o \
EURECOM-NAS/src/ies/EpsNetworkFeatureSupport.o \
EURECOM-NAS/src/ies/SsCode.o \
EURECOM-NAS/src/ies/DrxParameter.o \
EURECOM-NAS/src/ies/KsiAndSequenceNumber.o
libnas_utils_OBJS = \
EURECOM-NAS/src/util/nas_log.o \
EURECOM-NAS/src/util/nas_timer.o \
EURECOM-NAS/src/util/TLVEncoder.o \
EURECOM-NAS/src/util/TLVDecoder.o \
EURECOM-NAS/src/util/OctetString.o
libnas_OBJS = \
EURECOM-NAS/src/nas_network.o \
EURECOM-NAS/src/nas_parser.o \
EURECOM-NAS/src/nas_proc.o \
EURECOM-NAS/src/nas_user.o \
$(libnas_utils_OBJS) \
$(libnas_emm_OBJS) \
$(libnas_emm_msg_OBJS) \
$(libnas_emm_sap_OBJS) \
$(libnas_esm_OBJS) \
$(libnas_esm_msg_OBJS) \
$(libnas_esm_sap_OBJS) \
$(libnas_ies_OBJS) \
$(libnas_api_OBJS)
NAS_UE_COMPILED_OBJS = $(addprefix $(OUTDIR)/,$(libnas_OBJS))
# pull in dependency info for *existing* .o files
-include $(NAS_UE_COMPILED_OBJS:.o=.d)
CFLAGS += \
-Wall \
-DNAS_UE \
-DUE_BUILD \
-Wuninitialized \
-Werror=implicit-function-declaration \
$(libnas_INCLUDES)
.SECONDEXPANSION:
$(NAS_UE_COMPILED_OBJS): %.o : $$(subst $(OUTDIR), $(UE_NAS_DIR), $$*.c)
@echo "Compiling $<"
@if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi;
@$(CC) -c $(CFLAGS) -o $@ $<
@$(CC) -MM $(CFLAGS) $< > $(basename $@).d
@mv -f $(basename $@).d $(basename $@).d.tmp
@sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d
@sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d
@rm -f $(basename $@).d.tmp
$(OUTDIR)/libuenas.a: $(NAS_UE_COMPILED_OBJS)
@echo Creating UE_NAS archive
@$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libnas_OBJS))
clean:
@$(RM_F_V) $(OUTDIR)/*.o
@$(RM_F_V) $(OUTDIR)/*.d
@$(RM_F_V) $(OUTDIR)/libuenas.a
showcflags:
@echo uenas cflags: $(CFLAGS)
...@@ -6,6 +6,7 @@ AM_CFLAGS = \ ...@@ -6,6 +6,7 @@ AM_CFLAGS = \
@ADD_CFLAGS@ \ @ADD_CFLAGS@ \
-DNAS_MME \ -DNAS_MME \
-DEPC_BUILD \ -DEPC_BUILD \
-DENABLE_ITTI \
-I$(top_srcdir)/COMMON \ -I$(top_srcdir)/COMMON \
-I$(top_srcdir)/INTERTASK_INTERFACE \ -I$(top_srcdir)/INTERTASK_INTERFACE \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/api/user \ -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/user \
...@@ -31,6 +32,7 @@ else ...@@ -31,6 +32,7 @@ else
include Makefile.inc include Makefile.inc
libnas_la_SOURCES = \ libnas_la_SOURCES = \
nas_main.c \ nas_main.c \
nas_itti_messaging.c nas_itti_messaging.h \ nas_itti_messaging.c \
nas_itti_messaging.h \
$(libnas_SRCS) $(libnas_SRCS)
endif endif
\ No newline at end of file
...@@ -33,7 +33,7 @@ libnas_emm_msg_SRCS = \ ...@@ -33,7 +33,7 @@ libnas_emm_msg_SRCS = \
EURECOM-NAS/src/emm/msg/ExtendedServiceRequest.c \ EURECOM-NAS/src/emm/msg/ExtendedServiceRequest.c \
EURECOM-NAS/src/emm/msg/IdentityResponse.c \ EURECOM-NAS/src/emm/msg/IdentityResponse.c \
EURECOM-NAS/src/emm/msg/SecurityModeReject.h \ EURECOM-NAS/src/emm/msg/SecurityModeReject.h \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateComplete.h\ EURECOM-NAS/src/emm/msg/TrackingAreaUpdateComplete.h \
EURECOM-NAS/src/emm/msg/AttachAccept.h \ EURECOM-NAS/src/emm/msg/AttachAccept.h \
EURECOM-NAS/src/emm/msg/AuthenticationFailure.h \ EURECOM-NAS/src/emm/msg/AuthenticationFailure.h \
EURECOM-NAS/src/emm/msg/CsServiceNotification.h \ EURECOM-NAS/src/emm/msg/CsServiceNotification.h \
...@@ -41,14 +41,14 @@ libnas_emm_msg_SRCS = \ ...@@ -41,14 +41,14 @@ libnas_emm_msg_SRCS = \
EURECOM-NAS/src/emm/msg/ExtendedServiceRequest.h \ EURECOM-NAS/src/emm/msg/ExtendedServiceRequest.h \
EURECOM-NAS/src/emm/msg/IdentityResponse.h \ EURECOM-NAS/src/emm/msg/IdentityResponse.h \
EURECOM-NAS/src/emm/msg/ServiceReject.c \ EURECOM-NAS/src/emm/msg/ServiceReject.c \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateReject.c\ EURECOM-NAS/src/emm/msg/TrackingAreaUpdateReject.c \
EURECOM-NAS/src/emm/msg/AttachComplete.c \ EURECOM-NAS/src/emm/msg/AttachComplete.c \
EURECOM-NAS/src/emm/msg/AuthenticationReject.c \ EURECOM-NAS/src/emm/msg/AuthenticationReject.c \
EURECOM-NAS/src/emm/msg/DetachAccept.c \ EURECOM-NAS/src/emm/msg/DetachAccept.c \
EURECOM-NAS/src/emm/msg/EmmInformation.h \ EURECOM-NAS/src/emm/msg/EmmInformation.h \
EURECOM-NAS/src/emm/msg/GutiReallocationCommand.c \ EURECOM-NAS/src/emm/msg/GutiReallocationCommand.c \
EURECOM-NAS/src/emm/msg/ServiceReject.h \ EURECOM-NAS/src/emm/msg/ServiceReject.h \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateReject.h\ EURECOM-NAS/src/emm/msg/TrackingAreaUpdateReject.h \
EURECOM-NAS/src/emm/msg/AttachComplete.h \ EURECOM-NAS/src/emm/msg/AttachComplete.h \
EURECOM-NAS/src/emm/msg/AuthenticationReject.h \ EURECOM-NAS/src/emm/msg/AuthenticationReject.h \
EURECOM-NAS/src/emm/msg/DetachAccept.h \ EURECOM-NAS/src/emm/msg/DetachAccept.h \
...@@ -56,7 +56,7 @@ libnas_emm_msg_SRCS = \ ...@@ -56,7 +56,7 @@ libnas_emm_msg_SRCS = \
EURECOM-NAS/src/emm/msg/GutiReallocationCommand.h \ EURECOM-NAS/src/emm/msg/GutiReallocationCommand.h \
EURECOM-NAS/src/emm/msg/SecurityModeCommand.c \ EURECOM-NAS/src/emm/msg/SecurityModeCommand.c \
EURECOM-NAS/src/emm/msg/ServiceRequest.c \ EURECOM-NAS/src/emm/msg/ServiceRequest.c \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateRequest.c\ EURECOM-NAS/src/emm/msg/TrackingAreaUpdateRequest.c \
EURECOM-NAS/src/emm/msg/AttachReject.c \ EURECOM-NAS/src/emm/msg/AttachReject.c \
EURECOM-NAS/src/emm/msg/AuthenticationRequest.c \ EURECOM-NAS/src/emm/msg/AuthenticationRequest.c \
EURECOM-NAS/src/emm/msg/DetachRequest.c \ EURECOM-NAS/src/emm/msg/DetachRequest.c \
...@@ -64,7 +64,7 @@ libnas_emm_msg_SRCS = \ ...@@ -64,7 +64,7 @@ libnas_emm_msg_SRCS = \
EURECOM-NAS/src/emm/msg/GutiReallocationComplete.c \ EURECOM-NAS/src/emm/msg/GutiReallocationComplete.c \
EURECOM-NAS/src/emm/msg/SecurityModeCommand.h \ EURECOM-NAS/src/emm/msg/SecurityModeCommand.h \
EURECOM-NAS/src/emm/msg/ServiceRequest.h \ EURECOM-NAS/src/emm/msg/ServiceRequest.h \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateRequest.h\ EURECOM-NAS/src/emm/msg/TrackingAreaUpdateRequest.h \
EURECOM-NAS/src/emm/msg/AttachReject.h \ EURECOM-NAS/src/emm/msg/AttachReject.h \
EURECOM-NAS/src/emm/msg/AuthenticationRequest.h \ EURECOM-NAS/src/emm/msg/AuthenticationRequest.h \
EURECOM-NAS/src/emm/msg/DetachRequest.h \ EURECOM-NAS/src/emm/msg/DetachRequest.h \
...@@ -72,7 +72,7 @@ libnas_emm_msg_SRCS = \ ...@@ -72,7 +72,7 @@ libnas_emm_msg_SRCS = \
EURECOM-NAS/src/emm/msg/GutiReallocationComplete.h \ EURECOM-NAS/src/emm/msg/GutiReallocationComplete.h \
EURECOM-NAS/src/emm/msg/SecurityModeComplete.c \ EURECOM-NAS/src/emm/msg/SecurityModeComplete.c \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateAccept.c \ EURECOM-NAS/src/emm/msg/TrackingAreaUpdateAccept.c \
EURECOM-NAS/src/emm/msg/UplinkNasTransport.c\ EURECOM-NAS/src/emm/msg/UplinkNasTransport.c \
EURECOM-NAS/src/emm/msg/AttachRequest.c \ EURECOM-NAS/src/emm/msg/AttachRequest.c \
EURECOM-NAS/src/emm/msg/AuthenticationResponse.c \ EURECOM-NAS/src/emm/msg/AuthenticationResponse.c \
EURECOM-NAS/src/emm/msg/DownlinkNasTransport.c \ EURECOM-NAS/src/emm/msg/DownlinkNasTransport.c \
...@@ -80,7 +80,7 @@ libnas_emm_msg_SRCS = \ ...@@ -80,7 +80,7 @@ libnas_emm_msg_SRCS = \
EURECOM-NAS/src/emm/msg/IdentityRequest.c \ EURECOM-NAS/src/emm/msg/IdentityRequest.c \
EURECOM-NAS/src/emm/msg/SecurityModeComplete.h \ EURECOM-NAS/src/emm/msg/SecurityModeComplete.h \
EURECOM-NAS/src/emm/msg/TrackingAreaUpdateAccept.h \ EURECOM-NAS/src/emm/msg/TrackingAreaUpdateAccept.h \
EURECOM-NAS/src/emm/msg/UplinkNasTransport.h\ EURECOM-NAS/src/emm/msg/UplinkNasTransport.h \
EURECOM-NAS/src/emm/msg/AttachRequest.h \ EURECOM-NAS/src/emm/msg/AttachRequest.h \
EURECOM-NAS/src/emm/msg/AuthenticationResponse.h \ EURECOM-NAS/src/emm/msg/AuthenticationResponse.h \
EURECOM-NAS/src/emm/msg/DownlinkNasTransport.h \ EURECOM-NAS/src/emm/msg/DownlinkNasTransport.h \
......
...@@ -23,15 +23,22 @@ $(ITTI_MESSAGES_H): $(ITTI_MESSAGES_XML) ...@@ -23,15 +23,22 @@ $(ITTI_MESSAGES_H): $(ITTI_MESSAGES_XML)
@sed -e 's/[ ]*//' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' $< > $@ @sed -e 's/[ ]*//' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' $< > $@
ifdef USE_MME ifdef USE_MME
CFLAGS += -DENB_MODE -DENABLE_USE_MME -DENABLE_EVENT_FD -I$(S1AP_DIR) -I$(SCTP_DIR) LIBS += $(UE_NAS_OBJ_DIR)/libuenas.a
S1AP_CFLAGS = $(CFLAGS) -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) $(UTILS_incl)
LIBS += $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a -lsctp -lcrypt LIBS += $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a -lsctp -lcrypt
SHARED_DEPENDENCIES = $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a SHARED_DEPENDENCIES = $(UE_NAS_OBJ_DIR)/libuenas.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a
export S1AP_CFLAGS
ENABLE_ITTI = 1 ENABLE_ITTI = 1
CFLAGS += -DENABLE_ITTI -DENABLE_USE_MME
export CFLAGS
$(UE_NAS_OBJ_DIR)/libuenas.a: force_look
@$(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE $(UE_NAS_OBJ_DIR)/libuenas.a OUTDIR=$(UE_NAS_OBJ_DIR)
CFLAGS += -DENB_MODE -I$(S1AP_DIR) -I$(SCTP_DIR)
S1AP_CFLAGS = $(CFLAGS) -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) $(UTILS_incl)
export S1AP_CFLAGS
$(S1AP_OBJ_DIR)/libs1ap.a: force_look $(S1AP_OBJ_DIR)/libs1ap.a: force_look
@$(MAKE) -C $(S1AP_DIR) -f Makefile.eNB $(S1AP_OBJ_DIR)/libs1ap.a OUTDIR=$(S1AP_OBJ_DIR) @$(MAKE) -C $(S1AP_DIR) -f Makefile.eNB $(S1AP_OBJ_DIR)/libs1ap.a OUTDIR=$(S1AP_OBJ_DIR)
$(SCTP_OBJ_DIR)/libsctp.a: force_look $(SCTP_OBJ_DIR)/libsctp.a: force_look
......
...@@ -60,10 +60,15 @@ COMMON_CFLAGS = \ ...@@ -60,10 +60,15 @@ COMMON_CFLAGS = \
-O2 -O2
COMMON_UTILS_DIR = $(OPENAIR_HOME)/common/utils COMMON_UTILS_DIR = $(OPENAIR_HOME)/common/utils
UE_NAS_DIR = $(OPENAIR_HOME)/openair-cn/NAS
S1AP_DIR = $(OPENAIR_HOME)/openair-cn/S1AP S1AP_DIR = $(OPENAIR_HOME)/openair-cn/S1AP
SCTP_DIR = $(OPENAIR_HOME)/openair-cn/SCTP SCTP_DIR = $(OPENAIR_HOME)/openair-cn/SCTP
UE_NAS_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(UE_NAS_DIR))
S1AP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(S1AP_DIR)) S1AP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(S1AP_DIR))
SCTP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SCTP_DIR)) SCTP_OBJ_DIR = $(subst $(OPENAIR_HOME),$(OBJS_DIR),$(SCTP_DIR))
export S1AP_DIR
export COMMON_UTILS_DIR export COMMON_UTILS_DIR
export UE_NAS_DIR
export S1AP_DIR
export SCTP_DIR
...@@ -367,7 +367,9 @@ rrm_std_cellular: ...@@ -367,7 +367,9 @@ rrm_std_cellular:
( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make cell_rrm CELL_RRM=1 CELLULAR=1 NO_RRM=1) ( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make cell_rrm CELL_RRM=1 CELLULAR=1 NO_RRM=1)
cleanall: clean cleanasn1 cleanall: clean cleanasn1
@if [ -d $(UE_NAS_DIR) ]; then $(MAKE) -C $(UE_NAS_DIR) -f Makefile.UE cleanall OUTDIR=$(UE_NAS_OBJ_DIR); fi
@if [ -d $(S1AP_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB cleanall OUTDIR=$(S1AP_OBJ_DIR); fi @if [ -d $(S1AP_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB cleanall OUTDIR=$(S1AP_OBJ_DIR); fi
@if [ -d $(SCTP_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB cleanall OUTDIR=$(SCTP_OBJ_DIR); fi
cleanalmostall: clean cleanalmostall: clean
rm -f $(ASN1_MSG_OBJS1) rm -f $(ASN1_MSG_OBJS1)
......
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