Commit 9b61d3a7 authored by Navid Nikaein's avatar Navid Nikaein

* support for PLMN with 6 digits

* bug fixed for S1AP
* update the mme and enb configuration files



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5218 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 4a930b7d
......@@ -88,6 +88,7 @@ typedef uint32_t SequenceNumber_t;
typedef uint32_t access_restriction_t;
typedef uint32_t context_identifier_t;
typedef uint32_t rau_tau_timer_t;
//typedef uint32_t in_addr_t; is network byte order
typedef uint32_t ard_t;
#define ARD_UTRAN_NOT_ALLOWED (1U)
......
......@@ -81,24 +81,28 @@ static inline int ue_context_compare_identifiers(
} else {
uint16_t mcc1;
uint16_t mnc1;
uint16_t mnc1_len;
uint16_t mcc2;
uint16_t mnc2;
uint16_t mnc2_len;
PLMN_T_TO_MCC_MNC(p1->guti.gummei.plmn, mcc1, mnc1);
PLMN_T_TO_MCC_MNC(p1->guti.gummei.plmn, mcc2, mnc2);
PLMN_T_TO_MCC_MNC(p1->guti.gummei.plmn, mcc1, mnc1, mnc1_len);
PLMN_T_TO_MCC_MNC(p1->guti.gummei.plmn, mcc2, mnc2, mnc2_len);
/* else compare by GUTI */
if ((p1->guti.m_tmsi < p2->guti.m_tmsi) &&
(p1->guti.gummei.MMEcode < p2->guti.gummei.MMEcode) &&
(p1->guti.gummei.MMEgid < p2->guti.gummei.MMEgid) &&
(mcc1 < mcc2) &&
(mnc1 < mnc2))
(mnc1 < mnc2) &&
(mnc1_len < mnc2_len))
return 1;
if ((p1->guti.m_tmsi > p2->guti.m_tmsi) &&
(p1->guti.gummei.MMEcode > p2->guti.gummei.MMEcode) &&
(p1->guti.gummei.MMEgid > p2->guti.gummei.MMEgid) &&
(mcc1 > mcc2) &&
(mnc1 > mnc2))
(mnc1 > mnc2) &&
(mnc1_len > mnc2_len))
return -1;
}
/* Match -> return 0 */
......
......@@ -120,7 +120,9 @@ typedef struct ue_context_s {
#define SUBSCRIPTION_KNOWN 0x1
unsigned subscription_known:1;
uint8_t msisdn[MSISDN_LENGTH];
uint8_t msisdn[MSISDN_LENGTH+1];
uint8_t msisdn_length;
mm_state_t mm_state;
/* Globally Unique Temporary Identity */
GUTI_t guti;
......
......@@ -153,6 +153,7 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *
DevCheck(new_instance->tac == s1ap_register_eNB->tac, new_instance->tac, s1ap_register_eNB->tac, 0);
DevCheck(new_instance->mcc == s1ap_register_eNB->mcc, new_instance->mcc, s1ap_register_eNB->mcc, 0);
DevCheck(new_instance->mnc == s1ap_register_eNB->mnc, new_instance->mnc, s1ap_register_eNB->mnc, 0);
DevCheck(new_instance->mnc_digit_length == s1ap_register_eNB->mnc_digit_length, new_instance->mnc_digit_length, s1ap_register_eNB->mnc_digit_length, 0);
DevCheck(new_instance->default_drx == s1ap_register_eNB->default_drx, new_instance->default_drx, s1ap_register_eNB->default_drx, 0);
} else {
new_instance = calloc(1, sizeof(s1ap_eNB_instance_t));
......@@ -162,14 +163,15 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *
RB_INIT(&new_instance->s1ap_mme_head);
/* Copy usefull parameters */
new_instance->instance = instance;
new_instance->eNB_name = s1ap_register_eNB->eNB_name;
new_instance->eNB_id = s1ap_register_eNB->eNB_id;
new_instance->cell_type = s1ap_register_eNB->cell_type;
new_instance->tac = s1ap_register_eNB->tac;
new_instance->mcc = s1ap_register_eNB->mcc;
new_instance->mnc = s1ap_register_eNB->mnc;
new_instance->default_drx = s1ap_register_eNB->default_drx;
new_instance->instance = instance;
new_instance->eNB_name = s1ap_register_eNB->eNB_name;
new_instance->eNB_id = s1ap_register_eNB->eNB_id;
new_instance->cell_type = s1ap_register_eNB->cell_type;
new_instance->tac = s1ap_register_eNB->tac;
new_instance->mcc = s1ap_register_eNB->mcc;
new_instance->mnc = s1ap_register_eNB->mnc;
new_instance->mnc_digit_length = s1ap_register_eNB->mnc_digit_length;
new_instance->default_drx = s1ap_register_eNB->default_drx;
/* Add the new instance to the list of eNB (meaningfull in virtual mode) */
s1ap_eNB_insert_new_instance(new_instance);
......@@ -310,15 +312,15 @@ void *s1ap_eNB_task(void *arg)
static int s1ap_eNB_generate_s1_setup_request(
s1ap_eNB_instance_t *instance_p, s1ap_eNB_mme_data_t *s1ap_mme_data_p)
{
s1ap_message message;
s1ap_message message;
S1ap_S1SetupRequestIEs_t *s1SetupRequest_p;
S1ap_PLMNidentity_t plmnIdentity;
S1ap_SupportedTAs_Item_t ta;
uint8_t *buffer;
uint32_t len;
int ret = 0;
uint32_t len;
int ret = 0;
DevAssert(instance_p != NULL);
DevAssert(s1ap_mme_data_p != NULL);
......@@ -339,13 +341,13 @@ static int s1ap_eNB_generate_s1_setup_request(
s1SetupRequest_p->global_ENB_ID.eNB_ID.present = S1ap_ENB_ID_PR_macroENB_ID;
MACRO_ENB_ID_TO_BIT_STRING(instance_p->eNB_id,
&s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID);
MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc,
MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length,
&s1SetupRequest_p->global_ENB_ID.pLMNidentity);
S1AP_INFO("%d -> %02x%02x%02x\n", instance_p->eNB_id, s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.buf[0], s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.buf[1], s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.buf[2]);
INT16_TO_OCTET_STRING(instance_p->tac, &ta.tAC);
MCC_MNC_TO_TBCD(instance_p->mcc, instance_p->mnc, &plmnIdentity);
MCC_MNC_TO_TBCD(instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length, &plmnIdentity);
ASN_SEQUENCE_ADD(&ta.broadcastPLMNs.list, &plmnIdentity);
ASN_SEQUENCE_ADD(&s1SetupRequest_p->supportedTAs.list, &ta);
......
......@@ -86,6 +86,7 @@ typedef enum {
struct plmn_identity_s {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
STAILQ_ENTRY(plmn_identity_s) next;
};
......@@ -208,6 +209,7 @@ typedef struct s1ap_eNB_instance_s {
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
/* Default Paging DRX of the eNB as defined in TS 36.304 */
paging_drx_t default_drx;
......
......@@ -301,7 +301,7 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
plmn_identity_p = gummei_item_p->servedPLMNs.list.array[i];
new_plmn_identity_p = calloc(1, sizeof(struct plmn_identity_s));
TBCD_TO_MCC_MNC(plmn_identity_p, new_plmn_identity_p->mcc,
new_plmn_identity_p->mnc);
new_plmn_identity_p->mnc, new_plmn_identity_p->mnc_digit_length);
STAILQ_INSERT_TAIL(&new_gummei_p->served_plmns, new_plmn_identity_p, next);
new_gummei_p->nb_served_plmns++;
}
......@@ -414,9 +414,9 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
{
int i;
s1ap_eNB_mme_data_t *mme_desc_p;
s1ap_eNB_ue_context_t *ue_desc_p;
MessageDef *message_p;
s1ap_eNB_mme_data_t *mme_desc_p = NULL;
s1ap_eNB_ue_context_t *ue_desc_p = NULL;
MessageDef *message_p = NULL;
S1ap_InitialContextSetupRequestIEs_t *initialContextSetupRequest_p;
DevAssert(s1ap_message_p != NULL);
......@@ -445,7 +445,7 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
ue_desc_p->mme_ue_s1ap_id = initialContextSetupRequest_p->mme_ue_s1ap_id;
message_p = itti_alloc_new_message(TASK_S1AP, S1AP_INITIAL_CONTEXT_SETUP_REQ);
message_p = itti_alloc_new_message(TASK_S1AP, S1AP_INITIAL_CONTEXT_SETUP_REQ);
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).ue_initial_id = ue_desc_p->ue_initial_id;
ue_desc_p->ue_initial_id = 0;
......
......@@ -161,9 +161,12 @@ int s1ap_eNB_handle_nas_first_req(
if (s1ap_nas_first_req_p->ue_identity.presenceMask & UE_IDENTITIES_gummei) {
initial_ue_message_p->presenceMask |= S1AP_INITIALUEMESSAGEIES_GUMMEI_ID_PRESENT;
MCC_MNC_TO_PLMNID(s1ap_nas_first_req_p->ue_identity.gummei.mcc,
s1ap_nas_first_req_p->ue_identity.gummei.mnc,
&initial_ue_message_p->gummei_id.pLMN_Identity);
MCC_MNC_TO_PLMNID(
s1ap_nas_first_req_p->ue_identity.gummei.mcc,
s1ap_nas_first_req_p->ue_identity.gummei.mnc,
s1ap_nas_first_req_p->ue_identity.gummei.mnc_len,
&initial_ue_message_p->gummei_id.pLMN_Identity);
MME_GID_TO_OCTET_STRING(s1ap_nas_first_req_p->ue_identity.gummei.mme_group_id,
&initial_ue_message_p->gummei_id.mME_Group_ID);
MME_CODE_TO_OCTET_STRING(s1ap_nas_first_req_p->ue_identity.gummei.mme_code,
......@@ -172,8 +175,10 @@ int s1ap_eNB_handle_nas_first_req(
/* Assuming TAI is the TAI from the cell */
INT16_TO_OCTET_STRING(instance_p->tac, &initial_ue_message_p->tai.tAC);
MCC_MNC_TO_PLMNID(instance_p->mcc, instance_p->mnc,
&initial_ue_message_p->tai.pLMNidentity);
MCC_MNC_TO_PLMNID(instance_p->mcc,
instance_p->mnc,
instance_p->mnc_digit_length,
&initial_ue_message_p->tai.pLMNidentity);
/* Set the EUTRAN CGI
* The cell identity is defined on 28 bits but as we use macro enb id,
......@@ -181,8 +186,10 @@ int s1ap_eNB_handle_nas_first_req(
*/
MACRO_ENB_ID_TO_CELL_IDENTITY(instance_p->eNB_id,
&initial_ue_message_p->eutran_cgi.cell_ID);
MCC_MNC_TO_TBCD(instance_p->mcc, instance_p->mnc,
&initial_ue_message_p->eutran_cgi.pLMNidentity);
MCC_MNC_TO_TBCD(instance_p->mcc,
instance_p->mnc,
instance_p->mnc_digit_length,
&initial_ue_message_p->eutran_cgi.pLMNidentity);
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
/* Failed to encode message */
......@@ -319,14 +326,22 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
uplink_NAS_transport_p->nas_pdu.buf = s1ap_uplink_nas_p->nas_pdu.buffer;
uplink_NAS_transport_p->nas_pdu.size = s1ap_uplink_nas_p->nas_pdu.length;
MCC_MNC_TO_PLMNID(s1ap_eNB_instance_p->mcc, s1ap_eNB_instance_p->mnc,
&uplink_NAS_transport_p->eutran_cgi.pLMNidentity);
MCC_MNC_TO_PLMNID(
s1ap_eNB_instance_p->mcc,
s1ap_eNB_instance_p->mnc,
s1ap_eNB_instance_p->mnc_digit_length,
&uplink_NAS_transport_p->eutran_cgi.pLMNidentity);
MACRO_ENB_ID_TO_CELL_IDENTITY(s1ap_eNB_instance_p->eNB_id,
&uplink_NAS_transport_p->eutran_cgi.cell_ID);
/* MCC/MNC should be repeated in TAI and EUTRAN CGI */
MCC_MNC_TO_PLMNID(s1ap_eNB_instance_p->mcc, s1ap_eNB_instance_p->mnc,
&uplink_NAS_transport_p->tai.pLMNidentity);
MCC_MNC_TO_PLMNID(
s1ap_eNB_instance_p->mcc,
s1ap_eNB_instance_p->mnc,
s1ap_eNB_instance_p->mnc_digit_length,
&uplink_NAS_transport_p->tai.pLMNidentity);
TAC_TO_ASN1(s1ap_eNB_instance_p->tac, &uplink_NAS_transport_p->tai.tAC);
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
......
......@@ -290,6 +290,7 @@ int s1ap_mme_handle_s1_setup_request(uint32_t assoc_id, uint32_t stream,
/* eNB and MME have no common PLMN */
if (ta_ret != TA_LIST_RET_OK) {
S1AP_ERROR("No Common PLMN with eNB, generate_s1_setup_failure\n");
return s1ap_mme_generate_s1_setup_failure(assoc_id, S1ap_Cause_PR_misc,
S1ap_CauseMisc_unknown_PLMN,
S1ap_TimeToWait_v20s);
......@@ -374,9 +375,11 @@ int s1ap_generate_s1_setup_response(eNB_description_t *eNB_association)
/* FIXME: free object from list once encoded */
plmn = calloc(1, sizeof(*plmn));
MCC_MNC_TO_PLMNID(mme_config.gummei.plmn_mcc[i],
mme_config.gummei.plmn_mnc[i],
plmn);
MCC_MNC_TO_PLMNID(
mme_config.gummei.plmn_mcc[i],
mme_config.gummei.plmn_mnc[i],
mme_config.gummei.plmn_mnc_len[i],
plmn);
ASN_SEQUENCE_ADD(&servedGUMMEI.servedPLMNs.list, plmn);
}
for (i = 0; i < mme_config.gummei.nb_mme_gid; i++) {
......
......@@ -47,16 +47,23 @@ int s1ap_mme_compare_plmn(S1ap_PLMNidentity_t *plmn)
int i;
uint16_t mcc;
uint16_t mnc;
uint16_t mnc_len;
DevAssert(plmn != NULL);
TBCD_TO_MCC_MNC(plmn, mcc, mnc);
TBCD_TO_MCC_MNC(plmn, mcc, mnc, mnc_len);
config_read_lock(&mme_config);
for (i = 0; i < mme_config.gummei.nb_mme_gid; i++) {
if (mme_config.gummei.plmn_mcc[i] == mcc &&
mme_config.gummei.plmn_mnc[i] == mnc)
S1AP_DEBUG("Comparing plmn_mcc %d/%d, plmn_mnc %d/%d plmn_mnc_len %d/%d\n",
mme_config.gummei.plmn_mcc[i], mcc,
mme_config.gummei.plmn_mnc[i],mnc,
mme_config.gummei.plmn_mnc_len[i],mnc_len);
if ((mme_config.gummei.plmn_mcc[i] == mcc) &&
(mme_config.gummei.plmn_mnc[i] == mnc) &&
(mme_config.gummei.plmn_mnc_len[i] == mnc_len))
/* There is a matching plmn */
return TA_LIST_AT_LEAST_ONE_MATCH;
}
......@@ -104,7 +111,8 @@ int s1ap_mme_compare_tac(S1ap_TAC_t *tac)
config_read_lock(&mme_config);
for (i = 0; i < mme_config.gummei.nb_mme_gid; i++) {
for (i = 0; i < mme_config.gummei.nb_plmns; i++) {
S1AP_DEBUG("Comparing config tac %d, received tac = %d\n", mme_config.gummei.plmn_tac[i], tac_value);
if (mme_config.gummei.plmn_tac[i] == tac_value)
return TA_LIST_AT_LEAST_ONE_MATCH;
}
......
......@@ -549,12 +549,12 @@ inline void sctp_eNB_read_from_socket(struct sctp_cnx_list_elm_s *sctp_cnx)
} else {
sctp_cnx->nb_messages++;
if (ntohl(sinfo.sinfo_ppid) != sctp_cnx->ppid) {
if (sinfo.sinfo_ppid != sctp_cnx->ppid) {
/* Mismatch in Payload Protocol Identifier,
* may be we received unsollicited traffic from stack other than S1AP.
*/
SCTP_ERROR("Received data from peer with unsollicited PPID %d, expecting %d\n",
ntohl(sinfo.sinfo_ppid), sctp_cnx->ppid);
sinfo.sinfo_ppid, sctp_cnx->ppid);
}
SCTP_DEBUG("[%d][%d] Msg of length %d received from port %u, on stream %d, PPID %d\n",
......
......@@ -91,8 +91,13 @@ int sgw_lite_handle_create_session_request(SgwCreateSessionRequest *session_req_
return -1;
}
SPGW_APP_DEBUG("Rx CREATE-SESSION-REQUEST MME S11 teid %u S-GW S11 teid %u APN %s EPS bearer Id %d\n", new_endpoint->remote_teid, new_endpoint->local_teid, session_req_p->apn, session_req_p->bearer_to_create.eps_bearer_id);
SPGW_APP_DEBUG(" IMSI %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",IMSI(&session_req_p->imsi));
SPGW_APP_DEBUG("Rx CREATE-SESSION-REQUEST MME S11 teid %u S-GW S11 teid %u APN %s EPS bearer Id %d\n",
new_endpoint->remote_teid,
new_endpoint->local_teid,
session_req_p->apn,
session_req_p->bearer_to_create.eps_bearer_id);
SPGW_APP_DEBUG(" IMSI %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",
IMSI(&session_req_p->imsi));
s_plus_p_gw_eps_bearer_context_information = sgw_lite_cm_create_bearer_context_information_in_collection(new_endpoint->local_teid);
if (s_plus_p_gw_eps_bearer_context_information != NULL) {
......@@ -115,7 +120,9 @@ int sgw_lite_handle_create_session_request(SgwCreateSessionRequest *session_req_
s_plus_p_gw_eps_bearer_context_information->sgw_eps_bearer_context_information.peer_ip = session_req_p->peer_ip;
// may use ntohl or reverse, will see
FTEID_T_2_IP_ADDRESS_T((&session_req_p->sender_fteid_for_cp) , (&s_plus_p_gw_eps_bearer_context_information->sgw_eps_bearer_context_information.mme_ip_address_for_S11));
FTEID_T_2_IP_ADDRESS_T(
(&session_req_p->sender_fteid_for_cp) ,
(&s_plus_p_gw_eps_bearer_context_information->sgw_eps_bearer_context_information.mme_ip_address_for_S11));
//--------------------------------------
// PDN connection
......@@ -252,11 +259,12 @@ int sgw_lite_handle_sgi_endpoint_created(SGICreateEndpointResp *resp_p)
create_session_response_p->bearer_context_created.cause = CONTEXT_NOT_FOUND;
}
SPGW_APP_DEBUG("Tx CREATE-SESSION-RESPONSE MME -> %s, teid %u S-GW teid %u S1U teid %u EPS bearer id %u status %d\n",
SPGW_APP_DEBUG("Tx CREATE-SESSION-RESPONSE MME -> %s, S11 MME teid %u S11 S-GW teid %u S1U teid %u S1U addr 0x%x EPS bearer id %u status %d\n",
to_task == TASK_MME_APP ? "TASK_MME_APP" : "TASK_S11",
create_session_response_p->teid,
create_session_response_p->s11_sgw_teid.teid,
create_session_response_p->bearer_context_created.s1u_sgw_fteid.teid,
create_session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4_address,
create_session_response_p->bearer_context_created.eps_bearer_id,
create_session_response_p->bearer_context_created.cause);
return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p);
......@@ -504,14 +512,19 @@ int sgw_lite_handle_modify_bearer_request(SgwModifyBearerRequest *modify_bearer_
sgw_lite_display_s11teid2mme_mappings();
sgw_lite_display_s11_bearer_context_information_mapping();
hash_rc = hashtable_get(sgw_app.s11_bearer_context_information_hashtable, modify_bearer_p->teid, (void**)&new_bearer_context_information_p);
hash_rc = hashtable_get(
sgw_app.s11_bearer_context_information_hashtable,
modify_bearer_p->teid,
(void**)&new_bearer_context_information_p);
if (hash_rc == HASH_TABLE_OK) {
new_bearer_context_information_p->sgw_eps_bearer_context_information.pdn_connection.default_bearer = modify_bearer_p->bearer_context_to_modify.eps_bearer_id;
new_bearer_context_information_p->sgw_eps_bearer_context_information.trxn = modify_bearer_p->trxn;
hash_rc = hashtable_is_key_exists (new_bearer_context_information_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, modify_bearer_p->bearer_context_to_modify.eps_bearer_id);
hash_rc = hashtable_is_key_exists (
new_bearer_context_information_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers,
modify_bearer_p->bearer_context_to_modify.eps_bearer_id);
if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_MODIFY_BEARER_RESPONSE);
......@@ -525,10 +538,16 @@ int sgw_lite_handle_modify_bearer_request(SgwModifyBearerRequest *modify_bearer_
modify_response_p->choice.bearer_for_removal.cause = CONTEXT_NOT_FOUND;
modify_response_p->cause = CONTEXT_NOT_FOUND;
modify_response_p->trxn = modify_bearer_p->trxn;
SPGW_APP_DEBUG("Rx MODIFY_BEARER_REQUEST, eps_bearer_id %u CONTEXT_NOT_FOUND\n",
modify_bearer_p->bearer_context_to_modify.eps_bearer_id);
return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p);
} else if (hash_rc == HASH_TABLE_OK) {
// TO DO
hash_rc = hashtable_get (new_bearer_context_information_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, modify_bearer_p->bearer_context_to_modify.eps_bearer_id, (void**)&eps_bearer_entry_p);
hash_rc = hashtable_get (
new_bearer_context_information_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers,
modify_bearer_p->bearer_context_to_modify.eps_bearer_id,
(void**)&eps_bearer_entry_p);
FTEID_T_2_IP_ADDRESS_T( (&modify_bearer_p->bearer_context_to_modify.s1_eNB_fteid) , (&eps_bearer_entry_p->enb_ip_address_for_S1u) );
eps_bearer_entry_p->enb_teid_for_S1u = modify_bearer_p->bearer_context_to_modify.s1_eNB_fteid.teid;
......@@ -564,6 +583,9 @@ int sgw_lite_handle_modify_bearer_request(SgwModifyBearerRequest *modify_bearer_
modify_response_p->choice.bearer_for_removal.cause = CONTEXT_NOT_FOUND;
modify_response_p->cause = CONTEXT_NOT_FOUND;
modify_response_p->trxn = modify_bearer_p->trxn;
SPGW_APP_DEBUG("Rx MODIFY_BEARER_REQUEST, teid %u CONTEXT_NOT_FOUND\n",
modify_bearer_p->teid);
return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p);
}
return -1;
......
......@@ -242,7 +242,7 @@ void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP)
while (1) {
from_len = (socklen_t)sizeof(struct sockaddr_in);
LOG_I(UDP_, "before recvfrom sd %d\n", udp_sock_pP->sd);
LOG_D(UDP_, "before recvfrom sd %d\n", udp_sock_pP->sd);
if ((n = recvfrom(udp_sock_pP->sd, l_buffer, sizeof(l_buffer), 0,
(struct sockaddr *)&addr, &from_len)) < 0) {
LOG_E(UDP_, "Recvfrom failed %s\n", strerror(errno));
......@@ -261,7 +261,7 @@ void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP)
LOG_I(UDP_, "Msg of length %d received from %s:%u\n",
n, inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));
if (itti_send_msg_to_task(udp_sock_pP->task_id, INSTANCE_DEFAULT, message_p) < 0) {
LOG_I(UDP_, "Failed to send message %d to task %d\n",
LOG_D(UDP_, "Failed to send message %d to task %d\n",
UDP_DATA_IND,
udp_sock_pP->task_id);
break;
......@@ -338,7 +338,7 @@ void *udp_eNB_task(void *args_p)
udp_sd = udp_sock_p->sd;
pthread_mutex_unlock(&udp_socket_list_mutex);
LOG_I(UDP_, "[%d] Sending message of size %u to "IPV4_ADDR" and port %u\n",
LOG_D(UDP_, "[%d] Sending message of size %u to "IPV4_ADDR" and port %u\n",
udp_sd,
udp_data_req_p->buffer_length,
IPV4_ADDR_FORMAT(udp_data_req_p->peer_address),
......@@ -366,7 +366,7 @@ void *udp_eNB_task(void *args_p)
} break;
default: {
LOG_I(UDP_, "Unkwnon message ID %d:%s\n",
LOG_D(UDP_, "Unkwnon message ID %d:%s\n",
ITTI_MSG_ID(received_message_p),
ITTI_MSG_NAME(received_message_p));
} break;
......
......@@ -152,8 +152,8 @@ do { \
#define MCC_HUNDREDS(vALUE) \
((vALUE) / 100)
/* When MNC is only composed of 2 digits, set the hundreds unit to 0xf */
#define MNC_HUNDREDS(vALUE) \
(((vALUE) / 100) == 0 ? 15 : (vALUE) / 100)
#define MNC_HUNDREDS(vALUE, mNCdIGITlENGTH) \
( mNCdIGITlENGTH == 2 ? 15 : (vALUE) / 100)
#define MCC_MNC_DECIMAL(vALUE) \
(((vALUE) / 10) % 10)
#define MCC_MNC_DIGIT(vALUE) \
......@@ -167,30 +167,36 @@ do { \
(bUFFER)[2] = MCC_MNC_DIGIT(mCC); \
} while(0)
#define MCC_MNC_TO_PLMNID(mCC, mNC, oCTETsTRING) \
#define MCC_MNC_TO_PLMNID(mCC, mNC, mNCdIGITlENGTH, oCTETsTRING) \
do { \
(oCTETsTRING)->buf = calloc(3, sizeof(uint8_t)); \
(oCTETsTRING)->buf[0] = (MCC_MNC_DECIMAL(mCC) << 4) | MCC_HUNDREDS(mCC); \
(oCTETsTRING)->buf[1] = (MNC_HUNDREDS(mNC) << 4) | MCC_MNC_DIGIT(mCC); \
(oCTETsTRING)->buf[1] = (MNC_HUNDREDS(mNC,mNCdIGITlENGTH) << 4) | MCC_MNC_DIGIT(mCC); \
(oCTETsTRING)->buf[2] = (MCC_MNC_DIGIT(mNC) << 4) | MCC_MNC_DECIMAL(mNC); \
(oCTETsTRING)->size = 3; \
} while(0)
#define MCC_MNC_TO_TBCD(mCC, mNC, tBCDsTRING) \
#define MCC_MNC_TO_TBCD(mCC, mNC, mNCdIGITlENGTH, tBCDsTRING) \
do { \
char _buf[3]; \
DevAssert((mNCdIGITlENGTH == 3) || (mNCdIGITlENGTH == 2)); \
_buf[0] = (MCC_MNC_DECIMAL(mCC) << 4) | MCC_HUNDREDS(mCC); \
_buf[1] = (MNC_HUNDREDS(mNC) << 4) | MCC_MNC_DIGIT(mCC); \
_buf[1] = (MNC_HUNDREDS(mNC,mNCdIGITlENGTH) << 4) | MCC_MNC_DIGIT(mCC);\
_buf[2] = (MCC_MNC_DIGIT(mNC) << 4) | MCC_MNC_DECIMAL(mNC); \
OCTET_STRING_fromBuf(tBCDsTRING, _buf, 3); \
} while(0)
#define TBCD_TO_MCC_MNC(tBCDsTRING, mCC, mNC) \
#define TBCD_TO_MCC_MNC(tBCDsTRING, mCC, mNC, mNCdIGITlENGTH) \
do { \
int mNC_hundred; \
DevAssert((tBCDsTRING)->size == 3); \
mNC_hundred = (((tBCDsTRING)->buf[1] & 0xf0) >> 4); \
if (mNC_hundred == 0xf) mNC_hundred = 0; \
if (mNC_hundred == 0xf) { \
mNC_hundred = 0; \
mNCdIGITlENGTH = 2; \
} else { \
mNCdIGITlENGTH = 3; \
} \
mCC = (((((tBCDsTRING)->buf[0]) & 0xf0) >> 4) * 10) + \
((((tBCDsTRING)->buf[0]) & 0x0f) * 100) + \
(((tBCDsTRING)->buf[1]) & 0x0f); \
......@@ -219,11 +225,12 @@ do { \
tBCDsTRING[2] = (pLMN.MNCdigit2 << 4) | pLMN.MNCdigit3; \
} while(0)
#define PLMN_T_TO_MCC_MNC(pLMN, mCC, mNC) \
do { \
#define PLMN_T_TO_MCC_MNC(pLMN, mCC, mNC, mNCdIGITlENGTH) \
do { \
mCC = pLMN.MCCdigit3 * 100 + pLMN.MCCdigit2 * 10 + pLMN.MCCdigit1; \
mNC = (pLMN.MNCdigit3 == 0xF ? 0 : pLMN.MNCdigit3 * 100) \
+ pLMN.MNCdigit2 * 10 + pLMN.MNCdigit1; \
mNCdIGITlENGTH = (pLMN.MNCdigit3 == 0xF ? 2 : 3); \
mNC = (mNCdIGITlENGTH == 2 ? 0 : pLMN.MNCdigit3 * 100) \
+ pLMN.MNCdigit2 * 10 + pLMN.MNCdigit1; \
} while(0)
#define MACRO_ENB_ID_TO_BIT_STRING(mACRO, bITsTRING) \
......
......@@ -113,16 +113,20 @@ void mme_config_init(mme_config_t *mme_config_p)
static int config_parse_file(mme_config_t *mme_config_p)
{
config_t cfg;
config_setting_t *setting_mme = NULL;
config_setting_t *setting = NULL;
config_setting_t *subsetting = NULL;
config_setting_t *sub2setting = NULL;
config_setting_t *setting_mme = NULL;
config_setting_t *setting = NULL;
config_setting_t *subsetting = NULL;
config_setting_t *sub2setting = NULL;
long int alongint;
int i, num;
char *astring = NULL;
char *address = NULL;
char *cidr = NULL;
char *astring = NULL;
char *address = NULL;
char *cidr = NULL;
const char* tac = NULL;
const char* mcc = NULL;
const char* mnc = NULL;
char *sgw_ip_address_for_S1u_S12_S4_up = NULL;
char *mme_interface_name_for_S1_MME = NULL;
......@@ -258,26 +262,33 @@ static int config_parse_file(mme_config_t *mme_config_p)
if (subsetting != NULL) {
num = config_setting_length(subsetting);
if (mme_config_p->gummei.nb_plmns != num) {
if (mme_config_p->gummei.plmn_mcc != NULL) free(mme_config_p->gummei.plmn_mcc);
if (mme_config_p->gummei.plmn_mnc != NULL) free(mme_config_p->gummei.plmn_mnc);
if (mme_config_p->gummei.plmn_tac != NULL) free(mme_config_p->gummei.plmn_tac);
mme_config_p->gummei.plmn_mcc = calloc(num, sizeof(*mme_config_p->gummei.plmn_mcc));
mme_config_p->gummei.plmn_mnc = calloc(num, sizeof(*mme_config_p->gummei.plmn_mnc));
mme_config_p->gummei.plmn_tac = calloc(num, sizeof(*mme_config_p->gummei.plmn_tac));
if (mme_config_p->gummei.plmn_mcc != NULL) free(mme_config_p->gummei.plmn_mcc);
if (mme_config_p->gummei.plmn_mnc != NULL) free(mme_config_p->gummei.plmn_mnc);
if (mme_config_p->gummei.plmn_mnc_len != NULL) free(mme_config_p->gummei.plmn_mnc_len);
if (mme_config_p->gummei.plmn_tac != NULL) free(mme_config_p->gummei.plmn_tac);
mme_config_p->gummei.plmn_mcc = calloc(num, sizeof(*mme_config_p->gummei.plmn_mcc));
mme_config_p->gummei.plmn_mnc = calloc(num, sizeof(*mme_config_p->gummei.plmn_mnc));
mme_config_p->gummei.plmn_mnc_len = calloc(num, sizeof(*mme_config_p->gummei.plmn_mnc_len));
mme_config_p->gummei.plmn_tac = calloc(num, sizeof(*mme_config_p->gummei.plmn_tac));
}
mme_config_p->gummei.nb_plmns = num;
for (i = 0; i < num; i++) {
sub2setting = config_setting_get_elem(subsetting, i);
if (sub2setting != NULL) {
if( (config_setting_lookup_int( sub2setting, MME_CONFIG_STRING_MCC, &alongint) )) {
mme_config_p->gummei.plmn_mcc[i] = (uint16_t)alongint;
if( (config_setting_lookup_string( sub2setting, MME_CONFIG_STRING_MCC, &mcc) )) {
mme_config_p->gummei.plmn_mcc[i] = (uint16_t)atoi(mcc);
}
if( (config_setting_lookup_int( sub2setting, MME_CONFIG_STRING_MNC, &alongint) )) {
mme_config_p->gummei.plmn_mnc[i] = (uint16_t)alongint;
if( (config_setting_lookup_string( sub2setting, MME_CONFIG_STRING_MNC, &mnc) )) {
mme_config_p->gummei.plmn_mnc[i] = (uint16_t)atoi(mnc);
mme_config_p->gummei.plmn_mnc_len[i] = strlen(mnc);
AssertFatal((mme_config_p->gummei.plmn_mnc_len[i] == 2) || (mme_config_p->gummei.plmn_mnc_len[i] == 3),
"Bad MNC length %u, must be 2 or 3", mme_config_p->gummei.plmn_mnc_len[i]);
}
if( (config_setting_lookup_int( sub2setting, MME_CONFIG_STRING_TAC, &alongint) )) {
mme_config_p->gummei.plmn_tac[i] = (uint16_t)alongint;
if( (config_setting_lookup_string( sub2setting, MME_CONFIG_STRING_TAC, &tac) )) {
mme_config_p->gummei.plmn_tac[i] = (uint16_t)atoi(tac);
AssertFatal(mme_config_p->gummei.plmn_tac[i] != 0,
"TAC must not be 0");
}
}
}
......@@ -355,6 +366,8 @@ do { \
static void config_display(mme_config_t *mme_config_p)
{
int j;
fprintf(stdout, "==== EURECOM %s v%s ====\n", PACKAGE_NAME, PACKAGE_VERSION);
fprintf(stdout, "Configuration:\n");
fprintf(stdout, "- File ...............: %s\n", mme_config_p->config_file);
......@@ -400,10 +413,20 @@ static void config_display(mme_config_t *mme_config_p)
DISPLAY_ARRAY(mme_config_p->gummei.nb_mme_gid, "| %u ", mme_config_p->gummei.mme_gid[i]);
fprintf(stdout, " mme codes ........:\n ");
DISPLAY_ARRAY(mme_config_p->gummei.nb_mmec, "| %u ", mme_config_p->gummei.mmec[i]);
fprintf(stdout, " plmns ............: (mcc.mnc:tac)\n ");
DISPLAY_ARRAY(mme_config_p->gummei.nb_plmns, "| %3u.%3u:%u ",
mme_config_p->gummei.plmn_mcc[i], mme_config_p->gummei.plmn_mnc[i],
mme_config_p->gummei.plmn_tac[i]);
fprintf(stdout, " plmns ............: (mcc.mnc:tac)\n");
for (j= 0; j < mme_config_p->gummei.nb_plmns; j++) {
if (mme_config_p->gummei.plmn_mnc_len[j] ==2 ) {
fprintf(stdout, " %3u.%3u:%u\n",
mme_config_p->gummei.plmn_mcc[j],
mme_config_p->gummei.plmn_mnc[j],
mme_config_p->gummei.plmn_tac[j]);
} else {
fprintf(stdout, " %3u.%03u:%u\n",
mme_config_p->gummei.plmn_mcc[j],
mme_config_p->gummei.plmn_mnc[j],
mme_config_p->gummei.plmn_tac[j]);
}
}
fprintf(stdout, "- S6A:\n");
fprintf(stdout, " conf file ........: %s\n", mme_config_p->s6a_config.conf_file);
}
......
......@@ -104,6 +104,7 @@ typedef struct mme_config_s {
uint8_t nb_plmns;
uint16_t *plmn_mcc;
uint16_t *plmn_mnc;
uint16_t *plmn_mnc_len;
uint16_t *plmn_tac;
} gummei;
......
......@@ -26,7 +26,7 @@ typedef struct gtpv1u_enb_create_tunnel_resp_s {
int num_tunnels;
teid_t enb_S1u_teid[GTPV1U_MAX_BEARERS_PER_UE]; ///< Tunnel Endpoint Identifier
ebi_t eps_bearer_id[GTPV1U_MAX_BEARERS_PER_UE];
transport_layer_addr_t enb_addr[GTPV1U_MAX_BEARERS_PER_UE];
transport_layer_addr_t enb_addr;
} gtpv1u_enb_create_tunnel_resp_t;
typedef struct gtpv1u_enb_update_tunnel_req_s {
......
......@@ -47,6 +47,10 @@ typedef boolean_t eNB_flag_t;
#define ENB_FLAG_NO FALSE
#define ENB_FLAG_YES TRUE
typedef boolean_t srb_flag_t;
#define SRB_FLAG_NO FALSE
#define SRB_FLAG_YES TRUE
typedef enum link_direction_e {
UNKNOWN_DIR = 0,
DIR_UPLINK = 1,
......
......@@ -64,6 +64,7 @@ typedef struct RrcConfigurationReq_s {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
paging_drx_t default_drx;
......
......@@ -141,6 +141,7 @@ typedef enum rrc_establishment_cause_e {
typedef struct s1ap_gummei_s {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_len;
uint8_t mme_code;
uint16_t mme_group_id;
} s1ap_gummei_t;
......@@ -193,6 +194,13 @@ typedef struct transport_layer_addr_s {
uint8_t buffer[20];
} transport_layer_addr_t;
#define TRANSPORT_LAYER_ADDR_COPY(dEST,sOURCE) \
do { \
AssertFatal(sOURCE.len <= 20); \
memcpy(dEST.buffer, sOURCE.buffer, sOURCE.len); \
dEST.length = sOURCE.length; \
} while (0)
typedef struct e_rab_level_qos_parameter_s {
uint8_t qci;
......@@ -266,6 +274,7 @@ typedef struct s1ap_register_enb_req_s {
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
/* Default Paging DRX of the eNB as defined in TS 36.304 */
paging_drx_t default_drx;
......
......@@ -87,7 +87,7 @@ static void configure_phy(uint32_t enb_id, const Enb_properties_array_t *enb_pro
/*------------------------------------------------------------------------------*/
static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_properties)
{
MessageDef *msg_p;
MessageDef *msg_p = NULL;
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
......@@ -95,6 +95,7 @@ static void configure_rrc(uint32_t enb_id, const Enb_properties_array_t *enb_pro
RRC_CONFIGURATION_REQ (msg_p).tac = enb_properties->properties[enb_id]->tac;
RRC_CONFIGURATION_REQ (msg_p).mcc = enb_properties->properties[enb_id]->mcc;
RRC_CONFIGURATION_REQ (msg_p).mnc = enb_properties->properties[enb_id]->mnc;
RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length = enb_properties->properties[enb_id]->mnc_digit_length;
RRC_CONFIGURATION_REQ (msg_p).default_drx = enb_properties->properties[enb_id]->default_drx;
RRC_CONFIGURATION_REQ (msg_p).frame_type = enb_properties->properties[enb_id]->frame_type;
RRC_CONFIGURATION_REQ (msg_p).tdd_config = enb_properties->properties[enb_id]->tdd_config;
......@@ -133,13 +134,14 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end, con
s1ap_register_eNB = &S1AP_REGISTER_ENB_REQ(msg_p);
/* Some default/random parameters */
s1ap_register_eNB->eNB_id = enb_properties->properties[enb_id]->eNB_id;
s1ap_register_eNB->cell_type = enb_properties->properties[enb_id]->cell_type;
s1ap_register_eNB->eNB_name = enb_properties->properties[enb_id]->eNB_name;
s1ap_register_eNB->tac = enb_properties->properties[enb_id]->tac;
s1ap_register_eNB->mcc = enb_properties->properties[enb_id]->mcc;
s1ap_register_eNB->mnc = enb_properties->properties[enb_id]->mnc;
s1ap_register_eNB->default_drx = enb_properties->properties[enb_id]->default_drx;
s1ap_register_eNB->eNB_id = enb_properties->properties[enb_id]->eNB_id;
s1ap_register_eNB->cell_type = enb_properties->properties[enb_id]->cell_type;
s1ap_register_eNB->eNB_name = enb_properties->properties[enb_id]->eNB_name;
s1ap_register_eNB->tac = enb_properties->properties[enb_id]->tac;
s1ap_register_eNB->mcc = enb_properties->properties[enb_id]->mcc;
s1ap_register_eNB->mnc = enb_properties->properties[enb_id]->mnc;
s1ap_register_eNB->mnc_digit_length = enb_properties->properties[enb_id]->mnc_digit_length;
s1ap_register_eNB->default_drx = enb_properties->properties[enb_id]->default_drx;
s1ap_register_eNB->nb_mme = enb_properties->properties[enb_id]->nb_mme;
AssertFatal (s1ap_register_eNB->nb_mme <= S1AP_MAX_NB_MME_IP_ADDRESS, "Too many MME for eNB %d (%d/%d)!", enb_id, s1ap_register_eNB->nb_mme, S1AP_MAX_NB_MME_IP_ADDRESS);
......
......@@ -211,10 +211,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
int parse_errors = 0;
long int enb_id = 0;
const char* cell_type = NULL;
long int tac = 0;
const char* tac = 0;
const char* enb_name = NULL;
long int mcc = 0;
long int mnc = 0;
const char* mcc = 0;
const char* mnc = 0;
const char* default_drx = NULL;
const char* frame_type;
long int tdd_config;
......@@ -295,9 +295,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
if( !( config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE, &cell_type)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_ENB_NAME, &enb_name)
&& config_setting_lookup_int (setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac)
&& config_setting_lookup_int (setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc)
&& config_setting_lookup_int (setting_enb, ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, &mnc)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, &mnc)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_DEFAULT_PAGING_DRX, &default_drx)
)
) {
......@@ -320,10 +320,11 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
lib_config_file_name_pP, i, cell_type);
}
enb_properties.properties[enb_properties_index]->eNB_name = strdup(enb_name);
enb_properties.properties[enb_properties_index]->tac = (uint16_t)tac;
enb_properties.properties[enb_properties_index]->mcc = (uint16_t)mcc;
enb_properties.properties[enb_properties_index]->mnc = (uint16_t)mnc;
enb_properties.properties[enb_properties_index]->eNB_name = strdup(enb_name);
enb_properties.properties[enb_properties_index]->tac = (uint16_t)atoi(tac);
enb_properties.properties[enb_properties_index]->mcc = (uint16_t)atoi(mcc);
enb_properties.properties[enb_properties_index]->mnc = (uint16_t)atoi(mnc);
enb_properties.properties[enb_properties_index]->mnc_digit_length = strlen(mnc);
if (strcmp(default_drx, "PAGING_DRX_32") == 0) {
enb_properties.properties[enb_properties_index]->default_drx = PAGING_DRX_32;
......
......@@ -39,6 +39,7 @@ Address : EURECOM,
#ifndef ENB_CONFIG_H_
#define ENB_CONFIG_H_
#include <netinet/in.h>
#include "commonDef.h"
#include "PHY/impl_defs_lte.h"
......@@ -88,6 +89,7 @@ typedef struct Enb_properties_s {
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
/* Default Paging DRX of the eNB as defined in TS 36.304 */
paging_drx_t default_drx;
......@@ -107,10 +109,10 @@ typedef struct Enb_properties_s {
mme_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
char *enb_interface_name_for_S1U;
uint32_t enb_ipv4_address_for_S1U;
in_addr_t enb_ipv4_address_for_S1U;
char *enb_interface_name_for_S1_MME;
uint32_t enb_ipv4_address_for_S1_MME;
in_addr_t enb_ipv4_address_for_S1_MME;
} Enb_properties_t;
......
......@@ -85,11 +85,7 @@
#define DCCH 1 // srb1
#define DCCH1 2 // srb2
#ifdef EXMIMO_IOT
#define DTCH 5 // DTCH + lcid < 11
#else
#define DTCH 3
#endif
#define DTCH 3 // LCID
#define MCCH 4 // MCCH
#define MTCH 1 // MTCH
......
......@@ -704,13 +704,13 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
DRB_config = CALLOC(1, sizeof(*DRB_config));
DRB_config->eps_BearerIdentity = CALLOC(1, sizeof(long));
*(DRB_config->eps_BearerIdentity) = 5L; // LW set to first value, allowed value 5..15
*(DRB_config->eps_BearerIdentity) = 5L; // LW set to first value, allowed value 5..15, value : x+4
// DRB_config->drb_Identity = (DRB_Identity_t) 1; //allowed values 1..32
// NN: this is the 1st DRB for this ue, so set it to 1
// NN: this is the 1st DRB for this ue, so set it to 1
DRB_config->drb_Identity = (DRB_Identity_t) 1; // (ue_mod_idP+1); //allowed values 1..32
DRB_config->drb_Identity = (DRB_Identity_t) 1; // (ue_mod_idP+1); //allowed values 1..32, value: x
DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long));
*(DRB_config->logicalChannelIdentity) = (long)5;
*(DRB_config->logicalChannelIdentity) = (long)3; // value : x+2
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
DRB_config->rlc_Config = DRB_rlc_config;
......
......@@ -70,7 +70,7 @@ int rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(MessageDef *msg_pP, const char *ms
i,
GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).eps_bearer_id[i]);
eNB_rrc_inst[instanceP].Info.UE[ue_index].enb_gtp_teid[i] = GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).enb_S1u_teid[i];
eNB_rrc_inst[instanceP].Info.UE[ue_index].enb_gtp_addrs[i] = GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).enb_addr[i];
eNB_rrc_inst[instanceP].Info.UE[ue_index].enb_gtp_addrs[i] = GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).enb_addr;
eNB_rrc_inst[instanceP].Info.UE[ue_index].enb_gtp_ebi[i] = GTPV1U_ENB_CREATE_TUNNEL_RESP(msg_pP).eps_bearer_id[i];
}
LOG_D(RRC, "[eNB] RX %s END\n");
......
......@@ -7,9 +7,9 @@ eNBs =
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_0";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
mobile_country_code = 208;
mobile_network_code = 10;
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "10";
#10;
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
......
......@@ -55,7 +55,7 @@ MME :
# MME code DEFAULT = 0
# size = 8 bits
# maximum of 256 values, comma separated
MME_CODE = [ 30 , 56 , 1 , 8 ];
MME_CODE = [ 30 , 31, 32, 33, 34, 35, 36, 56 , 1 , 8 ];
# MME GROUP ID DEFAULT = 0
# size = 16 bits
......@@ -66,9 +66,10 @@ MME :
# max values = 999.999:65535
# maximum of 32 values, comma separated
PLMN = (
{MCC=208 ; MNC=10; TAC = 1; },
{MCC=209 ; MNC=130; TAC = 4; },
{MCC=208 ; MNC=35; TAC = 8; }
{MCC="208" ; MNC="10"; TAC = "1"; },
{MCC="209" ; MNC="130"; TAC = "4"; },
{MCC="209" ; MNC="012"; TAC = "2"; },
{MCC="208" ; MNC="35"; TAC = "8"; }
);
};
......
//Active_eNBs = ( "eNB_Eurecom_0", "eNB_Eurecom_1", "eNB_Eurecom_2", "eNB_Eurecom_3");
Active_eNBs = ( "eNB_Eurecom_LTEBox");
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
////////// Physical parameters:
frame_type = "FDD";
prefix_type = "NORMAL";
downlink_frequency = 2680000000;
uplink_frequency_offset = -120000000;
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.13.11";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
},
{ ipv4 = "192.168.13.11";
ipv6 = "2192:168:30::18";
active = "no";
preference = "ipv4";
}
);
},
{
////////// Identification parameters:
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_1";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
////////// Physical parameters:
frame_type = "FDD";
prefix_type = "NORMAL";
downlink_frequency = 2680000000;
uplink_frequency_offset = -120000000;
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
},
{ ipv4 = "192.168.12.86";
ipv6 = "2192:168:30::18";
active = "no";
preference = "ipv4";
}
);
},
{
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_2";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
},
{
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_3";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
}
);
Active_eNBs = ( "eNB_Eurecom_0", "eNB_Eurecom_1", "eNB_Eurecom_2", "eNB_Eurecom_3");
//Active_eNBs = ( "eNB_Eurecom_0");
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_0";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
////////// Physical parameters:
frame_type = "FDD";
prefix_type = "NORMAL";
downlink_frequency = 2680000000;
uplink_frequency_offset = -120000000;
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
},
{ ipv4 = "192.168.12.86";
ipv6 = "2192:168:30::18";
active = "no";
preference = "ipv4";
}
);
},
{
////////// Identification parameters:
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_1";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
////////// Physical parameters:
frame_type = "FDD";
prefix_type = "NORMAL";
downlink_frequency = 2680000000;
uplink_frequency_offset = -120000000;
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
},
{ ipv4 = "192.168.12.86";
ipv6 = "2192:168:30::18";
active = "no";
preference = "ipv4";
}
);
},
{
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_2";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
},
{
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_3";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
}
);
......@@ -65,9 +65,9 @@ MME :
# max values = 999.999:65535
# maximum of 32 values, comma separated
PLMN = (
{MCC=208 ; MNC=10; TAC = 1; },
{MCC=209 ; MNC=130; TAC = 4; },
{MCC=208 ; MNC=92; TAC = 1; }
{MCC="208" ; MNC="10"; TAC = "1"; },
{MCC="209" ; MNC="130"; TAC = "4"; },
{MCC="208" ; MNC="92"; TAC = "1"; }
);
};
......
......@@ -55,9 +55,9 @@ MME :
# max values = 999.999:65535
# maximum of 32 values, comma separated
PLMN = (
{MCC=208 ; MNC=10; TAC = 1; },
{MCC=209 ; MNC=130; TAC = 4; },
{MCC=208 ; MNC=35; TAC = 8; }
{MCC="208" ; MNC="10"; TAC = "1"; },
{MCC="209" ; MNC="130"; TAC = "4"; },
{MCC="208" ; MNC="35"; TAC = "8"; }
);
};
......
......@@ -65,9 +65,9 @@ MME :
# max values = 999.999:65535
# maximum of 32 values, comma separated
PLMN = (
{MCC=208 ; MNC=10; TAC = 1; },
{MCC=209 ; MNC=130; TAC = 4; },
{MCC=208 ; MNC=35; TAC = 8; }
{MCC="208" ; MNC="10"; TAC = "1"; },
{MCC="209" ; MNC="130"; TAC = "4"; },
{MCC="208" ; MNC="35"; TAC = "8"; }
);
};
......
......@@ -55,9 +55,9 @@ MME :
# max values = 999.999:65535
# maximum of 32 values, comma separated
PLMN = (
{MCC=208 ; MNC=38; TAC = 0; },
{MCC=209 ; MNC=130; TAC = 4; },
{MCC=208 ; MNC=35; TAC = 8; }
{MCC="208" ; MNC="38"; TAC = "1"; },
{MCC="209" ; MNC="130"; TAC = "4"; },
{MCC="208" ; MNC="35"; TAC = "8"; }
);
};
......
......@@ -233,11 +233,12 @@ echo "Bringup UE interface"
pkill oaisim
bash_exec "rmmod $IP_DRIVER_NAME" > /dev/null 2>&1
#bash_exec "make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET "
make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET -j`grep -c ^processor /proc/cpuinfo ` || exit 1
cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET ....." $green
#bash_exec "make --directory=$OPENAIR2_DIR $MAKE_IP_DRIVER_TARGET "
make --directory=$OPENAIR2_DIR $MAKE_IP_DRIVER_TARGET || exit 1
#bash_exec "make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET "
make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET -j`grep -c ^processor /proc/cpuinfo ` || exit 1
bash_exec "insmod $OPENAIR2_DIR/NETWORK_DRIVER/UE_IP/$IP_DRIVER_NAME.ko"
......@@ -275,6 +276,6 @@ rotate_log_file $STDOUT_LOG_FILE
nohup xterm -e $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/UserProcess &
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -u1 -l7 -K $ITTI_LOG_FILE --enb-conf $CONFIG_FILE_ENB 2>&1 | tee $STDOUT_LOG_FILE
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -u1 -l7 -K $ITTI_LOG_FILE --enb-conf $CONFIG_FILE_ENB 2>&1 | tee $STDOUT_LOG_FILE
......@@ -175,9 +175,9 @@ else
fi
if [ ! -f $OBJ_DIR/Makefile ]
then
echo_success "Invoking autogen"
bash_exec "./autogen.sh"
cd ./$OBJ_DIR
#echo_success "Invoking autogen"
#bash_exec "./autogen.sh"
#cd ./$OBJ_DIR
echo_success "Invoking configure"
../configure --enable-standalone-epc --enable-raw-socket-for-sgi LDFLAGS=-L/usr/local/lib
else
......
......@@ -262,6 +262,7 @@ assert() {
fi
}
test_command_install_lib() {
# usage: test_command_install_package searched_binary package_to_be_installed_if_binary_not_found optional_option_to_apt_get_install
if [ ! -f $1 ]; then
......@@ -393,6 +394,9 @@ is_real_interface() {
if [ "a$var" == "a" ]; then
return 0
fi
if [ "a$var" == "anone" ]; then
return 0
fi
IF=`cat /etc/udev/rules.d/70-persistent-net.rules | grep $var | sed 's/^.*NAME=//' | tr -d '"'`
if [ "$IF" == "$var" ]; then
if [ "a${var:0:3}" != "aeth" ]; then
......
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