Commit b3829736 authored by Lionel Gauthier's avatar Lionel Gauthier

For EPC, tested scenario is IMSI attach with EURECOM NAS UE, (not GUTI)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5282 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 72fd579b
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
// Messages files used between tasks // Messages files used between tasks
#include "gtpv1_u_messages_def.h" #include "gtpv1_u_messages_def.h"
#include "ip_forward_messages_def.h" #include "ip_forward_messages_def.h"
#include "mme_app_messages_def.h"
#include "nas_messages_def.h" #include "nas_messages_def.h"
#include "s11_messages_def.h" #include "s11_messages_def.h"
#include "s1ap_messages_def.h" #include "s1ap_messages_def.h"
...@@ -13,3 +12,4 @@ ...@@ -13,3 +12,4 @@
#include "sctp_messages_def.h" #include "sctp_messages_def.h"
#include "sgw_lite_def.h" #include "sgw_lite_def.h"
#include "udp_messages_def.h" #include "udp_messages_def.h"
#include "mme_app_messages_def.h"
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "gtpv1_u_messages_types.h" #include "gtpv1_u_messages_types.h"
#include "ip_forward_messages_types.h" #include "ip_forward_messages_types.h"
#include "mme_app_messages_types.h"
#include "s11_messages_types.h" #include "s11_messages_types.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "nas_messages_types.h" #include "nas_messages_types.h"
...@@ -23,5 +22,6 @@ ...@@ -23,5 +22,6 @@
#include "sctp_messages_types.h" #include "sctp_messages_types.h"
#include "sgw_lite_messages_types.h" #include "sgw_lite_messages_types.h"
#include "udp_messages_types.h" #include "udp_messages_types.h"
#include "mme_app_messages_types.h"
#endif /* MESSAGES_TYPES_H_ */ #endif /* MESSAGES_TYPES_H_ */
//WARNING: Do not include this header directly. Use intertask_interface.h instead. //WARNING: Do not include this header directly. Use intertask_interface.h instead.
MESSAGE_DEF(MME_APP_CONNECTION_ESTABLISHMENT_IND , MESSAGE_PRIORITY_MED, mme_app_connection_establishment_ind_t , mme_app_connection_establishment_ind)
MESSAGE_DEF(MME_APP_CONNECTION_ESTABLISHMENT_CNF , MESSAGE_PRIORITY_MED, mme_app_connection_establishment_cnf_t , mme_app_connection_establishment_cnf)
MESSAGE_DEF(MME_APP_INITIAL_CONTEXT_SETUP_RSP , MESSAGE_PRIORITY_MED, mme_app_initial_context_setup_rsp_t , mme_app_initial_context_setup_rsp)
...@@ -2,5 +2,38 @@ ...@@ -2,5 +2,38 @@
#define MME_APP_MESSAGES_TYPES_H_ #define MME_APP_MESSAGES_TYPES_H_
#define MME_APP_CONNECTION_ESTABLISHMENT_IND(mSGpTR) (mSGpTR)->ittiMsg.mme_app_connection_establishment_ind
#define MME_APP_CONNECTION_ESTABLISHMENT_CNF(mSGpTR) (mSGpTR)->ittiMsg.mme_app_connection_establishment_cnf
#define MME_APP_INITIAL_CONTEXT_SETUP_RSP(mSGpTR) (mSGpTR)->ittiMsg.mme_app_initial_context_setup_rsp
typedef struct mme_app_connection_establishment_ind_s {
uint32_t mme_ue_s1ap_id;
nas_establish_ind_t nas;
/* Transparent message from s1ap to be forwarded to MME_APP or
* to S1AP if connection establishment is rejected by NAS.
*/
s1ap_initial_ue_message_t transparent;
} mme_app_connection_establishment_ind_t;
typedef struct mme_app_connection_establishment_cnf_s {
ebi_t eps_bearer_id;
FTeid_t bearer_s1u_sgw_fteid;
qci_t bearer_qos_qci;
priority_level_t bearer_qos_prio_level;
pre_emp_vulnerability_t bearer_qos_pre_emp_vulnerability;
pre_emp_capability_t bearer_qos_pre_emp_capability;
ambr_t ambr;
nas_conn_est_cnf_t nas_conn_est_cnf;
} mme_app_connection_establishment_cnf_t;
typedef struct mme_app_initial_context_setup_rsp_s {
uint32_t mme_ue_s1ap_id;
ebi_t eps_bearer_id;
FTeid_t bearer_s1u_enb_fteid;
} mme_app_initial_context_setup_rsp_t;
#endif /* MME_APP_MESSAGES_TYPES_H_ */ #endif /* MME_APP_MESSAGES_TYPES_H_ */
...@@ -35,7 +35,8 @@ MESSAGE_DEF(NAS_RAB_RELEASE_REQ, MESSAGE_PRIORITY_MED, nas_rab_ ...@@ -35,7 +35,8 @@ MESSAGE_DEF(NAS_RAB_RELEASE_REQ, MESSAGE_PRIORITY_MED, nas_rab_
MESSAGE_DEF(NAS_AUTHENTICATION_PARAM_REQ, MESSAGE_PRIORITY_MED, nas_auth_param_req_t, nas_auth_param_req) MESSAGE_DEF(NAS_AUTHENTICATION_PARAM_REQ, MESSAGE_PRIORITY_MED, nas_auth_param_req_t, nas_auth_param_req)
/* MME app -> NAS layer messages */ /* MME app -> NAS layer messages */
MESSAGE_DEF(NAS_BEARER_PARAM, MESSAGE_PRIORITY_MED, nas_bearer_param_t, nas_bearer_param) MESSAGE_DEF(NAS_PDN_CONNECTIVITY_RSP, MESSAGE_PRIORITY_MED, nas_pdn_connectivity_rsp_t, nas_pdn_connectivity_rsp)
MESSAGE_DEF(NAS_PDN_CONNECTIVITY_FAIL, MESSAGE_PRIORITY_MED, nas_pdn_connectivity_fail_t, nas_pdn_connectivity_fail)
MESSAGE_DEF(NAS_AUTHENTICATION_PARAM_RSP, MESSAGE_PRIORITY_MED, nas_auth_param_rsp_t, nas_auth_param_rsp) MESSAGE_DEF(NAS_AUTHENTICATION_PARAM_RSP, MESSAGE_PRIORITY_MED, nas_auth_param_rsp_t, nas_auth_param_rsp)
MESSAGE_DEF(NAS_AUTHENTICATION_PARAM_FAIL, MESSAGE_PRIORITY_MED, nas_auth_param_fail_t, nas_auth_param_fail) MESSAGE_DEF(NAS_AUTHENTICATION_PARAM_FAIL, MESSAGE_PRIORITY_MED, nas_auth_param_fail_t, nas_auth_param_fail)
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#define NAS_DL_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_req #define NAS_DL_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_req
#define NAS_DL_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_cnf #define NAS_DL_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_cnf
#define NAS_PDN_CONNECTIVITY_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_pdn_connectivity_req #define NAS_PDN_CONNECTIVITY_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_pdn_connectivity_req
#define NAS_PDN_CONNECTIVITY_RSP(mSGpTR) (mSGpTR)->ittiMsg.nas_pdn_connectivity_rsp
#define NAS_PDN_CONNECTIVITY_FAIL(mSGpTR) (mSGpTR)->ittiMsg.nas_pdn_connectivity_fail
#define NAS_CONN_EST_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_est_ind #define NAS_CONN_EST_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_est_ind
#define NAS_CONNECTION_ESTABLISHMENT_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_est_cnf #define NAS_CONNECTION_ESTABLISHMENT_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_est_cnf
#define NAS_BEARER_PARAM(mSGpTR) (mSGpTR)->ittiMsg.nas_bearer_param #define NAS_BEARER_PARAM(mSGpTR) (mSGpTR)->ittiMsg.nas_bearer_param
...@@ -34,6 +36,8 @@ ...@@ -34,6 +36,8 @@
#define NAS_DATA_LENGHT_MAX 256 #define NAS_DATA_LENGHT_MAX 256
typedef enum { typedef enum {
EMM_MSG_HEADER = 1, EMM_MSG_HEADER = 1,
EMM_MSG_ATTACH_REQUEST, EMM_MSG_ATTACH_REQUEST,
...@@ -67,6 +71,8 @@ typedef enum { ...@@ -67,6 +71,8 @@ typedef enum {
EMM_MSG_CS_SERVICE_NOTIFICATION, EMM_MSG_CS_SERVICE_NOTIFICATION,
} emm_message_ids_t; } emm_message_ids_t;
typedef enum { typedef enum {
ESM_MSG_HEADER = 1, ESM_MSG_HEADER = 1,
ESM_MSG_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST, ESM_MSG_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST,
...@@ -93,50 +99,103 @@ typedef enum { ...@@ -93,50 +99,103 @@ typedef enum {
ESM_MSG_ESM_STATUS, ESM_MSG_ESM_STATUS,
} esm_message_ids_t; } esm_message_ids_t;
typedef struct nas_raw_msg_s { typedef struct nas_raw_msg_s {
uint32_t lenght; uint32_t lenght;
uint8_t data[NAS_DATA_LENGHT_MAX]; uint8_t data[NAS_DATA_LENGHT_MAX];
} nas_raw_msg_t; } nas_raw_msg_t;
typedef struct nas_emm_plain_msg_s { typedef struct nas_emm_plain_msg_s {
emm_message_ids_t present; emm_message_ids_t present;
EMM_msg choice; EMM_msg choice;
} nas_emm_plain_msg_t; } nas_emm_plain_msg_t;
typedef struct nas_emm_protected_msg_s { typedef struct nas_emm_protected_msg_s {
nas_message_security_header_t header; nas_message_security_header_t header;
emm_message_ids_t present; emm_message_ids_t present;
EMM_msg choice; EMM_msg choice;
} nas_emm_protected_msg_t; } nas_emm_protected_msg_t;
typedef struct nas_esm_plain_msg_s { typedef struct nas_esm_plain_msg_s {
esm_message_ids_t present; esm_message_ids_t present;
ESM_msg choice; ESM_msg choice;
} nas_esm_plain_msg_t; } nas_esm_plain_msg_t;
typedef struct nas_esm_protected_msg_s { typedef struct nas_esm_protected_msg_s {
nas_message_security_header_t header; nas_message_security_header_t header;
esm_message_ids_t present; esm_message_ids_t present;
ESM_msg choice; ESM_msg choice;
} nas_esm_protected_msg_t; } nas_esm_protected_msg_t;
typedef struct nas_paging_ind_s { typedef struct nas_paging_ind_s {
} nas_paging_ind_t; } nas_paging_ind_t;
typedef struct nas_pdn_connectivity_req_s { typedef struct nas_pdn_connectivity_req_s {
int pti; // nas ref Identity of the procedure transaction executed to activate the PDN connection entry
unsigned ue_id; // nas ref
char imsi[16]; char imsi[16];
uint8_t imsi_length; uint8_t imsi_length;
network_qos_t qos;
OctetString apn; OctetString apn;
OctetString pdn_addr; OctetString pdn_addr;
int mme_pdn_index; int pdn_type;
network_qos_t esm_qos; void *proc_data;
int is_emergency; int request_type;
} nas_pdn_connectivity_req_t; } nas_pdn_connectivity_req_t;
typedef struct nas_pdn_connectivity_rsp_s {
int pti; // nas ref Identity of the procedure transaction executed to activate the PDN connection entry
unsigned ue_id; // nas ref
network_qos_t qos;
OctetString apn;
OctetString pdn_addr;
int pdn_type;
void *proc_data;
int request_type;
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
/* Key eNB */
uint8_t keNB[32];
ambr_t ambr;
ambr_t apn_ambr;
/* EPS bearer ID */
unsigned ebi:4;
/* QoS */
qci_t qci;
priority_level_t prio_level;
pre_emp_vulnerability_t pre_emp_vulnerability;
pre_emp_capability_t pre_emp_capability;
/* S-GW TEID for user-plane */
Teid_t sgw_s1u_teid;
/* S-GW IP address for User-Plane */
ip_address_t sgw_s1u_address;
} nas_pdn_connectivity_rsp_t;
typedef struct nas_pdn_connectivity_fail_s {
unsigned ue_id; // nas ref
} nas_pdn_connectivity_fail_t;
typedef struct nas_conn_est_ind_s { typedef struct nas_conn_est_ind_s {
nas_establish_ind_t nas; nas_establish_ind_t nas;
...@@ -146,8 +205,10 @@ typedef struct nas_conn_est_ind_s { ...@@ -146,8 +205,10 @@ typedef struct nas_conn_est_ind_s {
s1ap_initial_ue_message_t transparent; s1ap_initial_ue_message_t transparent;
} nas_conn_est_ind_t; } nas_conn_est_ind_t;
typedef nas_establish_rsp_t nas_conn_est_rej_t; typedef nas_establish_rsp_t nas_conn_est_rej_t;
#if defined(DISABLE_USE_NAS) #if defined(DISABLE_USE_NAS)
typedef struct nas_conn_est_cnf_s { typedef struct nas_conn_est_cnf_s {
uint32_t ue_id; uint32_t ue_id;
...@@ -160,40 +221,16 @@ typedef struct nas_conn_est_cnf_s { ...@@ -160,40 +221,16 @@ typedef struct nas_conn_est_cnf_s {
typedef nas_establish_cnf_t nas_conn_est_cnf_t; typedef nas_establish_cnf_t nas_conn_est_cnf_t;
#endif #endif
typedef struct nas_bearer_param_s {
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
/* Key eNB */
uint8_t keNB[32];
ambr_t ambr;
ambr_t apn_ambr;
/* EPS bearer ID */
unsigned ebi:4;
/* QoS */
qci_t qci;
priority_level_t prio_level;
pre_emp_vulnerability_t pre_emp_vulnerability;
pre_emp_capability_t pre_emp_capability;
/* S-GW TEID for user-plane */
uint32_t sgw_s1u_teid;
/* S-GW IP address for User-Plane */
ip_address_t sgw_s1u_address;
} nas_bearer_param_t;
typedef struct nas_conn_rel_ind_s { typedef struct nas_conn_rel_ind_s {
} nas_conn_rel_ind_t; } nas_conn_rel_ind_t;
typedef ul_info_transfer_ind_t nas_ul_data_ind_t; typedef ul_info_transfer_ind_t nas_ul_data_ind_t;
typedef dl_info_transfer_req_t nas_dl_data_req_t; typedef dl_info_transfer_req_t nas_dl_data_req_t;
typedef dl_info_transfer_cnf_t nas_dl_data_cnf_t; typedef dl_info_transfer_cnf_t nas_dl_data_cnf_t;
typedef struct nas_non_del_ind_s { typedef struct nas_non_del_ind_s {
} nas_non_del_ind_t; } nas_non_del_ind_t;
...@@ -202,14 +239,17 @@ typedef struct nas_rab_est_req_s { ...@@ -202,14 +239,17 @@ typedef struct nas_rab_est_req_s {
} nas_rab_est_req_t; } nas_rab_est_req_t;
typedef struct nas_rab_est_rsp_s { typedef struct nas_rab_est_rsp_s {
} nas_rab_est_rsp_t; } nas_rab_est_rsp_t;
typedef struct nas_rab_rel_req_s { typedef struct nas_rab_rel_req_s {
} nas_rab_rel_req_t; } nas_rab_rel_req_t;
typedef struct nas_attach_req_s { typedef struct nas_attach_req_s {
/* TODO: Set the correct size */ /* TODO: Set the correct size */
char apn[100]; char apn[100];
...@@ -219,6 +259,7 @@ typedef struct nas_attach_req_s { ...@@ -219,6 +259,7 @@ typedef struct nas_attach_req_s {
s1ap_initial_ue_message_t transparent; s1ap_initial_ue_message_t transparent;
} nas_attach_req_t; } nas_attach_req_t;
typedef struct nas_auth_req_s { typedef struct nas_auth_req_s {
/* UE imsi */ /* UE imsi */
char imsi[16]; char imsi[16];
...@@ -229,6 +270,7 @@ typedef struct nas_auth_req_s { ...@@ -229,6 +270,7 @@ typedef struct nas_auth_req_s {
int cause; int cause;
} nas_auth_req_t; } nas_auth_req_t;
typedef struct nas_auth_resp_s { typedef struct nas_auth_resp_s {
char imsi[16]; char imsi[16];
} nas_auth_resp_t; } nas_auth_resp_t;
...@@ -248,6 +290,7 @@ typedef struct nas_auth_param_req_s { ...@@ -248,6 +290,7 @@ typedef struct nas_auth_param_req_s {
uint8_t auts[14]; uint8_t auts[14];
} nas_auth_param_req_t; } nas_auth_param_req_t;
typedef struct nas_auth_param_rsp_s { typedef struct nas_auth_param_rsp_s {
/* UE identifier */ /* UE identifier */
uint32_t ue_id; uint32_t ue_id;
...@@ -267,6 +310,7 @@ typedef struct nas_auth_param_fail_s { ...@@ -267,6 +310,7 @@ typedef struct nas_auth_param_fail_s {
nas_cause_t cause; nas_cause_t cause;
} nas_auth_param_fail_t; } nas_auth_param_fail_t;
#if defined(DISABLE_USE_NAS) #if defined(DISABLE_USE_NAS)
typedef struct nas_attach_accept_s { typedef struct nas_attach_accept_s {
s1ap_initial_ctxt_setup_req_t transparent; s1ap_initial_ctxt_setup_req_t transparent;
......
...@@ -30,7 +30,7 @@ typedef struct s1ap_initial_ctxt_setup_req_s { ...@@ -30,7 +30,7 @@ typedef struct s1ap_initial_ctxt_setup_req_s {
pre_emp_capability_t pre_emp_capability; pre_emp_capability_t pre_emp_capability;
/* S-GW TEID for user-plane */ /* S-GW TEID for user-plane */
uint32_t teid; Teid_t teid;
/* S-GW IP address for User-Plane */ /* S-GW IP address for User-Plane */
ip_address_t s_gw_address; ip_address_t s_gw_address;
} s1ap_initial_ctxt_setup_req_t; } s1ap_initial_ctxt_setup_req_t;
......
...@@ -5,23 +5,37 @@ ...@@ -5,23 +5,37 @@
typedef struct s6a_update_location_req_s { typedef struct s6a_update_location_req_s {
#define SKIP_SUBSCRIBER_DATA (0x1) #define SKIP_SUBSCRIBER_DATA (0x1)
unsigned skip_subsriber_data:1; unsigned skip_subscriber_data:1;
#define INITIAL_ATTACH (0x1) #define INITIAL_ATTACH (0x1)
unsigned initial_attach:1; unsigned initial_attach:1;
char imsi[IMSI_DIGITS_MAX + 1]; char imsi[IMSI_DIGITS_MAX + 1]; // username
uint8_t imsi_length; uint8_t imsi_length; // username
plmn_t visited_plmn;
rat_type_t rat_type; plmn_t visited_plmn; // visited plmn id
rat_type_t rat_type; // rat type
// missing // origin host
// missing // origin realm
// missing // destination host
// missing // destination realm
} s6a_update_location_req_t; } s6a_update_location_req_t;
typedef struct s6a_update_location_ans_s { typedef struct s6a_update_location_ans_s {
s6a_result_t result; // Result of the update location request procedure
subscription_data_t subscription_data; // subscriber status,
// Maximum Requested Bandwidth Uplink, downlink
// access restriction data
// msisdn
apn_config_profile_t apn_config_profile;// APN configuration profile
network_access_mode_t access_mode;
rau_tau_timer_t rau_tau_timer;
char imsi[IMSI_DIGITS_MAX + 1]; char imsi[IMSI_DIGITS_MAX + 1];
uint8_t imsi_length; uint8_t imsi_length;
/* Result of the update location request procedure */
s6a_result_t result;
subscription_data_t subscription_data;
} s6a_update_location_ans_t; } s6a_update_location_ans_t;
typedef struct s6a_auth_info_req_s { typedef struct s6a_auth_info_req_s {
......
This diff is collapsed.
...@@ -535,6 +535,9 @@ static int gtpv1u_create_s1u_tunnel(gtpv1u_enb_create_tunnel_req_t *create_tunne ...@@ -535,6 +535,9 @@ static int gtpv1u_create_s1u_tunnel(gtpv1u_enb_create_tunnel_req_t *create_tunne
int i; int i;
ebi_t eps_bearer_id = 0; ebi_t eps_bearer_id = 0;
int ipv4_addr = 0; int ipv4_addr = 0;
int ip_offset = 0;
in_addr_t in_addr;
int addrs_length_in_bytes= 0;
message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_ENB_CREATE_TUNNEL_RESP); message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_ENB_CREATE_TUNNEL_RESP);
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).ue_index = create_tunnel_req_pP->ue_index; GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).ue_index = create_tunnel_req_pP->ue_index;
...@@ -542,6 +545,7 @@ static int gtpv1u_create_s1u_tunnel(gtpv1u_enb_create_tunnel_req_t *create_tunne ...@@ -542,6 +545,7 @@ static int gtpv1u_create_s1u_tunnel(gtpv1u_enb_create_tunnel_req_t *create_tunne
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).num_tunnels = 0; GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).num_tunnels = 0;
for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) { for (i = 0; i < create_tunnel_req_pP->num_tunnels; i++) {
ip_offset = 0;
eps_bearer_id = create_tunnel_req_pP->eps_bearer_id[i]; eps_bearer_id = create_tunnel_req_pP->eps_bearer_id[i];
GTPU_DEBUG("Rx GTPV1U_ENB_CREATE_TUNNEL_REQ ue_index %u eps bearer id %u\n", GTPU_DEBUG("Rx GTPV1U_ENB_CREATE_TUNNEL_REQ ue_index %u eps bearer id %u\n",
create_tunnel_req_pP->ue_index, eps_bearer_id); create_tunnel_req_pP->ue_index, eps_bearer_id);
...@@ -564,36 +568,44 @@ static int gtpv1u_create_s1u_tunnel(gtpv1u_enb_create_tunnel_req_t *create_tunne ...@@ -564,36 +568,44 @@ static int gtpv1u_create_s1u_tunnel(gtpv1u_enb_create_tunnel_req_t *create_tunne
// PDCP->GTPV1U mapping // PDCP->GTPV1U mapping
//----------------------- //-----------------------
hash_rc = hashtable_get(gtpv1u_data_g.ue_mapping, create_tunnel_req_pP->ue_index, (void **)&gtpv1u_ue_data_p); hash_rc = hashtable_get(gtpv1u_data_g.ue_mapping, create_tunnel_req_pP->ue_index, (void **)&gtpv1u_ue_data_p);
if ((hash_rc == HASH_TABLE_KEY_NOT_EXISTS) || (hash_rc == HASH_TABLE_OK)) {
if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) { if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
gtpv1u_ue_data_p = calloc (1, sizeof(gtpv1u_ue_data_t)); gtpv1u_ue_data_p = calloc (1, sizeof(gtpv1u_ue_data_t));
gtpv1u_ue_data_p->ue_id = create_tunnel_req_pP->ue_index;
gtpv1u_ue_data_p->instance_id = 0; // TO DO
memcpy(&GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.buffer,
&gtpv1u_data_g.enb_ip_address_for_S1u_S12_S4_up,
sizeof (in_addr_t));
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.length = sizeof (in_addr_t);
AssertFatal(create_tunnel_req_pP->sgw_addr[i].length == 4, "Bad transport layer address for next operation, TO DO");
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].sgw_ip_addr = *((in_addr_t*)create_tunnel_req_pP->sgw_addr[i].buffer);
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].state = BEARER_IN_CONFIG;
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB = s1u_teid;
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_sgw = create_tunnel_req_pP->sgw_S1u_teid[i];
hash_rc = hashtable_insert(gtpv1u_data_g.ue_mapping, create_tunnel_req_pP->ue_index, gtpv1u_ue_data_p); hash_rc = hashtable_insert(gtpv1u_data_g.ue_mapping, create_tunnel_req_pP->ue_index, gtpv1u_ue_data_p);
AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting ue_mapping in GTPV1U hashtable"); AssertFatal(hash_rc == HASH_TABLE_OK, "Error inserting ue_mapping in GTPV1U hashtable");
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = s1u_teid; }
} else if (hash_rc == HASH_TABLE_OK) {
gtpv1u_ue_data_p->ue_id = create_tunnel_req_pP->ue_index; gtpv1u_ue_data_p->ue_id = create_tunnel_req_pP->ue_index;
gtpv1u_ue_data_p->instance_id = 0; // TO DO gtpv1u_ue_data_p->instance_id = 0; // TO DO
memcpy(&GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.buffer, memcpy(&GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.buffer,
&gtpv1u_data_g.enb_ip_address_for_S1u_S12_S4_up, &gtpv1u_data_g.enb_ip_address_for_S1u_S12_S4_up,
sizeof (in_addr_t)); sizeof (in_addr_t));
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.length = sizeof (in_addr_t); GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_addr.length = sizeof (in_addr_t);
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].sgw_ip_addr = *((in_addr_t*)create_tunnel_req_pP->sgw_addr[i].buffer);
addrs_length_in_bytes = create_tunnel_req_pP->sgw_addr[i].length / 8;
AssertFatal((addrs_length_in_bytes == 4) ||
(addrs_length_in_bytes == 16) ||
(addrs_length_in_bytes == 20),
"Bad transport layer address length %d (bits) %d (bytes)",
create_tunnel_req_pP->sgw_addr[i].length, addrs_length_in_bytes);
if ((addrs_length_in_bytes == 4) ||
(addrs_length_in_bytes == 20)) {
in_addr = *((in_addr_t*)create_tunnel_req_pP->sgw_addr[i].buffer);
ip_offset = 4;
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].sgw_ip_addr = in_addr;
}
if ((addrs_length_in_bytes == 16) ||
(addrs_length_in_bytes == 20)) {
memcpy(gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].sgw_ip6_addr.s6_addr,
&create_tunnel_req_pP->sgw_addr[i].buffer[ip_offset],
16);
}
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].state = BEARER_IN_CONFIG; gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].state = BEARER_IN_CONFIG;
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB = s1u_teid; gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_eNB = s1u_teid;
gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_sgw = create_tunnel_req_pP->sgw_S1u_teid[i]; gtpv1u_ue_data_p->bearers[eps_bearer_id - GTPV1U_BEARER_OFFSET].teid_sgw = create_tunnel_req_pP->sgw_S1u_teid[i];
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = s1u_teid; GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = s1u_teid;
} else { } else {
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = 0; GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = 0;
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0xFF; GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0xFF;
......
...@@ -71,6 +71,7 @@ typedef struct gtpv1u_bearer_s { ...@@ -71,6 +71,7 @@ typedef struct gtpv1u_bearer_s {
teid_t teid_eNB; ///< eNB TEID teid_t teid_eNB; ///< eNB TEID
teid_t teid_sgw; ///< Remote TEID teid_t teid_sgw; ///< Remote TEID
in_addr_t sgw_ip_addr; in_addr_t sgw_ip_addr;
struct in6_addr sgw_ip6_addr;
tcp_udp_port_t port; tcp_udp_port_t port;
//NwGtpv1uStackSessionHandleT stack_session; //NwGtpv1uStackSessionHandleT stack_session;
bearer_state_t state; bearer_state_t state;
......
...@@ -167,13 +167,15 @@ NwGtpv1uRcT gtpv1u_process_stack_req( ...@@ -167,13 +167,15 @@ NwGtpv1uRcT gtpv1u_process_stack_req(
data_ind_p->local_S1u_teid = pUlpApi->apiInfo.recvMsgInfo.teid; data_ind_p->local_S1u_teid = pUlpApi->apiInfo.recvMsgInfo.teid;
if (data_ind_p->buffer == NULL) { if (data_ind_p->buffer == NULL) {
GTPU_ERROR("Failed to allocate new buffer\n"); GTPU_ERROR("Failed to allocate new buffer\n");
free(message_p); itti_free(ITTI_MSG_ORIGIN_ID(message_p), message_p);
message_p = NULL;
} else { } else {
memcpy(data_ind_p->buffer, buffer, buffer_len); memcpy(data_ind_p->buffer, buffer, buffer_len);
data_ind_p->length = buffer_len; data_ind_p->length = buffer_len;
if (itti_send_msg_to_task(TASK_FW_IP, INSTANCE_DEFAULT, message_p) < 0) { if (itti_send_msg_to_task(TASK_FW_IP, INSTANCE_DEFAULT, message_p) < 0) {
GTPU_ERROR("Failed to send message to task\n"); GTPU_ERROR("Failed to send message to task\n");
free(message_p); itti_free(ITTI_MSG_ORIGIN_ID(message_p), message_p);
message_p = NULL;
} }
} }
} }
...@@ -222,13 +224,12 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP) ...@@ -222,13 +224,12 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP)
memset(gtpv1u_teid2enb_info, 0, sizeof(gtpv1u_teid2enb_info_t)); memset(gtpv1u_teid2enb_info, 0, sizeof(gtpv1u_teid2enb_info_t));
gtpv1u_teid2enb_info->state = BEARER_IN_CONFIG; gtpv1u_teid2enb_info->state = BEARER_IN_CONFIG;
#warning !!! hack because missing modify session request, so force enb address //#warning !!! hack because missing modify session request, so force enb address
gtpv1u_teid2enb_info->enb_ip_addr.pdn_type = IPv4; // gtpv1u_teid2enb_info->enb_ip_addr.pdn_type = IPv4;
gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[0] = 192; // gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[0] = 192;
gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[1] = 168; // gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[1] = 168;
gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[2] = 1; // gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[2] = 1;
gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[3] = 2; // gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[3] = 2;
gtpv1u_teid2enb_info->state = BEARER_IN_CONFIG;
message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_CREATE_TUNNEL_RESP); message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_CREATE_TUNNEL_RESP);
...@@ -470,7 +471,7 @@ static void *gtpv1u_thread(void *args) ...@@ -470,7 +471,7 @@ static void *gtpv1u_thread(void *args)
} }
break; break;
} }
free(received_message_p); itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p);
received_message_p = NULL; received_message_p = NULL;
} }
return NULL; return NULL;
......
Installation Instructions Installation Instructions
************************* *************************
Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
Inc. Inc.
Copying and distribution of this file, with or without modification, Copying and distribution of this file, with or without modification,
...@@ -309,10 +309,9 @@ causes the specified `gcc' to be used as the C compiler (unless it is ...@@ -309,10 +309,9 @@ causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use an Autoconf bug. Until the bug is fixed you can use this workaround:
this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation `configure' Invocation
====================== ======================
...@@ -368,3 +367,4 @@ operates. ...@@ -368,3 +367,4 @@ operates.
`configure' also accepts some other, not widely useful, options. Run `configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details. `configure --help' for more details.
...@@ -19,10 +19,12 @@ noinst_LTLIBRARIES = libmmeapp.la ...@@ -19,10 +19,12 @@ noinst_LTLIBRARIES = libmmeapp.la
libmmeapp_la_LDFLAGS = -all-static libmmeapp_la_LDFLAGS = -all-static
libmmeapp_la_SOURCES = \ libmmeapp_la_SOURCES = \
mme_app_capabilities.c \
mme_app_context.c \ mme_app_context.c \
mme_app_main.c mme_app_defs.h \ mme_app_main.c mme_app_defs.h \
mme_app_bearer.c \ mme_app_bearer.c \
mme_app_authentication.c \ mme_app_authentication.c \
mme_app_location.c \
mme_app_statistics.c mme_app_statistics.h \ mme_app_statistics.c mme_app_statistics.h \
mme_app_defs.h mme_app_extern.h \ mme_app_defs.h mme_app_extern.h \
mme_app_itti_messaging.h \ mme_app_itti_messaging.h \
......
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
Eurecom OpenAirInterface Core Network
Copyright(c) 1999 - 2014 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : EURECOM,
Campus SophiaTech,
450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/
/*! \file mme_app_bearer.c
* \brief
* \author Lionel Gauthier
* \company Eurecom
* \email: lionel.gauthier@eurecom.fr
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "intertask_interface.h"
#include "mme_config.h"
#include "mme_app_extern.h"
#include "mme_app_ue_context.h"
#include "mme_app_defs.h"
#include "secu_defs.h"
#include "assertions.h"
#include "common_types.h"
int
mme_app_handle_s1ap_ue_capabilities_ind(
const s1ap_ue_cap_ind_t const * s1ap_ue_cap_ind_pP)
{
DevAssert(s1ap_ue_cap_ind_pP != NULL);
//unsigned eNB_ue_s1ap_id:24;
//uint32_t mme_ue_s1ap_id;
//uint8_t radio_capabilities[100];
//uint32_t radio_capabilities_length;
return 0;
}
This diff is collapsed.
/*******************************************************************************
Eurecom OpenAirInterface Core Network
Copyright(c) 1999 - 2014 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : EURECOM,
Campus SophiaTech,
450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/
/*! \file mme_app_config.h
* \brief
* \author Lionel GAUTHIER
* \version 1.0
* \company Eurecom
* \email: lionel.gauthier@eurecom.fr
*/
#ifndef MME_APP_CONFIG_H_
#define MME_APP_CONFIG_H_
#endif /* MME_APP_CONFIG_H_ */
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface Core Network
Eurecom OpenAirInterface Copyright(c) 1999 - 2014 Eurecom
Copyright(c) 1999 - 2013 Eurecom
This program is free software; you can redistribute it and/or modify it
This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation.
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
more details.
You should have received a copy of the GNU General Public License along with
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
The full GNU General Public License is included in this distribution in the file called "COPYING".
the file called "COPYING".
Contact Information
Contact Information Openair Admin: openair_admin@eurecom.fr
Openair Admin: openair_admin@eurecom.fr Openair Tech : openair_tech@eurecom.fr
Openair Tech : openair_tech@eurecom.fr Forums : http://forums.eurecom.fsr/openairinterface
Forums : http://forums.eurecom.fr/openairinterface Address : EURECOM,
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes Campus SophiaTech,
06410 Biot FRANCE 450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/ *******************************************************************************/
#include <pthread.h> #include <pthread.h>
...@@ -62,6 +64,11 @@ RB_GENERATE(ue_context_map, ue_context_s, rb_entry, ...@@ -62,6 +64,11 @@ RB_GENERATE(ue_context_map, ue_context_s, rb_entry,
static inline int ue_context_compare_identifiers( static inline int ue_context_compare_identifiers(
struct ue_context_s *p1, struct ue_context_s *p2) struct ue_context_s *p1, struct ue_context_s *p2)
{ {
MME_APP_DEBUG(" ue_context_compare_identifiers IMSI %"SCNu64"\n", p1->imsi);
MME_APP_DEBUG(" ue_context_compare_identifiers mme_s11_teid %08x\n" , p1->mme_s11_teid);
MME_APP_DEBUG(" ue_context_compare_identifiers mme_ue_s1ap_id %08x\n" , p1->mme_ue_s1ap_id);
MME_APP_DEBUG(" ue_context_compare_identifiers ue_id %08x\n" , p1->ue_id);
if (p1->imsi > 0) { if (p1->imsi > 0) {
/* if IMSI provided */ /* if IMSI provided */
if (p1->imsi > p2->imsi) { if (p1->imsi > p2->imsi) {
...@@ -78,6 +85,23 @@ static inline int ue_context_compare_identifiers( ...@@ -78,6 +85,23 @@ static inline int ue_context_compare_identifiers(
if (p1->mme_s11_teid < p2->mme_s11_teid) { if (p1->mme_s11_teid < p2->mme_s11_teid) {
return -1; return -1;
} }
} else if (p1->mme_ue_s1ap_id > 0) {
MME_APP_DEBUG(" with mme_ue_s1ap_id %d\n" , p2->mme_ue_s1ap_id);
/* if s1ap ue id provided */
if (p1->mme_ue_s1ap_id > p2->mme_ue_s1ap_id) {
return 1;
}
if (p1->mme_ue_s1ap_id < p2->mme_ue_s1ap_id) {
return -1;
}
} else if (p1->ue_id > 0) {
/* if nas ue_id provided */
if (p1->ue_id > p2->ue_id) {
return 1;
}
if (p1->ue_id < p2->ue_id) {
return -1;
}
} else { } else {
uint16_t mcc1; uint16_t mcc1;
uint16_t mnc1; uint16_t mnc1;
...@@ -144,14 +168,44 @@ struct ue_context_s *mme_ue_context_exists_s11_teid(mme_ue_context_t *mme_ue_con ...@@ -144,14 +168,44 @@ struct ue_context_s *mme_ue_context_exists_s11_teid(mme_ue_context_t *mme_ue_con
DevAssert(mme_ue_context != NULL); DevAssert(mme_ue_context != NULL);
memset(&reference, 0, sizeof(struct ue_context_s)); memset(&reference, 0, sizeof(struct ue_context_s));
reference.imsi = 0;
reference.mme_s11_teid = teid; reference.mme_s11_teid = teid;
return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree, return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree,
&reference); &reference);
} }
inline inline
struct ue_context_s *mme_ue_context_exists_guti(mme_ue_context_t *mme_ue_context, ue_context_t *mme_ue_context_exists_mme_ue_s1ap_id(
mme_ue_context_t *mme_ue_context,
uint32_t mme_ue_s1ap_id)
{
struct ue_context_s reference;
DevAssert(mme_ue_context != NULL);
memset(&reference, 0, sizeof(struct ue_context_s));
reference.mme_ue_s1ap_id = mme_ue_s1ap_id;
return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree,
&reference);
}
inline
ue_context_t *mme_ue_context_exists_nas_ue_id(
mme_ue_context_t *mme_ue_context,
uint32_t nas_ue_id)
{
struct ue_context_s reference;
DevAssert(mme_ue_context != NULL);
memset(&reference, 0, sizeof(struct ue_context_s));
reference.ue_id = nas_ue_id;
return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree,
&reference);
}
inline
ue_context_t *mme_ue_context_exists_guti(mme_ue_context_t *mme_ue_context,
GUTI_t guti) GUTI_t guti)
{ {
struct ue_context_s reference; struct ue_context_s reference;
......
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface Core Network
Eurecom OpenAirInterface Copyright(c) 1999 - 2014 Eurecom
Copyright(c) 1999 - 2013 Eurecom
This program is free software; you can redistribute it and/or modify it
This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation.
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
more details.
You should have received a copy of the GNU General Public License along with
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
The full GNU General Public License is included in this distribution in the file called "COPYING".
the file called "COPYING".
Contact Information
Contact Information Openair Admin: openair_admin@eurecom.fr
Openair Admin: openair_admin@eurecom.fr Openair Tech : openair_tech@eurecom.fr
Openair Tech : openair_tech@eurecom.fr Forums : http://forums.eurecom.fsr/openairinterface
Forums : http://forums.eurecom.fr/openairinterface Address : EURECOM,
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes Campus SophiaTech,
06410 Biot FRANCE 450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/ *******************************************************************************/
/* This file contains definitions related to mme applicative layer and should /* This file contains definitions related to mme applicative layer and should
...@@ -56,22 +58,37 @@ typedef struct { ...@@ -56,22 +58,37 @@ typedef struct {
extern mme_app_desc_t mme_app_desc; extern mme_app_desc_t mme_app_desc;
int mme_app_create_bearer(s6a_update_location_ans_t *ula_p);
#if defined(DISABLE_USE_NAS) #if defined(DISABLE_USE_NAS)
int mme_app_handle_attach_req(nas_attach_req_t *attach_req_p); int mme_app_handle_attach_req(nas_attach_req_t *attach_req_p);
#endif #endif
int mme_app_handle_create_sess_resp(SgwCreateSessionResponse *create_sess_resp_p); int mme_app_handle_s1ap_ue_capabilities_ind (const s1ap_ue_cap_ind_t const * s1ap_ue_cap_ind_pP);
int mme_app_send_s11_create_session_req (struct ue_context_s * const ue_context_pP);
int mme_app_send_s6a_update_location_req (struct ue_context_s * const ue_context_pP);
int mme_app_handle_s6a_update_location_ans (const s6a_update_location_ans_t * const ula_pP);
int mme_app_handle_nas_pdn_connectivity_req ( nas_pdn_connectivity_req_t * const nas_pdn_connectivity_req_p);
void mme_app_handle_conn_est_cnf (const nas_conn_est_cnf_t * const nas_conn_est_cnf_pP);
void mme_app_handle_conn_est_ind (const mme_app_connection_establishment_ind_t * const conn_est_ind_pP);
int mme_app_handle_create_sess_resp (const SgwCreateSessionResponse * const create_sess_resp_pP);
int mme_app_handle_establish_ind (const nas_establish_ind_t * const nas_establish_ind_pP);
int mme_app_handle_establish_ind(nas_establish_ind_t *nas_establish_ind_p); int mme_app_handle_authentication_info_answer(const s6a_auth_info_ans_t * const s6a_auth_info_ans_pP);
int mme_app_handle_authentication_info_answer(s6a_auth_info_ans_t *s6a_auth_info_ans_p); int mme_app_handle_nas_auth_resp (const nas_auth_resp_t * const nas_auth_resp_pP);
int mme_app_handle_nas_auth_resp(nas_auth_resp_t *nas_auth_resp_p); nas_cause_t s6a_error_2_nas_cause (const uint32_t s6a_errorP, const int experimentalP);
nas_cause_t s6a_error_2_nas_cause(uint32_t s6a_error, int experimental); void mme_app_handle_nas_auth_param_req (const nas_auth_param_req_t * const nas_auth_param_req_pP);
void mme_app_handle_nas_auth_param_req(nas_auth_param_req_t *nas_auth_param_req); void mme_app_handle_initial_context_setup_rsp(const mme_app_initial_context_setup_rsp_t * const initial_ctxt_setup_rsp_pP);
#endif /* MME_APP_DEFS_H_ */ #endif /* MME_APP_DEFS_H_ */
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface Core Network
Eurecom OpenAirInterface Copyright(c) 1999 - 2014 Eurecom
Copyright(c) 1999 - 2013 Eurecom
This program is free software; you can redistribute it and/or modify it
This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation.
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
more details.
You should have received a copy of the GNU General Public License along with
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
The full GNU General Public License is included in this distribution in the file called "COPYING".
the file called "COPYING".
Contact Information
Contact Information Openair Admin: openair_admin@eurecom.fr
Openair Admin: openair_admin@eurecom.fr Openair Tech : openair_tech@eurecom.fr
Openair Tech : openair_tech@eurecom.fr Forums : http://forums.eurecom.fsr/openairinterface
Forums : http://forums.eurecom.fr/openairinterface Address : EURECOM,
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes Campus SophiaTech,
06410 Biot FRANCE 450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/ *******************************************************************************/
#ifndef MME_APP_EXTERN_H_ #ifndef MME_APP_EXTERN_H_
......
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface Core Network
Eurecom OpenAirInterface Copyright(c) 1999 - 2014 Eurecom
Copyright(c) 1999 - 2013 Eurecom
This program is free software; you can redistribute it and/or modify it
This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation.
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
more details.
You should have received a copy of the GNU General Public License along with
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
The full GNU General Public License is included in this distribution in the file called "COPYING".
the file called "COPYING".
Contact Information
Contact Information Openair Admin: openair_admin@eurecom.fr
Openair Admin: openair_admin@eurecom.fr Openair Tech : openair_tech@eurecom.fr
Openair Tech : openair_tech@eurecom.fr Forums : http://forums.eurecom.fsr/openairinterface
Forums : http://forums.eurecom.fr/openairinterface Address : EURECOM,
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes Campus SophiaTech,
06410 Biot FRANCE 450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/ *******************************************************************************/
#ifndef MME_APP_ITTI_MESSAGING_H_ #ifndef MME_APP_ITTI_MESSAGING_H_
#define MME_APP_ITTI_MESSAGING_H_ #define MME_APP_ITTI_MESSAGING_H_
static inline void mme_app_itti_auth_fail(uint32_t ue_id, nas_cause_t cause) static inline void
mme_app_itti_auth_fail(
const uint32_t ue_id,
const nas_cause_t cause)
{ {
MessageDef *message_p; MessageDef *message_p;
...@@ -43,8 +48,12 @@ static inline void mme_app_itti_auth_fail(uint32_t ue_id, nas_cause_t cause) ...@@ -43,8 +48,12 @@ static inline void mme_app_itti_auth_fail(uint32_t ue_id, nas_cause_t cause)
itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p);
} }
static inline void mme_app_itti_auth_rsp(uint32_t ue_id, uint8_t nb_vectors,
eutran_vector_t *vector)
static inline void mme_app_itti_auth_rsp(
const uint32_t ue_id,
const uint8_t nb_vectors,
const eutran_vector_t * const vector)
{ {
MessageDef *message_p; MessageDef *message_p;
......
/*******************************************************************************
Eurecom OpenAirInterface Core Network
Copyright(c) 1999 - 2014 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : EURECOM,
Campus SophiaTech,
450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/
/*! \file mme_app_location.c
* \brief
* \author Sebastien ROUX, Lionel GAUTHIER
* \version 1.0
* \company Eurecom
* \email: lionel.gauthier@eurecom.fr
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "intertask_interface.h"
#include "mme_config.h"
#include "mme_app_extern.h"
#include "mme_app_ue_context.h"
#include "mme_app_defs.h"
#include "secu_defs.h"
#include "assertions.h"
#include "common_types.h"
int
mme_app_send_s6a_update_location_req(
struct ue_context_s * const ue_context_pP)
{
struct ue_context_s *ue_context_p = NULL;
uint64_t imsi = 0;
MessageDef *message_p = NULL;
s6a_update_location_req_t *s6a_ulr_p = NULL;
MME_APP_STRING_TO_IMSI((char *)ue_context_pP->pending_pdn_connectivity_req_imsi, &imsi);
MME_APP_DEBUG("Handling imsi %"IMSI_FORMAT"\n", imsi);
if ((ue_context_p = mme_ue_context_exists_imsi(&mme_app_desc.mme_ue_contexts,
imsi)) == NULL) {
MME_APP_ERROR("That's embarrassing as we don't know this IMSI\n");
return -1;
}
message_p = itti_alloc_new_message(TASK_MME_APP, S6A_UPDATE_LOCATION_REQ);
if (message_p == NULL) {
return -1;
}
s6a_ulr_p = &message_p->ittiMsg.s6a_update_location_req;
memset((void*)s6a_ulr_p, 0, sizeof(s6a_update_location_req_t));
MME_APP_IMSI_TO_STRING(imsi, s6a_ulr_p->imsi);
s6a_ulr_p->imsi_length = strlen(s6a_ulr_p->imsi);
s6a_ulr_p->initial_attach = INITIAL_ATTACH;
memcpy(&s6a_ulr_p->visited_plmn, &ue_context_p->guti.gummei.plmn, sizeof(plmn_t));
s6a_ulr_p->rat_type = RAT_EUTRAN;
/* Check if we already have UE data */
s6a_ulr_p->skip_subscriber_data = 0;
return itti_send_msg_to_task(TASK_S6A, INSTANCE_DEFAULT, message_p);
}
int
mme_app_handle_s6a_update_location_ans(
const s6a_update_location_ans_t * const ula_pP)
{
uint64_t imsi = 0;
struct ue_context_s *ue_context_p = NULL;
DevAssert(ula_pP != NULL);
if (ula_pP->result.present == S6A_RESULT_BASE) {
if (ula_pP->result.choice.base != DIAMETER_SUCCESS) {
/* The update location procedure has failed. Notify the NAS layer
* and don't initiate the bearer creation on S-GW side.
*/
DevMessage("ULR/ULA procedure returned non success\n");
}
} else {
/* The update location procedure has failed. Notify the NAS layer
* and don't initiate the bearer creation on S-GW side.
*/
DevMessage("ULR/ULA procedure returned non success\n");
}
MME_APP_STRING_TO_IMSI((char *)ula_pP->imsi, &imsi);
MME_APP_DEBUG("%s Handling imsi %"IMSI_FORMAT"\n", __FUNCTION__, imsi);
if ((ue_context_p = mme_ue_context_exists_imsi(&mme_app_desc.mme_ue_contexts, imsi)) == NULL) {
MME_APP_ERROR("That's embarrassing as we don't know this IMSI\n");
return -1;
}
ue_context_p->subscription_known = SUBSCRIPTION_KNOWN;
ue_context_p->sub_status = ula_pP->subscription_data.subscriber_status;
ue_context_p->access_restriction_data = ula_pP->subscription_data.access_restriction;
/* Copy the subscribed ambr to the sgw create session request message */
memcpy(&ue_context_p->subscribed_ambr, &ula_pP->subscription_data.subscribed_ambr,
sizeof(ambr_t));
memcpy(
ue_context_p->msisdn,
ula_pP->subscription_data.msisdn,
ula_pP->subscription_data.msisdn_length);
ue_context_p->msisdn_length = ula_pP->subscription_data.msisdn_length;
AssertFatal(ula_pP->subscription_data.msisdn_length != 0, "MSISDN LENGTH IS 0");
AssertFatal(ula_pP->subscription_data.msisdn_length <= MSISDN_LENGTH, "MSISDN LENGTH is too high %u", MSISDN_LENGTH);
ue_context_p->msisdn[ue_context_p->msisdn_length] = '\0';
ue_context_p->rau_tau_timer = ula_pP->subscription_data.rau_tau_timer;
ue_context_p->access_mode = ula_pP->subscription_data.access_mode;
memcpy(&ue_context_p->apn_profile, &ula_pP->subscription_data.apn_config_profile,
sizeof(apn_config_profile_t));
return mme_app_send_s11_create_session_req(ue_context_p);
}
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface Core Network
Eurecom OpenAirInterface Copyright(c) 1999 - 2014 Eurecom
Copyright(c) 1999 - 2013 Eurecom
This program is free software; you can redistribute it and/or modify it
This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation.
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
more details.
You should have received a copy of the GNU General Public License along with
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
The full GNU General Public License is included in this distribution in the file called "COPYING".
the file called "COPYING".
Contact Information
Contact Information Openair Admin: openair_admin@eurecom.fr
Openair Admin: openair_admin@eurecom.fr Openair Tech : openair_tech@eurecom.fr
Openair Tech : openair_tech@eurecom.fr Forums : http://forums.eurecom.fsr/openairinterface
Forums : http://forums.eurecom.fr/openairinterface Address : EURECOM,
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes Campus SophiaTech,
06410 Biot FRANCE 450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/ *******************************************************************************/
#include <stdio.h> #include <stdio.h>
...@@ -71,13 +73,18 @@ void *mme_app_thread(void *args) ...@@ -71,13 +73,18 @@ void *mme_app_thread(void *args)
case S6A_UPDATE_LOCATION_ANS: { case S6A_UPDATE_LOCATION_ANS: {
/* We received the update location answer message from HSS -> Handle it */ /* We received the update location answer message from HSS -> Handle it */
mme_app_create_bearer(&received_message_p->ittiMsg.s6a_update_location_ans); mme_app_handle_s6a_update_location_ans(&received_message_p->ittiMsg.s6a_update_location_ans);
} break; } break;
case SGW_CREATE_SESSION_RESPONSE: { case SGW_CREATE_SESSION_RESPONSE: {
mme_app_handle_create_sess_resp(&received_message_p->ittiMsg.sgwCreateSessionResponse); mme_app_handle_create_sess_resp(&received_message_p->ittiMsg.sgwCreateSessionResponse);
} break; } break;
case SGW_MODIFY_BEARER_RESPONSE: {
MME_APP_DEBUG(" TO DO HANDLE SGW_MODIFY_BEARER_RESPONSE");
// TO DO
} break;
#if defined(DISABLE_USE_NAS) #if defined(DISABLE_USE_NAS)
case NAS_ATTACH_REQ: { case NAS_ATTACH_REQ: {
mme_app_handle_attach_req(&received_message_p->ittiMsg.nas_attach_req); mme_app_handle_attach_req(&received_message_p->ittiMsg.nas_attach_req);
...@@ -91,6 +98,24 @@ void *mme_app_thread(void *args) ...@@ -91,6 +98,24 @@ void *mme_app_thread(void *args)
mme_app_handle_nas_auth_param_req(&received_message_p->ittiMsg.nas_auth_param_req); mme_app_handle_nas_auth_param_req(&received_message_p->ittiMsg.nas_auth_param_req);
} break; } break;
#endif #endif
case NAS_PDN_CONNECTIVITY_REQ: {
mme_app_handle_nas_pdn_connectivity_req(&received_message_p->ittiMsg.nas_pdn_connectivity_req);
} break;
//case NAS_CONNECTION_ESTABLISHMENT_CNF: {
case NAS_CONNECTION_ESTABLISHMENT_CNF: {
mme_app_handle_conn_est_cnf(&NAS_CONNECTION_ESTABLISHMENT_CNF(received_message_p));
} break;
case MME_APP_CONNECTION_ESTABLISHMENT_IND: {
mme_app_handle_conn_est_ind(&MME_APP_CONNECTION_ESTABLISHMENT_IND(received_message_p));
} break;
case MME_APP_INITIAL_CONTEXT_SETUP_RSP: {
mme_app_handle_initial_context_setup_rsp(&MME_APP_INITIAL_CONTEXT_SETUP_RSP(received_message_p));
} break;
case TIMER_HAS_EXPIRED: { case TIMER_HAS_EXPIRED: {
/* Check if it is the statistic timer */ /* Check if it is the statistic timer */
if (received_message_p->ittiMsg.timer_has_expired.timer_id == if (received_message_p->ittiMsg.timer_has_expired.timer_id ==
...@@ -105,7 +130,7 @@ void *mme_app_thread(void *args) ...@@ -105,7 +130,7 @@ void *mme_app_thread(void *args)
} break; } break;
case S1AP_UE_CAPABILITIES_IND: { case S1AP_UE_CAPABILITIES_IND: {
// TO DO; mme_app_handle_s1ap_ue_capabilities_ind(&received_message_p->ittiMsg.s1ap_ue_cap_ind);
} break; } break;
default: { default: {
......
/*******************************************************************************
Eurecom OpenAirInterface Core Network
Copyright(c) 1999 - 2014 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : EURECOM,
Campus SophiaTech,
450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
...@@ -7,7 +38,8 @@ ...@@ -7,7 +38,8 @@
#include "mme_app_defs.h" #include "mme_app_defs.h"
#include "mme_app_statistics.h" #include "mme_app_statistics.h"
int mme_app_statistics_display(void) int
mme_app_statistics_display(void)
{ {
fprintf(stdout, "================== Statistics ==================\n"); fprintf(stdout, "================== Statistics ==================\n");
fprintf(stdout, " | Global | Since last display |\n"); fprintf(stdout, " | Global | Since last display |\n");
......
/*******************************************************************************
Eurecom OpenAirInterface Core Network
Copyright(c) 1999 - 2014 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : EURECOM,
Campus SophiaTech,
450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/
#ifndef MME_APP_STATISTICS_H_ #ifndef MME_APP_STATISTICS_H_
#define MME_APP_STATISTICS_H_ #define MME_APP_STATISTICS_H_
......
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface Core Network
Eurecom OpenAirInterface Copyright(c) 1999 - 2014 Eurecom
Copyright(c) 1999 - 2013 Eurecom
This program is free software; you can redistribute it and/or modify it
This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License,
under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation.
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
This program is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
more details.
You should have received a copy of the GNU General Public License along with
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
The full GNU General Public License is included in this distribution in the file called "COPYING".
the file called "COPYING".
Contact Information
Contact Information Openair Admin: openair_admin@eurecom.fr
Openair Admin: openair_admin@eurecom.fr Openair Tech : openair_tech@eurecom.fr
Openair Tech : openair_tech@eurecom.fr Forums : http://forums.eurecom.fsr/openairinterface
Forums : http://forums.eurecom.fr/openairinterface Address : EURECOM,
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes Campus SophiaTech,
06410 Biot FRANCE 450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/ *******************************************************************************/
/*! \file mme_app_ue_context.h /*! \file mme_app_ue_context.h
...@@ -42,6 +44,8 @@ ...@@ -42,6 +44,8 @@
#include <inttypes.h> /* For sscanf formats */ #include <inttypes.h> /* For sscanf formats */
#include <time.h> /* to provide time_t */ #include <time.h> /* to provide time_t */
#include "nas_messages_types.h"
#include "s6a_messages_types.h"
#include "security_types.h" #include "security_types.h"
#include "tree.h" #include "tree.h"
...@@ -67,13 +71,13 @@ typedef uint64_t mme_app_imsi_t; ...@@ -67,13 +71,13 @@ typedef uint64_t mme_app_imsi_t;
*/ */
typedef struct bearer_context_s { typedef struct bearer_context_s {
/* S-GW Tunnel Endpoint for User-Plane */ /* S-GW Tunnel Endpoint for User-Plane */
uint32_t s_gw_teid; Teid_t s_gw_teid;
/* S-GW IP address for User-Plane */ /* S-GW IP address for User-Plane */
ip_address_t s_gw_address; ip_address_t s_gw_address;
/* P-GW Tunnel Endpoint for User-Plane */ /* P-GW Tunnel Endpoint for User-Plane */
uint32_t p_gw_teid; Teid_t p_gw_teid;
/* P-GW IP address for User-Plane */ /* P-GW IP address for User-Plane */
ip_address_t p_gw_address; ip_address_t p_gw_address;
...@@ -98,47 +102,48 @@ typedef struct ue_context_s { ...@@ -98,47 +102,48 @@ typedef struct ue_context_s {
/* Basic identifier for ue. IMSI is encoded on maximum of 15 digits of 4 bits, /* Basic identifier for ue. IMSI is encoded on maximum of 15 digits of 4 bits,
* so usage of an unsigned integer on 64 bits is necessary. * so usage of an unsigned integer on 64 bits is necessary.
*/ */
mme_app_imsi_t imsi; mme_app_imsi_t imsi; // set by nas_auth_param_req_t
#define IMSI_UNAUTHENTICATED (0x0) #define IMSI_UNAUTHENTICATED (0x0)
#define IMSI_AUTHENTICATED (0x1) #define IMSI_AUTHENTICATED (0x1)
/* Indicator to show the IMSI authentication state */ /* Indicator to show the IMSI authentication state */
unsigned imsi_auth:1; unsigned imsi_auth:1; // set by nas_auth_resp_t
unsigned eNB_ue_s1ap_id:24; unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id; uint32_t mme_ue_s1ap_id;
/* ue_id is equal to mme_ue_s1ap_id */ /* ue_id is equal to mme_ue_s1ap_id */
uint32_t ue_id; uint32_t ue_id; // set by nas_auth_param_req_t
uint8_t nb_of_vectors;
uint8_t nb_of_vectors; // updated by S6A AUTHENTICATION ANSWER
/* List of authentication vectors for E-UTRAN */ /* List of authentication vectors for E-UTRAN */
eutran_vector_t *vector_list; eutran_vector_t *vector_list; // updated by S6A AUTHENTICATION ANSWER
eutran_vector_t *vector_in_use; // pointer in vector_list
eutran_vector_t *vector_in_use; // updated by S6A AUTHENTICATION ANSWER
#define SUBSCRIPTION_UNKNOWN 0x0 #define SUBSCRIPTION_UNKNOWN 0x0
#define SUBSCRIPTION_KNOWN 0x1 #define SUBSCRIPTION_KNOWN 0x1
unsigned subscription_known:1; unsigned subscription_known:1; // set by S6A UPDATE LOCATION ANSWER
uint8_t msisdn[MSISDN_LENGTH+1]; // set by S6A UPDATE LOCATION ANSWER
uint8_t msisdn_length; // set by S6A UPDATE LOCATION ANSWER
uint8_t msisdn[MSISDN_LENGTH+1]; mm_state_t mm_state; // not set/read
uint8_t msisdn_length;
mm_state_t mm_state;
/* Globally Unique Temporary Identity */ /* Globally Unique Temporary Identity */
GUTI_t guti; GUTI_t guti; // guti.gummei.plmn set by nas_auth_param_req_t
me_identity_t me_identity; // read by S6A UPDATE LOCATION REQUEST
me_identity_t me_identity; // not set/read except read by display utility
/* TODO: Add TAI list */ /* TODO: Add TAI list */
/* Last known cell identity */ /* Last known cell identity */
cgi_t e_utran_cgi; cgi_t e_utran_cgi; // set by nas_attach_req_t
// read for S11 CREATE_SESSION_REQUEST
/* Time when the cell identity was acquired */ /* Time when the cell identity was acquired */
time_t cell_age; time_t cell_age; // set by nas_auth_param_req_t
/* TODO: add csg_id */ /* TODO: add csg_id */
/* TODO: add csg_membership */ /* TODO: add csg_membership */
network_access_mode_t access_mode; network_access_mode_t access_mode; // set by S6A UPDATE LOCATION ANSWER
/* TODO: add ue radio cap, ms classmarks, supported codecs */ /* TODO: add ue radio cap, ms classmarks, supported codecs */
...@@ -147,26 +152,36 @@ typedef struct ue_context_s { ...@@ -147,26 +152,36 @@ typedef struct ue_context_s {
/* TODO: add DRX parameter */ /* TODO: add DRX parameter */
apn_config_profile_t apn_profile; apn_config_profile_t apn_profile; // set by S6A UPDATE LOCATION ANSWER
ard_t access_restriction_data; // set by S6A UPDATE LOCATION ANSWER
ard_t access_restriction_data; subscriber_status_t sub_status; // set by S6A UPDATE LOCATION ANSWER
ambr_t subscribed_ambr; // set by S6A UPDATE LOCATION ANSWER
subscriber_status_t sub_status;
ambr_t subscribed_ambr;
ambr_t used_ambr; ambr_t used_ambr;
rau_tau_timer_t rau_tau_timer; rau_tau_timer_t rau_tau_timer; // set by S6A UPDATE LOCATION ANSWER
/* Store the radio capabilities as received in S1AP UE capability indication /* Store the radio capabilities as received in S1AP UE capability indication
* message. * message.
*/ */
char *ue_radio_capabilities; char *ue_radio_capabilities; // not set/read
int ue_radio_cap_length; int ue_radio_cap_length; // not set/read
uint32_t mme_s11_teid; Teid_t mme_s11_teid; // set by mme_app_send_s11_create_session_req
uint32_t sgw_s11_teid; Teid_t sgw_s11_teid; // set by S11 CREATE_SESSION_RESPONSE
PAA_t paa; // set by S11 CREATE_SESSION_RESPONSE
// temp
char pending_pdn_connectivity_req_imsi[16];
uint8_t pending_pdn_connectivity_req_imsi_length;
OctetString pending_pdn_connectivity_req_apn;
OctetString pending_pdn_connectivity_req_pdn_addr;
int pending_pdn_connectivity_req_pti;
unsigned pending_pdn_connectivity_req_ue_id;
network_qos_t pending_pdn_connectivity_req_qos;
void *pending_pdn_connectivity_req_proc_data;
int pending_pdn_connectivity_req_request_type;
ebi_t default_bearer_id;
bearer_context_t eps_bearers[BEARERS_PER_UE]; bearer_context_t eps_bearers[BEARERS_PER_UE];
} ue_context_t; } ue_context_t;
...@@ -199,12 +214,28 @@ inline ...@@ -199,12 +214,28 @@ inline
ue_context_t *mme_ue_context_exists_s11_teid(mme_ue_context_t *mme_ue_context, ue_context_t *mme_ue_context_exists_s11_teid(mme_ue_context_t *mme_ue_context,
uint32_t teid); uint32_t teid);
/** \brief Retrieve an UE context by selecting the provided mme_ue_s1ap_id
* \param mme_ue_s1ap_id The UE id identifier used in S1AP MME (and NAS)
* @returns an UE context matching the mme_ue_s1ap_id or NULL if the context doesn't exists
**/
inline
ue_context_t *mme_ue_context_exists_mme_ue_s1ap_id(mme_ue_context_t *mme_ue_context,
uint32_t mme_ue_s1ap_id);
/** \brief Retrieve an UE context by selecting the provided nas_ue_id
* \param nas_ue_id The UE id identifier used in S1AP MME and NAS
* @returns an UE context matching the nas_ue_id or NULL if the context doesn't exists
**/
inline
ue_context_t *mme_ue_context_exists_nas_ue_id(mme_ue_context_t *mme_ue_context,
uint32_t nas_ue_id);
/** \brief Retrieve an UE context by selecting the provided guti /** \brief Retrieve an UE context by selecting the provided guti
* \param guti The GUTI used by the UE * \param guti The GUTI used by the UE
* @returns an UE context matching the guti or NULL if the context doesn't exists * @returns an UE context matching the guti or NULL if the context doesn't exists
**/ **/
inline inline
struct ue_context_s *mme_ue_context_exists_guti(mme_ue_context_t *mme_ue_context, ue_context_t *mme_ue_context_exists_guti(mme_ue_context_t *mme_ue_context,
GUTI_t guti); GUTI_t guti);
/** \brief Insert a new UE context in the tree of known UEs. /** \brief Insert a new UE context in the tree of known UEs.
......
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface Core Network
Copyright(c) 1999 - 2014 Eurecom
Eurecom OpenAirInterface This program is free software; you can redistribute it and/or modify it
Copyright(c) 1999 - 2013 Eurecom under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is free software; you can redistribute it and/or modify it This program is distributed in the hope it will be useful, but WITHOUT
under the terms and conditions of the GNU General Public License, ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
version 2, as published by the Free Software Foundation. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
This program is distributed in the hope it will be useful, but WITHOUT You should have received a copy of the GNU General Public License along with
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or this program; if not, write to the Free Software Foundation, Inc.,
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
more details.
You should have received a copy of the GNU General Public License along with The full GNU General Public License is included in this distribution in
this program; if not, write to the Free Software Foundation, Inc., the file called "COPYING".
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes
06410 Biot FRANCE
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : EURECOM,
Campus SophiaTech,
450 Route des Chappes,
CS 50193
06904 Biot Sophia Antipolis cedex,
FRANCE
*******************************************************************************/ *******************************************************************************/
#include "as_message.h" #include "as_message.h"
......
...@@ -220,14 +220,22 @@ int emm_proc_attach(emm_proc_attach_type_t type) ...@@ -220,14 +220,22 @@ int emm_proc_attach(emm_proc_attach_type_t type)
/* Check whether the selected PLMN is neither the registered PLMN /* Check whether the selected PLMN is neither the registered PLMN
* nor in the list of equivalent PLMNs */ * nor in the list of equivalent PLMNs */
if ( (!_emm_data.is_rplmn) && (!_emm_data.is_eplmn) ) { if ( (!_emm_data.is_rplmn) && (!_emm_data.is_eplmn) ) {
LOG_TRACE(INFO, "EMM-PROC - Initiate EPS attach with IMSI");
/* Include the IMSI */ /* Include the IMSI */
emm_as->UEid.imsi = _emm_data.imsi; emm_as->UEid.imsi = _emm_data.imsi;
} else {
LOG_TRACE(INFO,
"EMM-PROC - Initiate EPS attach with NO IMSI, is registered PLMN %d, is equivalent PLMN %d",
_emm_data.is_rplmn,
_emm_data.is_eplmn);
} }
} else if (_emm_data.guti) { } else if (_emm_data.guti) {
LOG_TRACE(INFO, "EMM-PROC - Initiate EPS attach with GUTI");
/* Include a valid GUTI and the last visited registered TAI */ /* Include a valid GUTI and the last visited registered TAI */
emm_as->UEid.guti = _emm_data.guti; emm_as->UEid.guti = _emm_data.guti;
emm_as->UEid.tai = _emm_data.tai; emm_as->UEid.tai = _emm_data.tai;
} else if (!_emm_data.is_emergency) { } else if (!_emm_data.is_emergency) {
LOG_TRACE(INFO, "EMM-PROC - Initiate EPS attach with IMSI cause is no emergency and no GUTI");
/* Include the IMSI if no valid GUTI is available */ /* Include the IMSI if no valid GUTI is available */
emm_as->UEid.imsi = _emm_data.imsi; emm_as->UEid.imsi = _emm_data.imsi;
} else { } else {
...@@ -235,8 +243,10 @@ int emm_proc_attach(emm_proc_attach_type_t type) ...@@ -235,8 +243,10 @@ int emm_proc_attach(emm_proc_attach_type_t type)
* does not hold a valid GUTI */ * does not hold a valid GUTI */
if (_emm_data.imsi) { if (_emm_data.imsi) {
/* Include the IMSI if valid (USIM is present) */ /* Include the IMSI if valid (USIM is present) */
LOG_TRACE(INFO, "EMM-PROC - Initiate EPS attach with IMSI cause is emergency and no GUTI");
emm_as->UEid.imsi = _emm_data.imsi; emm_as->UEid.imsi = _emm_data.imsi;
} else { } else {
LOG_TRACE(INFO, "EMM-PROC - Initiate EPS attach with IMSI cause is emergency and no GUTI and no IMSI");
/* Include the IMEI if the IMSI is not valid */ /* Include the IMEI if the IMSI is not valid */
emm_as->UEid.imei = _emm_data.imei; emm_as->UEid.imei = _emm_data.imei;
} }
...@@ -2118,7 +2128,7 @@ static int _emm_attach(void *args) ...@@ -2118,7 +2128,7 @@ static int _emm_attach(void *args)
/* Assign the TAI list the UE is registered to */ /* Assign the TAI list the UE is registered to */
/* Allocate parameters of the retransmission timer callback */ /* Allocate parameters of the retransmission timer callback */
attach_data_t *data = (attach_data_t *)malloc(sizeof(attach_data_t)); attach_data_t *data = (attach_data_t *)calloc(1,sizeof(attach_data_t));
if (data != NULL) { if (data != NULL) {
/* Setup ongoing EMM procedure callback functions */ /* Setup ongoing EMM procedure callback functions */
...@@ -2134,6 +2144,7 @@ static int _emm_attach(void *args) ...@@ -2134,6 +2144,7 @@ static int _emm_attach(void *args)
data->ueid = emm_ctx->ueid; data->ueid = emm_ctx->ueid;
/* Reset the retransmission counter */ /* Reset the retransmission counter */
data->retransmission_count = 0; data->retransmission_count = 0;
#if defined(ORIGINAL_CODE)
/* Setup the ESM message container */ /* Setup the ESM message container */
data->esm_msg.value = (uint8_t *)malloc(esm_sap.send.length); data->esm_msg.value = (uint8_t *)malloc(esm_sap.send.length);
if (data->esm_msg.value) { if (data->esm_msg.value) {
...@@ -2156,6 +2167,9 @@ static int _emm_attach(void *args) ...@@ -2156,6 +2167,9 @@ static int _emm_attach(void *args)
rc = emm_sap_send(&emm_sap); rc = emm_sap_send(&emm_sap);
} }
} }
#else
rc = RETURNok;
#endif
} }
} else if (esm_sap.err != ESM_SAP_DISCARDED) { } else if (esm_sap.err != ESM_SAP_DISCARDED) {
/* /*
...@@ -2196,6 +2210,10 @@ static int _emm_attach(void *args) ...@@ -2196,6 +2210,10 @@ static int _emm_attach(void *args)
LOG_FUNC_RETURN (rc); LOG_FUNC_RETURN (rc);
} }
int emm_cn_wrapper_attach_accept(emm_data_context_t *emm_ctx, void *data)
{
return _emm_attach_accept(emm_ctx,(attach_data_t *)data);
}
/**************************************************************************** /****************************************************************************
** ** ** **
** Name: _emm_attach_accept() ** ** Name: _emm_attach_accept() **
...@@ -2242,6 +2260,9 @@ static int _emm_attach_accept(emm_data_context_t *emm_ctx, attach_data_t *data) ...@@ -2242,6 +2260,9 @@ static int _emm_attach_accept(emm_data_context_t *emm_ctx, attach_data_t *data)
/* Get the activate default EPS bearer context request message to /* Get the activate default EPS bearer context request message to
* transfer within the ESM container of the attach accept message */ * transfer within the ESM container of the attach accept message */
emm_sap.u.emm_as.u.establish.NASmsg = data->esm_msg; emm_sap.u.emm_as.u.establish.NASmsg = data->esm_msg;
LOG_TRACE(INFO,"EMM-PROC - NASmsg src size = %d NASmsg dst size = %d ",
data->esm_msg.length, emm_sap.u.emm_as.u.establish.NASmsg.length);
rc = emm_sap_send(&emm_sap); rc = emm_sap_send(&emm_sap);
if (rc != RETURNerror) { if (rc != RETURNerror) {
......
...@@ -509,7 +509,8 @@ int emm_proc_initialize(void) ...@@ -509,7 +509,8 @@ int emm_proc_initialize(void)
* When switched on, the UE will try to automatically register * When switched on, the UE will try to automatically register
* to each previous PLMN within the ordered list of available * to each previous PLMN within the ordered list of available
* PLMNs regardless of the network selection mode of operation */ * PLMNs regardless of the network selection mode of operation */
_emm_plmn_list.hplmn = _emm_plmn_list.n_plmns; _emm_plmn_list.hplmn = _emm_plmn_list.n_plmns - 1;
// LG_emm_plmn_list.hplmn = _emm_plmn_list.n_plmns;
/* Add the highest priority PLMN in the list of "equivalent HPLMNs" /* Add the highest priority PLMN in the list of "equivalent HPLMNs"
if present and not empty, or the HPLMN derived from the IMSI */ if present and not empty, or the HPLMN derived from the IMSI */
...@@ -891,9 +892,11 @@ int emm_proc_plmn_selection_end(int found, tac_t tac, ci_t ci, AcT_t rat) ...@@ -891,9 +892,11 @@ int emm_proc_plmn_selection_end(int found, tac_t tac, ci_t ci, AcT_t rat)
if (_emm_plmn_list.splmn != -1) { if (_emm_plmn_list.splmn != -1) {
if (_emm_plmn_list.splmn == _emm_plmn_list.rplmn) { if (_emm_plmn_list.splmn == _emm_plmn_list.rplmn) {
/* The selected PLMN is the registered PLMN */ /* The selected PLMN is the registered PLMN */
LOG_TRACE(INFO, "EMM-IDLE - The selected PLMN is the registered PLMN");
_emm_data.is_rplmn = TRUE; _emm_data.is_rplmn = TRUE;
} else if (_emm_plmn_list.splmn < _emm_plmn_list.hplmn) { } else if (_emm_plmn_list.splmn < _emm_plmn_list.hplmn) {
/* The selected PLMN is in the list of equivalent PLMNs */ /* The selected PLMN is in the list of equivalent PLMNs */
LOG_TRACE(INFO, "EMM-IDLE - The selected PLMN is in the list of equivalent PLMNs");
_emm_data.is_eplmn = TRUE; _emm_data.is_eplmn = TRUE;
} }
/* /*
......
...@@ -329,14 +329,14 @@ typedef struct emm_data_context_s { ...@@ -329,14 +329,14 @@ typedef struct emm_data_context_s {
unsigned int ueid; /* UE identifier */ unsigned int ueid; /* UE identifier */
int is_dynamic; /* Dynamically allocated context indicator */ int is_dynamic; /* Dynamically allocated context indicator */
int is_attached; /* Attachment indicator */ int is_attached; /* Attachment indicator */
int is_emergency; /* Emergency bearer services indicator */ int is_emergency;/* Emergency bearer services indicator */
imsi_t *imsi; /* The IMSI provided by the UE or the MME */ imsi_t *imsi; /* The IMSI provided by the UE or the MME */
imei_t *imei; /* The IMEI provided by the UE */ imei_t *imei; /* The IMEI provided by the UE */
int guti_is_new; /* New GUTI indicator */ int guti_is_new; /* New GUTI indicator */
GUTI_t *guti; /* The GUTI assigned to the UE */ GUTI_t *guti; /* The GUTI assigned to the UE */
GUTI_t *old_guti; /* The old GUTI */ GUTI_t *old_guti; /* The old GUTI */
int n_tacs; /* Number of concecutive tracking areas the UE is int n_tacs; /* Number of consecutive tracking areas the UE is
* registered to */ * registered to */
tac_t tac; /* Code of the first tracking area the UE is tac_t tac; /* Code of the first tracking area the UE is
* registered to */ * registered to */
...@@ -344,9 +344,9 @@ typedef struct emm_data_context_s { ...@@ -344,9 +344,9 @@ typedef struct emm_data_context_s {
int ksi; /* Security key set identifier provided by the UE */ int ksi; /* Security key set identifier provided by the UE */
int eea; /* EPS encryption algorithms supported by the UE */ int eea; /* EPS encryption algorithms supported by the UE */
int eia; /* EPS integrity algorithms supported by the UE */ int eia; /* EPS integrity algorithms supported by the UE */
auth_vector_t vector; /* EPS authentication vector */ auth_vector_t vector;/* EPS authentication vector */
emm_security_context_t *security; /* Current EPS NAS security context */ emm_security_context_t *security; /* Current EPS NAS security context */
OctetString esm_msg; /* ESM message contained within the initial request */ OctetString esm_msg; /* ESM message contained within the initial request*/
int emm_cause; /* EMM failure cause code */ int emm_cause; /* EMM failure cause code */
emm_fsm_state_t _emm_fsm_status; emm_fsm_state_t _emm_fsm_status;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "assertions.h" #include "assertions.h"
#include "tree.h" #include "tree.h"
#include "emmData.h" #include "emmData.h"
#include "nas_log.h"
static inline static inline
int emm_data_ctxt_compare_ueid(struct emm_data_context_s *p1, int emm_data_ctxt_compare_ueid(struct emm_data_context_s *p1,
...@@ -48,11 +49,13 @@ struct emm_data_context_s *emm_data_context_get( ...@@ -48,11 +49,13 @@ struct emm_data_context_s *emm_data_context_get(
struct emm_data_context_s *emm_data_context_remove( struct emm_data_context_s *emm_data_context_remove(
emm_data_t *emm_data, struct emm_data_context_s *elm) emm_data_t *emm_data, struct emm_data_context_s *elm)
{ {
LOG_TRACE(INFO, "EMM-CTX - Remove in context %p UE id %u", elm, elm->ueid);
return RB_REMOVE(emm_data_context_map, &emm_data->ctx_map, elm); return RB_REMOVE(emm_data_context_map, &emm_data->ctx_map, elm);
} }
void emm_data_context_add(emm_data_t *emm_data, struct emm_data_context_s *elm) void emm_data_context_add(emm_data_t *emm_data, struct emm_data_context_s *elm)
{ {
LOG_TRACE(INFO, "EMM-CTX - Add in context %p UE id %u", elm, elm->ueid);
RB_INSERT(emm_data_context_map, &emm_data->ctx_map, elm); RB_INSERT(emm_data_context_map, &emm_data->ctx_map, elm);
} }
......
...@@ -157,39 +157,45 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -157,39 +157,45 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
int encoded = 0; int encoded = 0;
int encode_result = 0; int encode_result = 0;
LOG_FUNC_IN;
/* Checking IEI and pointer */ /* Checking IEI and pointer */
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ATTACH_ACCEPT_MINIMUM_LENGTH, len); CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ATTACH_ACCEPT_MINIMUM_LENGTH, len);
*(buffer + encoded) = (encode_u8_eps_attach_result(&attach_accept->epsattachresult) & 0x0f); *(buffer + encoded) = (encode_u8_eps_attach_result(&attach_accept->epsattachresult) & 0x0f);
encoded++; encoded++;
if ((encode_result = encode_gprs_timer(&attach_accept->t3412value, 0, buffer if ((encode_result = encode_gprs_timer(&attach_accept->t3412value, 0, buffer
+ encoded, len - encoded)) < 0) //Return in case of error + encoded, len - encoded)) < 0) { //Return in case of error
return encode_result; LOG_TRACE(WARNING, "Failed encode_gprs_timer");
else LOG_FUNC_RETURN(encode_result);
} else
encoded += encode_result; encoded += encode_result;
if ((encode_result = if ((encode_result =
encode_tracking_area_identity_list(&attach_accept->tailist, 0, buffer encode_tracking_area_identity_list(&attach_accept->tailist, 0, buffer
+ encoded, len - encoded)) < 0) //Return in case of error + encoded, len - encoded)) < 0) { //Return in case of error
return encode_result; LOG_TRACE(WARNING, "Failed encode_tracking_area_identity_list");
else LOG_FUNC_RETURN(encode_result);
} else
encoded += encode_result; encoded += encode_result;
if ((encode_result = if ((encode_result =
encode_esm_message_container(&attach_accept->esmmessagecontainer, 0, encode_esm_message_container(&attach_accept->esmmessagecontainer, 0,
buffer + encoded, len - encoded)) < 0) //Return in case of error buffer + encoded, len - encoded)) < 0) { //Return in case of error
return encode_result; LOG_TRACE(WARNING, "Failed encode_esm_message_container");
else LOG_FUNC_RETURN(encode_result);
} else
encoded += encode_result; encoded += encode_result;
if ((attach_accept->presencemask & ATTACH_ACCEPT_GUTI_PRESENT) if ((attach_accept->presencemask & ATTACH_ACCEPT_GUTI_PRESENT)
== ATTACH_ACCEPT_GUTI_PRESENT) == ATTACH_ACCEPT_GUTI_PRESENT)
{ {
if ((encode_result = encode_eps_mobile_identity(&attach_accept->guti, if ((encode_result = encode_eps_mobile_identity(&attach_accept->guti,
ATTACH_ACCEPT_GUTI_IEI, buffer + encoded, len - encoded)) < 0) ATTACH_ACCEPT_GUTI_IEI, buffer + encoded, len - encoded)) < 0) {
// Return in case of error // Return in case of error
return encode_result; LOG_TRACE(WARNING, "Failed encode_eps_mobile_identity");
else LOG_FUNC_RETURN(encode_result);
} else
encoded += encode_result; encoded += encode_result;
} }
...@@ -199,10 +205,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -199,10 +205,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
if ((encode_result = if ((encode_result =
encode_location_area_identification(&attach_accept->locationareaidentification, encode_location_area_identification(&attach_accept->locationareaidentification,
ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_IEI, buffer + encoded, ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_IEI, buffer + encoded,
len - encoded)) < 0) len - encoded)) < 0) {
LOG_TRACE(WARNING, "Failed encode_location_area_identification");
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -211,10 +218,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -211,10 +218,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
{ {
if ((encode_result = encode_mobile_identity(&attach_accept->msidentity, if ((encode_result = encode_mobile_identity(&attach_accept->msidentity,
ATTACH_ACCEPT_MS_IDENTITY_IEI, buffer + encoded, len - encoded)) < ATTACH_ACCEPT_MS_IDENTITY_IEI, buffer + encoded, len - encoded)) <
0) 0) {
LOG_TRACE(WARNING, "Failed encode_mobile_identity");
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -223,10 +231,10 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -223,10 +231,10 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
{ {
if ((encode_result = encode_emm_cause(&attach_accept->emmcause, if ((encode_result = encode_emm_cause(&attach_accept->emmcause,
ATTACH_ACCEPT_EMM_CAUSE_IEI, buffer + encoded, len - encoded)) < ATTACH_ACCEPT_EMM_CAUSE_IEI, buffer + encoded, len - encoded)) <
0) 0) {
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -235,10 +243,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -235,10 +243,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
{ {
if ((encode_result = encode_gprs_timer(&attach_accept->t3402value, if ((encode_result = encode_gprs_timer(&attach_accept->t3402value,
ATTACH_ACCEPT_T3402_VALUE_IEI, buffer + encoded, len - encoded)) < ATTACH_ACCEPT_T3402_VALUE_IEI, buffer + encoded, len - encoded)) <
0) 0) {
LOG_TRACE(WARNING, "Failed encode_gprs_timer");
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -247,10 +256,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -247,10 +256,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
{ {
if ((encode_result = encode_gprs_timer(&attach_accept->t3423value, if ((encode_result = encode_gprs_timer(&attach_accept->t3423value,
ATTACH_ACCEPT_T3423_VALUE_IEI, buffer + encoded, len - encoded)) < ATTACH_ACCEPT_T3423_VALUE_IEI, buffer + encoded, len - encoded)) <
0) 0) {
LOG_TRACE(WARNING, "Failed encode_gprs_timer");
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -259,10 +269,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -259,10 +269,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
{ {
if ((encode_result = encode_plmn_list(&attach_accept->equivalentplmns, if ((encode_result = encode_plmn_list(&attach_accept->equivalentplmns,
ATTACH_ACCEPT_EQUIVALENT_PLMNS_IEI, buffer + encoded, len - ATTACH_ACCEPT_EQUIVALENT_PLMNS_IEI, buffer + encoded, len -
encoded)) < 0) encoded)) < 0) {
LOG_TRACE(WARNING, "Failed encode_plmn_list");
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -272,10 +283,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -272,10 +283,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
if ((encode_result = if ((encode_result =
encode_emergency_number_list(&attach_accept->emergencynumberlist, encode_emergency_number_list(&attach_accept->emergencynumberlist,
ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_IEI, buffer + encoded, len - ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_IEI, buffer + encoded, len -
encoded)) < 0) encoded)) < 0) {
LOG_TRACE(WARNING, "Failed encode_emergency_number_list");
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -285,10 +297,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -285,10 +297,11 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
if ((encode_result = if ((encode_result =
encode_eps_network_feature_support(&attach_accept->epsnetworkfeaturesupport, encode_eps_network_feature_support(&attach_accept->epsnetworkfeaturesupport,
ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_IEI, buffer + encoded, ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_IEI, buffer + encoded,
len - encoded)) < 0) len - encoded)) < 0) {
LOG_TRACE(WARNING, "Failed encode_eps_network_feature_support");
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -298,13 +311,14 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint ...@@ -298,13 +311,14 @@ int encode_attach_accept(attach_accept_msg *attach_accept, uint8_t *buffer, uint
if ((encode_result = if ((encode_result =
encode_additional_update_result(&attach_accept->additionalupdateresult, encode_additional_update_result(&attach_accept->additionalupdateresult,
ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_IEI, buffer + encoded, len ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_IEI, buffer + encoded, len
- encoded)) < 0) - encoded)) < 0) {
LOG_TRACE(WARNING, "Failed encode_additional_update_result");
// Return in case of error // Return in case of error
return encode_result; LOG_FUNC_RETURN(encode_result);
else } else
encoded += encode_result; encoded += encode_result;
} }
return encoded; LOG_FUNC_RETURN(encoded);
} }
...@@ -1708,6 +1708,8 @@ static int _emm_as_establish_cnf(const emm_as_establish_t *msg, ...@@ -1708,6 +1708,8 @@ static int _emm_as_establish_cnf(const emm_as_establish_t *msg,
/* Setup the initial NAS information message */ /* Setup the initial NAS information message */
if (emm_msg != NULL) switch (msg->NASinfo) { if (emm_msg != NULL) switch (msg->NASinfo) {
case EMM_AS_NAS_INFO_ATTACH: case EMM_AS_NAS_INFO_ATTACH:
LOG_TRACE(WARNING, "EMMAS-SAP - emm_as_establish.nasMSG.length"\
"=%d", msg->NASmsg.length);
size = emm_send_attach_accept(msg, &emm_msg->attach_accept); size = emm_send_attach_accept(msg, &emm_msg->attach_accept);
break; break;
......
...@@ -12,7 +12,7 @@ Product NAS stack ...@@ -12,7 +12,7 @@ Product NAS stack
Subsystem EPS Core Network Subsystem EPS Core Network
Author Sebastien Roux Author Sebastien Roux, Lionel GAUTHIER
Description Description
...@@ -30,6 +30,26 @@ Description ...@@ -30,6 +30,26 @@ Description
#include "emm_proc.h" #include "emm_proc.h"
#include "emm_cause.h" #include "emm_cause.h"
#include "esm_send.h" // LG
#include "esm_proc.h" // LG
#include "esm_cause.h" // LG
#include "assertions.h"// LG
#include "emmData.h" // LG
#include "esm_sap.h" // LG
#include "EmmCommon.h" // LG
extern int emm_cn_wrapper_attach_accept(emm_data_context_t *emm_ctx, void *data);
/*
* Internal data used for attach procedure
*/
typedef struct {
unsigned int ueid; /* UE identifier */
#define ATTACH_COUNTER_MAX 5
unsigned int retransmission_count; /* Retransmission counter */
OctetString esm_msg; /* ESM message to be sent within
* the Attach Accept message */
} attach_data_t;
/* /*
* String representation of EMMCN-SAP primitives * String representation of EMMCN-SAP primitives
*/ */
...@@ -37,8 +57,13 @@ static const char *_emm_cn_primitive_str[] = { ...@@ -37,8 +57,13 @@ static const char *_emm_cn_primitive_str[] = {
"EMM_CN_AUTHENTICATION_PARAM_RES", "EMM_CN_AUTHENTICATION_PARAM_RES",
"EMM_CN_AUTHENTICATION_PARAM_FAIL", "EMM_CN_AUTHENTICATION_PARAM_FAIL",
"EMM_CN_DEREGISTER_UE", "EMM_CN_DEREGISTER_UE",
"EMM_CN_PDN_CONNECTIVITY_RES",
"EMM_CN_PDN_CONNECTIVITY_FAIL",
}; };
#define EMM_CN_SAP_BUFFER_SIZE 4096
static char _emm_cn_sap_buffer[EMM_CN_SAP_BUFFER_SIZE];
static int _emm_cn_authentication_res(const emm_cn_auth_res_t *msg) static int _emm_cn_authentication_res(const emm_cn_auth_res_t *msg)
{ {
emm_data_context_t *emm_ctx = NULL; emm_data_context_t *emm_ctx = NULL;
...@@ -111,6 +136,183 @@ static int _emm_cn_deregister_ue(const UInt32_t ue_id) ...@@ -111,6 +136,183 @@ static int _emm_cn_deregister_ue(const UInt32_t ue_id)
LOG_FUNC_RETURN (rc); LOG_FUNC_RETURN (rc);
} }
static int _emm_cn_pdn_connectivity_res(const emm_cn_pdn_res_t *msg_pP)
{
int rc = RETURNok;
struct emm_data_context_s *emm_ctx_p = NULL;
esm_proc_pdn_type_t esm_pdn_type = ESM_PDN_TYPE_IPV4;
esm_proc_data_t *esm_proc_data_p = NULL;
ESM_msg esm_msg;
EpsQualityOfService qos;
OctetString rsp = { 0, NULL};
int is_standalone = 0; // warning hardcoded
int triggered_by_ue = 1; // warning hardcoded
attach_data_t *data_p = NULL;
int esm_cause = ESM_CAUSE_SUCCESS;
int pid = 0;
unsigned int new_ebi = 0;
LOG_FUNC_IN;
emm_ctx_p = emm_data_context_get(&_emm_data, msg_pP->ue_id);
if (emm_ctx_p == NULL) {
LOG_TRACE(ERROR, "EMMCN-SAP - "
"Failed to find UE associated to id %u...", msg_pP->ue_id);
LOG_FUNC_RETURN (rc);
}
memset(&esm_msg, 0 , sizeof(ESM_msg));
switch (msg_pP->pdn_type) {
case IPv4:
esm_pdn_type = ESM_PDN_TYPE_IPV4;
break;
case IPv6:
esm_pdn_type = ESM_PDN_TYPE_IPV6;
break;
case IPv4_AND_v6:
esm_pdn_type = ESM_PDN_TYPE_IPV4V6;
break;
default:
esm_pdn_type = ESM_PDN_TYPE_IPV4;
}
qos.bitRatesPresent = 1;
qos.bitRatesExtPresent = 0;
qos.qci = msg_pP->qos.qci;
qos.bitRates.maxBitRateForUL = msg_pP->qos.mbrUL;
qos.bitRates.maxBitRateForDL = msg_pP->qos.mbrDL;
qos.bitRates.guarBitRateForUL = msg_pP->qos.gbrUL;
qos.bitRates.guarBitRateForDL = msg_pP->qos.gbrDL;
qos.bitRatesExt.maxBitRateForUL = 0;
qos.bitRatesExt.maxBitRateForDL = 0;
qos.bitRatesExt.guarBitRateForUL = 0;
qos.bitRatesExt.guarBitRateForDL = 0;
/*************************************************************************/
/* CODE THAT WAS IN esm_recv.c/esm_recv_pdn_connectivity_request() */
/*************************************************************************/
/* Execute the PDN connectivity procedure requested by the UE */
pid = esm_proc_pdn_connectivity_request(
emm_ctx_p,
msg_pP->pti,
msg_pP->request_type,
&msg_pP->apn,
esm_pdn_type,
&msg_pP->pdn_addr,
NULL,
&esm_cause);
LOG_TRACE(INFO, "EMM - APN = %s ", (char *)(msg_pP->apn.value));
if (pid != RETURNerror) {
/* Create local default EPS bearer context */
rc = esm_proc_default_eps_bearer_context(
emm_ctx_p,
pid,
&new_ebi,
&msg_pP->qos,
&esm_cause);
if (rc != RETURNerror) {
esm_cause = ESM_CAUSE_SUCCESS;
}
} else {
LOG_FUNC_RETURN (rc);
}
/**************************************************************************/
/* END OF CODE THAT WAS IN esm_recv.c/esm_recv_pdn_connectivity_request() */
/**************************************************************************/
LOG_TRACE(INFO, "EMM - APN = %s ", (char *)(msg_pP->apn.value));
/*************************************************************************/
/* CODE THAT WAS IN esm_sap.c/_esm_sap_recv() */
/*************************************************************************/
/* Return default EPS bearer context request message */
rc = esm_send_activate_default_eps_bearer_context_request(
msg_pP->pti,
new_ebi, //msg_pP->ebi,
&esm_msg.activate_default_eps_bearer_context_request,
&msg_pP->apn,
esm_pdn_type,
&msg_pP->pdn_addr,
&qos,
ESM_CAUSE_SUCCESS);
if (rc != RETURNerror) {
/* Encode the returned ESM response message */
int size = esm_msg_encode(&esm_msg, (uint8_t *)_emm_cn_sap_buffer,
EMM_CN_SAP_BUFFER_SIZE);
LOG_TRACE(INFO, "ESM encoded MSG size %d ", size);
if (size > 0) {
rsp.length = size;
rsp.value = (uint8_t *)(_emm_cn_sap_buffer);
}
/* Complete the relevant ESM procedure */
rc = esm_proc_default_eps_bearer_context_request(
is_standalone,
emm_ctx_p,
new_ebi, //0, //ESM_EBI_UNASSIGNED, //msg->ebi,
&rsp,
triggered_by_ue);
if (rc != RETURNok) {
/* Return indication that ESM procedure failed */
LOG_FUNC_RETURN (rc);
}
} else {
LOG_TRACE(INFO, "ESM send activate_default_eps_bearer_context_request failed");
}
/*************************************************************************/
/* END OF CODE THAT WAS IN esm_sap.c/_esm_sap_recv() */
/*************************************************************************/
LOG_TRACE(INFO, "EMM - APN = %s ", (char *)(msg_pP->apn.value));
data_p = (attach_data_t *)emm_proc_common_get_args(msg_pP->ue_id);
/* Setup the ESM message container */
data_p->esm_msg.value = (uint8_t *)malloc(rsp.length);
if (data_p->esm_msg.value) {
data_p->esm_msg.length = rsp.length;
LOG_TRACE(INFO, "EMM - copy ESM MSG %d bytes", data_p->esm_msg.length);
memcpy(data_p->esm_msg.value,
rsp.value,
rsp.length);
} else {
data_p->esm_msg.length = 0;
}
/* Send attach accept message to the UE */
rc = emm_cn_wrapper_attach_accept(emm_ctx_p, data_p);
if (rc != RETURNerror) {
if (emm_ctx_p->guti_is_new && emm_ctx_p->old_guti) {
/* Implicit GUTI reallocation;
* Notify EMM that common procedure has been initiated
*/
emm_sap_t emm_sap;
emm_sap.primitive = EMMREG_COMMON_PROC_REQ;
emm_sap.u.emm_reg.ueid = msg_pP->ue_id;
rc = emm_sap_send(&emm_sap);
}
}
LOG_TRACE(INFO, "EMM - APN = %s ", (char *)(msg_pP->apn.value));
LOG_FUNC_RETURN (rc);
}
static int _emm_cn_pdn_connectivity_fail(const emm_cn_pdn_fail_t *msg)
{
int rc = RETURNok;
LOG_FUNC_IN;
LOG_FUNC_RETURN (rc);
}
int emm_cn_send(const emm_cn_t *msg) int emm_cn_send(const emm_cn_t *msg)
{ {
int rc = RETURNerror; int rc = RETURNerror;
...@@ -134,6 +336,14 @@ int emm_cn_send(const emm_cn_t *msg) ...@@ -134,6 +336,14 @@ int emm_cn_send(const emm_cn_t *msg)
rc = _emm_cn_deregister_ue(msg->u.deregister.UEid); rc = _emm_cn_deregister_ue(msg->u.deregister.UEid);
break; break;
case EMMCN_PDN_CONNECTIVITY_RES:
rc = _emm_cn_pdn_connectivity_res(msg->u.emm_cn_pdn_res);
break;
case EMMCN_PDN_CONNECTIVITY_FAIL:
rc = _emm_cn_pdn_connectivity_fail(msg->u.emm_cn_pdn_fail);
break;
default: default:
/* Other primitives are forwarded to the Access Stratum */ /* Other primitives are forwarded to the Access Stratum */
rc = RETURNerror; rc = RETURNerror;
......
...@@ -12,7 +12,7 @@ Product NAS stack ...@@ -12,7 +12,7 @@ Product NAS stack
Subsystem EPS Core Network Subsystem EPS Core Network
Author Sebastien Roux Author Sebastien Roux, Lionel GAUTHIER
Description Description
......
...@@ -12,7 +12,7 @@ Product NAS stack ...@@ -12,7 +12,7 @@ Product NAS stack
Subsystem EPS Core Network Subsystem EPS Core Network
Author Sebastien Roux Author Sebastien Roux, Lionel GAUTHIER
Description Description
...@@ -31,6 +31,8 @@ typedef enum emmcn_primitive_s { ...@@ -31,6 +31,8 @@ typedef enum emmcn_primitive_s {
_EMMCN_AUTHENTICATION_PARAM_RES, _EMMCN_AUTHENTICATION_PARAM_RES,
_EMMCN_AUTHENTICATION_PARAM_FAIL, _EMMCN_AUTHENTICATION_PARAM_FAIL,
_EMMCN_DEREGISTER_UE, _EMMCN_DEREGISTER_UE,
_EMMCN_PDN_CONNECTIVITY_RES, // LG
_EMMCN_PDN_CONNECTIVITY_FAIL,// LG
#endif #endif
_EMMCN_END _EMMCN_END
} emm_cn_primitive_t; } emm_cn_primitive_t;
...@@ -38,6 +40,8 @@ typedef enum emmcn_primitive_s { ...@@ -38,6 +40,8 @@ typedef enum emmcn_primitive_s {
#if defined(EPC_BUILD) #if defined(EPC_BUILD)
typedef nas_auth_param_rsp_t emm_cn_auth_res_t; typedef nas_auth_param_rsp_t emm_cn_auth_res_t;
typedef nas_auth_param_fail_t emm_cn_auth_fail_t; typedef nas_auth_param_fail_t emm_cn_auth_fail_t;
typedef nas_pdn_connectivity_rsp_t emm_cn_pdn_res_t;
typedef nas_pdn_connectivity_fail_t emm_cn_pdn_fail_t;
typedef struct emm_cn_deregister_ue_s { typedef struct emm_cn_deregister_ue_s {
UInt32_t UEid; UInt32_t UEid;
...@@ -49,6 +53,8 @@ typedef struct emm_mme_ul_s { ...@@ -49,6 +53,8 @@ typedef struct emm_mme_ul_s {
emm_cn_auth_res_t *auth_res; emm_cn_auth_res_t *auth_res;
emm_cn_auth_fail_t *auth_fail; emm_cn_auth_fail_t *auth_fail;
emm_cn_deregister_ue_t deregister; emm_cn_deregister_ue_t deregister;
emm_cn_pdn_res_t *emm_cn_pdn_res;
emm_cn_pdn_fail_t *emm_cn_pdn_fail;
} u; } u;
} emm_cn_t; } emm_cn_t;
#endif #endif
......
...@@ -110,7 +110,9 @@ typedef enum { ...@@ -110,7 +110,9 @@ typedef enum {
#ifdef EPC_BUILD #ifdef EPC_BUILD
EMMCN_AUTHENTICATION_PARAM_RES = _EMMCN_AUTHENTICATION_PARAM_RES, EMMCN_AUTHENTICATION_PARAM_RES = _EMMCN_AUTHENTICATION_PARAM_RES,
EMMCN_AUTHENTICATION_PARAM_FAIL = _EMMCN_AUTHENTICATION_PARAM_FAIL, EMMCN_AUTHENTICATION_PARAM_FAIL = _EMMCN_AUTHENTICATION_PARAM_FAIL,
EMMCN_DEREGISTER_UE = _EMMCN_DEREGISTER_UE EMMCN_DEREGISTER_UE = _EMMCN_DEREGISTER_UE,
EMMCN_PDN_CONNECTIVITY_RES = _EMMCN_PDN_CONNECTIVITY_RES,
EMMCN_PDN_CONNECTIVITY_FAIL = _EMMCN_PDN_CONNECTIVITY_FAIL
#endif #endif
} emm_primitive_t; } emm_primitive_t;
......
...@@ -177,6 +177,7 @@ int emm_send_attach_request(const emm_as_establish_t *msg, ...@@ -177,6 +177,7 @@ int emm_send_attach_request(const emm_as_establish_t *msg,
/* Mandatory - EPS mobile identity */ /* Mandatory - EPS mobile identity */
size += EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH; size += EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH;
if (msg->UEid.guti) { if (msg->UEid.guti) {
LOG_TRACE(INFO, "EMMAS-SAP - Send Attach Request message with GUTI");
/* Set GUTI mobile identity */ /* Set GUTI mobile identity */
GutiEpsMobileIdentity_t *guti = &emm_msg->oldgutiorimsi.guti; GutiEpsMobileIdentity_t *guti = &emm_msg->oldgutiorimsi.guti;
guti->typeofidentity = EPS_MOBILE_IDENTITY_GUTI; guti->typeofidentity = EPS_MOBILE_IDENTITY_GUTI;
...@@ -191,6 +192,7 @@ int emm_send_attach_request(const emm_as_establish_t *msg, ...@@ -191,6 +192,7 @@ int emm_send_attach_request(const emm_as_establish_t *msg,
guti->mncdigit2 = msg->UEid.guti->gummei.plmn.MNCdigit2; guti->mncdigit2 = msg->UEid.guti->gummei.plmn.MNCdigit2;
guti->mncdigit3 = msg->UEid.guti->gummei.plmn.MNCdigit3; guti->mncdigit3 = msg->UEid.guti->gummei.plmn.MNCdigit3;
} else if (msg->UEid.imsi) { } else if (msg->UEid.imsi) {
LOG_TRACE(INFO, "EMMAS-SAP - Send Attach Request message with IMSI");
/* Set IMSI mobile identity */ /* Set IMSI mobile identity */
ImsiEpsMobileIdentity_t *imsi = &emm_msg->oldgutiorimsi.imsi; ImsiEpsMobileIdentity_t *imsi = &emm_msg->oldgutiorimsi.imsi;
imsi->typeofidentity = EPS_MOBILE_IDENTITY_IMSI; imsi->typeofidentity = EPS_MOBILE_IDENTITY_IMSI;
...@@ -211,6 +213,7 @@ int emm_send_attach_request(const emm_as_establish_t *msg, ...@@ -211,6 +213,7 @@ int emm_send_attach_request(const emm_as_establish_t *msg,
imsi->digit14 = msg->UEid.imsi->u.num.digit14; imsi->digit14 = msg->UEid.imsi->u.num.digit14;
imsi->digit15 = msg->UEid.imsi->u.num.digit15; imsi->digit15 = msg->UEid.imsi->u.num.digit15;
} else if (msg->UEid.imei) { } else if (msg->UEid.imei) {
LOG_TRACE(INFO, "EMMAS-SAP - Send Attach Request message with IMEI");
/* Set IMEI mobile identity */ /* Set IMEI mobile identity */
ImeiEpsMobileIdentity_t *imei = &emm_msg->oldgutiorimsi.imei; ImeiEpsMobileIdentity_t *imei = &emm_msg->oldgutiorimsi.imei;
imei->typeofidentity = EPS_MOBILE_IDENTITY_IMEI; imei->typeofidentity = EPS_MOBILE_IDENTITY_IMEI;
...@@ -897,6 +900,8 @@ int emm_send_attach_accept(const emm_as_establish_t *msg, ...@@ -897,6 +900,8 @@ int emm_send_attach_accept(const emm_as_establish_t *msg,
int size = EMM_HEADER_MAXIMUM_LENGTH; int size = EMM_HEADER_MAXIMUM_LENGTH;
LOG_TRACE(INFO, "EMMAS-SAP - Send Attach Accept message"); LOG_TRACE(INFO, "EMMAS-SAP - Send Attach Accept message");
LOG_TRACE(INFO, "EMMAS-SAP - size = EMM_HEADER_MAXIMUM_LENGTH(%d)",
size);
/* Mandatory - Message type */ /* Mandatory - Message type */
emm_msg->messagetype = ATTACH_ACCEPT; emm_msg->messagetype = ATTACH_ACCEPT;
...@@ -908,6 +913,8 @@ int emm_send_attach_accept(const emm_as_establish_t *msg, ...@@ -908,6 +913,8 @@ int emm_send_attach_accept(const emm_as_establish_t *msg,
/* Mandatory - T3412 value */ /* Mandatory - T3412 value */
size += GPRS_TIMER_MAXIMUM_LENGTH; size += GPRS_TIMER_MAXIMUM_LENGTH;
emm_msg->t3412value.unit = GPRS_TIMER_UNIT_0S; emm_msg->t3412value.unit = GPRS_TIMER_UNIT_0S;
LOG_TRACE(INFO, "EMMAS-SAP - size += GPRS_TIMER_MAXIMUM_LENGTH(%d) (%d)",
GPRS_TIMER_MAXIMUM_LENGTH, size);
/* Mandatory - Tracking area identity list */ /* Mandatory - Tracking area identity list */
size += TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH; size += TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH;
...@@ -921,10 +928,20 @@ int emm_send_attach_accept(const emm_as_establish_t *msg, ...@@ -921,10 +928,20 @@ int emm_send_attach_accept(const emm_as_establish_t *msg,
emm_msg->tailist.mncdigit2 = msg->UEid.guti->gummei.plmn.MNCdigit2; emm_msg->tailist.mncdigit2 = msg->UEid.guti->gummei.plmn.MNCdigit2;
emm_msg->tailist.mncdigit3 = msg->UEid.guti->gummei.plmn.MNCdigit3; emm_msg->tailist.mncdigit3 = msg->UEid.guti->gummei.plmn.MNCdigit3;
emm_msg->tailist.tac = msg->tac; emm_msg->tailist.tac = msg->tac;
LOG_TRACE(INFO,
"EMMAS-SAP - size += "\
"TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH(%d) (%d)",
TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH,
size);
/* Mandatory - ESM message container */ /* Mandatory - ESM message container */
size += ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH + msg->NASmsg.length; size += ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH + msg->NASmsg.length;
emm_msg->esmmessagecontainer.esmmessagecontainercontents = msg->NASmsg; emm_msg->esmmessagecontainer.esmmessagecontainercontents = msg->NASmsg;
LOG_TRACE(INFO,
"EMMAS-SAP - size += "\
"ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH(%d) (%d)",
ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH,
size);
/* Optional - GUTI */ /* Optional - GUTI */
if (msg->new_guti) { if (msg->new_guti) {
...@@ -941,6 +958,11 @@ int emm_send_attach_accept(const emm_as_establish_t *msg, ...@@ -941,6 +958,11 @@ int emm_send_attach_accept(const emm_as_establish_t *msg,
emm_msg->guti.guti.mncdigit1 = msg->new_guti->gummei.plmn.MNCdigit1; emm_msg->guti.guti.mncdigit1 = msg->new_guti->gummei.plmn.MNCdigit1;
emm_msg->guti.guti.mncdigit2 = msg->new_guti->gummei.plmn.MNCdigit2; emm_msg->guti.guti.mncdigit2 = msg->new_guti->gummei.plmn.MNCdigit2;
emm_msg->guti.guti.mncdigit3 = msg->new_guti->gummei.plmn.MNCdigit3; emm_msg->guti.guti.mncdigit3 = msg->new_guti->gummei.plmn.MNCdigit3;
LOG_TRACE(INFO,
"EMMAS-SAP - size += "\
"EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH(%d) (%d)",
EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH,
size);
} }
LOG_FUNC_RETURN (size); LOG_FUNC_RETURN (size);
} }
......
...@@ -177,13 +177,16 @@ int esm_proc_default_eps_bearer_context_request(int is_standalone, ...@@ -177,13 +177,16 @@ int esm_proc_default_eps_bearer_context_request(int is_standalone,
LOG_FUNC_IN; LOG_FUNC_IN;
LOG_TRACE(INFO,"ESM-PROC - Initiate default EPS bearer context activation "
"(ueid=%u, ebi=%d)", ctx->ueid, ebi);
if (is_standalone) { if (is_standalone) {
/* Send activate default EPS bearer context request message and /* Send activate default EPS bearer context request message and
* start timer T3485 */ * start timer T3485 */
LOG_TRACE(INFO,"ESM-PROC - Initiate standalone default EPS bearer context activation "
"(ueid=%u, ebi=%d)", ctx->ueid, ebi);
rc = _default_eps_bearer_activate(ctx, ebi, msg); rc = _default_eps_bearer_activate(ctx, ebi, msg);
} else {
LOG_TRACE(INFO,"ESM-PROC - Initiate non standalone default EPS bearer context activation "
"(ueid=%u, ebi=%d)", ctx->ueid, ebi);
} }
if (rc != RETURNerror) { if (rc != RETURNerror) {
......
...@@ -617,10 +617,11 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti, ...@@ -617,10 +617,11 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti,
LOG_FUNC_IN; LOG_FUNC_IN;
LOG_TRACE(INFO, "ESM-PROC - PDN connectivity requested by the UE " LOG_TRACE(INFO, "ESM-PROC - PDN connectivity requested by the UE "
"(ueid=%u, pti=%d) PDN type = %s, APN = %s", ctx->ueid, pti, "(ueid=%u, pti=%d) PDN type = %s, APN = %s pdn addr = %s", ctx->ueid, pti,
(pdn_type == ESM_PDN_TYPE_IPV4)? "IPv4" : (pdn_type == ESM_PDN_TYPE_IPV4)? "IPv4" :
(pdn_type == ESM_PDN_TYPE_IPV6)? "IPv6" : "IPv4v6", (pdn_type == ESM_PDN_TYPE_IPV6)? "IPv6" : "IPv4v6",
(apn) ? (char *)(apn->value) : "null"); (apn) ? (char *)(apn->value) : "null",
(pdn_addr) ? (char *)(pdn_addr->value) : "null");
#if !defined(EPC_BUILD) #if !defined(EPC_BUILD)
/* UE identifier sanity check */ /* UE identifier sanity check */
...@@ -634,6 +635,9 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti, ...@@ -634,6 +635,9 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti,
* Check network IP capabilities * Check network IP capabilities
*/ */
*esm_cause = ESM_CAUSE_SUCCESS; *esm_cause = ESM_CAUSE_SUCCESS;
LOG_TRACE(INFO, "ESM-PROC - _esm_data.conf.features %08x", _esm_data.conf.features);
#warning "Uncomment code about _esm_data.conf.features & (MME_API_IPV4 | MME_API_IPV6) later"
#if defined(ORIGINAL_CODE)
switch (_esm_data.conf.features & (MME_API_IPV4 | MME_API_IPV6)) { switch (_esm_data.conf.features & (MME_API_IPV4 | MME_API_IPV6)) {
case (MME_API_IPV4 | MME_API_IPV6): case (MME_API_IPV4 | MME_API_IPV6):
/* The network supports both IPv4 and IPv6 connection */ /* The network supports both IPv4 and IPv6 connection */
...@@ -660,11 +664,19 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti, ...@@ -660,11 +664,19 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti,
rc = RETURNok; rc = RETURNok;
} }
break; break;
}
default:
LOG_TRACE(ERROR,
"ESM-PROC - _esm_data.conf.features incorrect value (no IPV4 or IPV6 ) %X",
_esm_data.conf.features);
}
#else
rc = RETURNok;
#endif
if (rc != RETURNerror) { if (rc != RETURNerror) {
mme_api_ip_version_t mme_pdn_index;
int is_emergency = (request_type == ESM_PDN_REQUEST_EMERGENCY); int is_emergency = (request_type == ESM_PDN_REQUEST_EMERGENCY);
#if defined(ORIGINAL_CODE)
mme_api_ip_version_t mme_pdn_index;
mme_api_qos_t qos; mme_api_qos_t qos;
switch (pdn_type) switch (pdn_type)
...@@ -692,11 +704,12 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti, ...@@ -692,11 +704,12 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti,
*esm_cause = ESM_CAUSE_REQUEST_REJECTED_UNSPECIFIED; *esm_cause = ESM_CAUSE_REQUEST_REJECTED_UNSPECIFIED;
LOG_FUNC_RETURN (RETURNerror); LOG_FUNC_RETURN (RETURNerror);
} }
#endif
/* Create new PDN connection */ /* Create new PDN connection */
pid = _pdn_connectivity_create(ctx, pti, apn, pdn_type, pid = _pdn_connectivity_create(ctx, pti, apn, pdn_type,
pdn_addr, is_emergency); pdn_addr, is_emergency);
#if defined(ORIGINAL_CODE)
/* Setup ESM QoS parameters */ /* Setup ESM QoS parameters */
if (esm_qos) { if (esm_qos) {
esm_qos->gbrUL = qos.gbr[MME_API_UPLINK]; esm_qos->gbrUL = qos.gbr[MME_API_UPLINK];
...@@ -705,7 +718,7 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti, ...@@ -705,7 +718,7 @@ int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti,
esm_qos->mbrDL = qos.mbr[MME_API_DOWNLINK]; esm_qos->mbrDL = qos.mbr[MME_API_DOWNLINK];
esm_qos->qci = qos.qci; esm_qos->qci = qos.qci;
} }
#endif
if (pid < 0) { if (pid < 0) {
LOG_TRACE(WARNING, "ESM-PROC - Failed to create PDN connection"); LOG_TRACE(WARNING, "ESM-PROC - Failed to create PDN connection");
*esm_cause = ESM_CAUSE_INSUFFICIENT_RESOURCES; *esm_cause = ESM_CAUSE_INSUFFICIENT_RESOURCES;
......
...@@ -358,6 +358,8 @@ int esm_ebr_start_timer(emm_data_context_t *ctx, int ebi, const OctetString *msg ...@@ -358,6 +358,8 @@ int esm_ebr_start_timer(emm_data_context_t *ctx, int ebi, const OctetString *msg
LOG_FUNC_IN; LOG_FUNC_IN;
if ( (ebi < ESM_EBI_MIN) || (ebi > ESM_EBI_MAX) ) { if ( (ebi < ESM_EBI_MIN) || (ebi > ESM_EBI_MAX) ) {
LOG_TRACE(ERROR, "ESM-FSM - Retransmission timer bad ebi %d",
ebi);
LOG_FUNC_RETURN (RETURNerror); LOG_FUNC_RETURN (RETURNerror);
} }
...@@ -365,6 +367,7 @@ int esm_ebr_start_timer(emm_data_context_t *ctx, int ebi, const OctetString *msg ...@@ -365,6 +367,7 @@ int esm_ebr_start_timer(emm_data_context_t *ctx, int ebi, const OctetString *msg
ebr_ctx = ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]; ebr_ctx = ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN];
if ( (ebr_ctx == NULL) || (ebr_ctx->ebi != ebi) ) { if ( (ebr_ctx == NULL) || (ebr_ctx->ebi != ebi) ) {
/* EPS bearer context not assigned */ /* EPS bearer context not assigned */
LOG_TRACE(ERROR, "ESM-FSM - EPS bearer context not assigned");
LOG_FUNC_RETURN (RETURNerror); LOG_FUNC_RETURN (RETURNerror);
} }
...@@ -401,6 +404,10 @@ int esm_ebr_start_timer(emm_data_context_t *ctx, int ebi, const OctetString *msg ...@@ -401,6 +404,10 @@ int esm_ebr_start_timer(emm_data_context_t *ctx, int ebi, const OctetString *msg
LOG_TRACE(INFO, "ESM-FSM - Retransmission timer %d expires in " LOG_TRACE(INFO, "ESM-FSM - Retransmission timer %d expires in "
"%ld seconds", ebr_ctx->timer.id, ebr_ctx->timer.sec); "%ld seconds", ebr_ctx->timer.id, ebr_ctx->timer.sec);
LOG_FUNC_RETURN (RETURNok); LOG_FUNC_RETURN (RETURNok);
} else {
LOG_TRACE(ERROR, "ESM-FSM - ebr_ctx->args == NULL(%p) or ebr_ctx->timer.id == NAS_TIMER_INACTIVE_ID == -1 (%d)" ,
ebr_ctx->args,
ebr_ctx->timer.id);
} }
LOG_FUNC_RETURN (RETURNerror); LOG_FUNC_RETURN (RETURNerror);
} }
......
...@@ -34,6 +34,14 @@ Description Defines functions used to handle EPS bearer contexts. ...@@ -34,6 +34,14 @@ Description Defines functions used to handle EPS bearer contexts.
# include "assertions.h" # include "assertions.h"
#endif #endif
#ifdef NAS_UE
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
/****************************************************************************/ /****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/ /**************** E X T E R N A L D E F I N I T I O N S ****************/
/****************************************************************************/ /****************************************************************************/
...@@ -184,6 +192,88 @@ int esm_ebr_context_create( ...@@ -184,6 +192,88 @@ int esm_ebr_context_create(
if (pdn->is_emergency) { if (pdn->is_emergency) {
esm_ctx->emergency = TRUE; esm_ctx->emergency = TRUE;
} }
#ifdef NAS_UE
// LG ADD TEMP
{
char *tmp = NULL;
char ipv4_addr[INET_ADDRSTRLEN];
char ipv6_addr[INET6_ADDRSTRLEN];
char *netmask = NULL;
char broadcast[INET_ADDRSTRLEN];
struct in_addr in_addr;
char command_line[128];
int res;
switch (pdn->type) {
case NET_PDN_TYPE_IPV4V6:
ipv6_addr[0] = pdn->ip_addr[4];
// etc
case NET_PDN_TYPE_IPV4:
in_addr.s_addr = pdn->ip_addr[0] << 24;
in_addr.s_addr |= pdn->ip_addr[1] << 16;
in_addr.s_addr |= pdn->ip_addr[2] << 8;
in_addr.s_addr |= pdn->ip_addr[3] ;
tmp = inet_ntoa(in_addr);
// AssertFatal(tmp ,
// "error in PDN IPv4 address %x",
// in_addr.s_addr);
strcpy(ipv4_addr, tmp);
if (IN_CLASSA(in_addr.s_addr)) {
netmask = "255.0.0.0";
in_addr.s_addr = pdn->ip_addr[0] << 24;
in_addr.s_addr |= 255 << 16;
in_addr.s_addr |= 255 << 8;
in_addr.s_addr |= 255 ;
tmp = inet_ntoa(in_addr);
// AssertFatal(tmp ,
// "error in PDN IPv4 address %x",
// in_addr.s_addr);
strcpy(broadcast, tmp);
} else if (IN_CLASSB(in_addr.s_addr)) {
netmask = "255.255.0.0";
in_addr.s_addr = pdn->ip_addr[0] << 24;
in_addr.s_addr |= pdn->ip_addr[1] << 16;
in_addr.s_addr |= 255 << 8;
in_addr.s_addr |= 255 ;
tmp = inet_ntoa(in_addr);
// AssertFatal(tmp ,
// "error in PDN IPv4 address %x",
// in_addr.s_addr);
strcpy(broadcast, tmp);
} else if (IN_CLASSC(in_addr.s_addr)) {
netmask = "255.255.255.0";
in_addr.s_addr = pdn->ip_addr[0] << 24;
in_addr.s_addr |= pdn->ip_addr[1] << 16;
in_addr.s_addr |= pdn->ip_addr[2] << 8;
in_addr.s_addr |= 255 ;
tmp = inet_ntoa(in_addr);
// AssertFatal(tmp ,
// "error in PDN IPv4 address %x",
// in_addr.s_addr);
strcpy(broadcast, tmp);
} else {
netmask = "255.255.255.255";
strcpy(broadcast, ipv4_addr);
}
res = sprintf(command_line,
"ifconfig oip1 %s netmask %s broadcast %s up",
ipv4_addr, netmask, broadcast);
// AssertFatal((res > 0) && (res < 128),
// "error in system command line");
LOG_TRACE(INFO, "ESM-PROC - executing %s ",
command_line);
system(command_line);
break;
case NET_PDN_TYPE_IPV6:
break;
default:
break;
}
}
// AssertFatal(0, "Forced stop in NAS UE");
#endif
} }
/* Return the EPS bearer identity of the default EPS bearer /* Return the EPS bearer identity of the default EPS bearer
......
...@@ -139,23 +139,26 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -139,23 +139,26 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_eps_quality_of_service(&activate_default_eps_bearer_context_request->epsqos, encode_eps_quality_of_service(&activate_default_eps_bearer_context_request->epsqos,
0, buffer + encoded, len - encoded)) < 0) //Return in case of error 0, buffer + encoded, len - encoded)) < 0) { //Return in case of error
LOG_TRACE(ERROR, "ESM ENCODE epsqos");
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
if ((encode_result = if ((encode_result =
encode_access_point_name(&activate_default_eps_bearer_context_request->accesspointname, encode_access_point_name(&activate_default_eps_bearer_context_request->accesspointname,
0, buffer + encoded, len - encoded)) < 0) //Return in case of error 0, buffer + encoded, len - encoded)) < 0) { //Return in case of error
LOG_TRACE(ERROR, "ESM ENCODE accesspointname");
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
if ((encode_result = if ((encode_result =
encode_pdn_address(&activate_default_eps_bearer_context_request->pdnaddress, encode_pdn_address(&activate_default_eps_bearer_context_request->pdnaddress,
0, buffer + encoded, len - encoded)) < 0) //Return in case of error 0, buffer + encoded, len - encoded)) < 0) { //Return in case of error
LOG_TRACE(ERROR, "ESM ENCODE pdnaddress");
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
if ((activate_default_eps_bearer_context_request->presencemask & ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT) if ((activate_default_eps_bearer_context_request->presencemask & ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT)
...@@ -164,10 +167,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -164,10 +167,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_transaction_identifier(&activate_default_eps_bearer_context_request->transactionidentifier, encode_transaction_identifier(&activate_default_eps_bearer_context_request->transactionidentifier,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_IEI, ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_IEI,
buffer + encoded, len - encoded)) < 0) buffer + encoded, len - encoded)) < 0) {
LOG_TRACE(ERROR, "ESM ENCODE transactionidentifier");
// Return in case of error // Return in case of error
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -177,10 +181,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -177,10 +181,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_quality_of_service(&activate_default_eps_bearer_context_request->negotiatedqos, encode_quality_of_service(&activate_default_eps_bearer_context_request->negotiatedqos,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_IEI, ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_IEI,
buffer + encoded, len - encoded)) < 0) buffer + encoded, len - encoded)) < 0) {
LOG_TRACE(ERROR, "ESM ENCODE negotiatedqos");
// Return in case of error // Return in case of error
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -190,10 +195,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -190,10 +195,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_llc_service_access_point_identifier(&activate_default_eps_bearer_context_request->negotiatedllcsapi, encode_llc_service_access_point_identifier(&activate_default_eps_bearer_context_request->negotiatedllcsapi,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_IEI, ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_IEI,
buffer + encoded, len - encoded)) < 0) buffer + encoded, len - encoded)) < 0) {
LOG_TRACE(ERROR, "ESM ENCODE negotiatedllcsapi");
// Return in case of error // Return in case of error
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -203,10 +209,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -203,10 +209,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_radio_priority(&activate_default_eps_bearer_context_request->radiopriority, encode_radio_priority(&activate_default_eps_bearer_context_request->radiopriority,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_IEI, ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_IEI,
buffer + encoded, len - encoded)) < 0) buffer + encoded, len - encoded)) < 0) {
LOG_TRACE(ERROR, "ESM ENCODE radiopriority");
// Return in case of error // Return in case of error
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -216,10 +223,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -216,10 +223,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_packet_flow_identifier(&activate_default_eps_bearer_context_request->packetflowidentifier, encode_packet_flow_identifier(&activate_default_eps_bearer_context_request->packetflowidentifier,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_IEI, ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_IEI,
buffer + encoded, len - encoded)) < 0) buffer + encoded, len - encoded)) < 0) {
LOG_TRACE(ERROR, "ESM ENCODE packetflowidentifier");
// Return in case of error // Return in case of error
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -229,10 +237,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -229,10 +237,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_apn_aggregate_maximum_bit_rate(&activate_default_eps_bearer_context_request->apnambr, encode_apn_aggregate_maximum_bit_rate(&activate_default_eps_bearer_context_request->apnambr,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APNAMBR_IEI, buffer + ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APNAMBR_IEI, buffer +
encoded, len - encoded)) < 0) encoded, len - encoded)) < 0) {
LOG_TRACE(ERROR, "ESM ENCODE apnambr");
// Return in case of error // Return in case of error
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -242,10 +251,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -242,10 +251,11 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_esm_cause(&activate_default_eps_bearer_context_request->esmcause, encode_esm_cause(&activate_default_eps_bearer_context_request->esmcause,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_IEI, buffer ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_IEI, buffer
+ encoded, len - encoded)) < 0) + encoded, len - encoded)) < 0) {
LOG_TRACE(ERROR, "ESM ENCODE esmcause");
// Return in case of error // Return in case of error
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
} }
...@@ -279,13 +289,14 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear ...@@ -279,13 +289,14 @@ int encode_activate_default_eps_bearer_context_request(activate_default_eps_bear
if ((encode_result = if ((encode_result =
encode_protocol_configuration_options(&activate_default_eps_bearer_context_request->protocolconfigurationoptions, encode_protocol_configuration_options(&activate_default_eps_bearer_context_request->protocolconfigurationoptions,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_IEI, ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_IEI,
buffer + encoded, len - encoded)) < 0) buffer + encoded, len - encoded)) < 0) {
LOG_TRACE(ERROR, "ESM ENCODE protocolconfigurationoptions");
// Return in case of error // Return in case of error
return encode_result; return encode_result;
else } else
encoded += encode_result; encoded += encode_result;
} }
LOG_TRACE(INFO, "ESM ENCODED activate_default_eps_bearer_context_request");
return encoded; return encoded;
} }
...@@ -223,6 +223,8 @@ int esm_msg_encode(ESM_msg *msg, uint8_t *buffer, uint32_t len) ...@@ -223,6 +223,8 @@ int esm_msg_encode(ESM_msg *msg, uint8_t *buffer, uint32_t len)
"(%d)", header_result); "(%d)", header_result);
LOG_FUNC_RETURN(header_result); LOG_FUNC_RETURN(header_result);
} }
LOG_TRACE(INFO, "ESM-MSG - Encoded ESM message header "
"(%d)", header_result);
buffer += header_result; buffer += header_result;
len -= header_result; len -= header_result;
...@@ -299,6 +301,7 @@ int esm_msg_encode(ESM_msg *msg, uint8_t *buffer, uint32_t len) ...@@ -299,6 +301,7 @@ int esm_msg_encode(ESM_msg *msg, uint8_t *buffer, uint32_t len)
LOG_TRACE(ERROR, "ESM-MSG - Unexpected message type: 0x%x", LOG_TRACE(ERROR, "ESM-MSG - Unexpected message type: 0x%x",
msg->header.message_type); msg->header.message_type);
encode_result = TLV_ENCODE_WRONG_MESSAGE_TYPE; encode_result = TLV_ENCODE_WRONG_MESSAGE_TYPE;
break;
} }
if (encode_result < 0) { if (encode_result < 0) {
...@@ -390,6 +393,7 @@ static int _esm_msg_encode_header(const esm_msg_header_t *header, ...@@ -390,6 +393,7 @@ static int _esm_msg_encode_header(const esm_msg_header_t *header,
/* Check the buffer length */ /* Check the buffer length */
if (len < sizeof(esm_msg_header_t)) { if (len < sizeof(esm_msg_header_t)) {
LOG_TRACE(ERROR, "ESM-MSG - buffer too short");
return (TLV_ENCODE_BUFFER_TOO_SHORT); return (TLV_ENCODE_BUFFER_TOO_SHORT);
} }
/* Check the protocol discriminator */ /* Check the protocol discriminator */
......
...@@ -29,7 +29,9 @@ Description Defines functions executed at the ESM Service Access ...@@ -29,7 +29,9 @@ Description Defines functions executed at the ESM Service Access
#include "esm_proc.h" #include "esm_proc.h"
#include "esm_cause.h" #include "esm_cause.h"
#ifdef NAS_MME
#include "nas_itti_messaging.h"
#endif
#ifdef NAS_UE #ifdef NAS_UE
#include <stdlib.h> // malloc, free #include <stdlib.h> // malloc, free
#include <string.h> // memset #include <string.h> // memset
...@@ -729,6 +731,7 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi, ...@@ -729,6 +731,7 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi,
request_type = ESM_PDN_REQUEST_EMERGENCY; request_type = ESM_PDN_REQUEST_EMERGENCY;
} else { } else {
/* Unkown PDN request type */ /* Unkown PDN request type */
LOG_TRACE(ERROR, "ESM-SAP - Invalid PDN request type");
LOG_FUNC_RETURN (ESM_CAUSE_INVALID_MANDATORY_INFO); LOG_FUNC_RETURN (ESM_CAUSE_INVALID_MANDATORY_INFO);
} }
/* Get the value of the PDN type indicator */ /* Get the value of the PDN type indicator */
...@@ -740,6 +743,7 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi, ...@@ -740,6 +743,7 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi,
esm_data->pdn_type = ESM_PDN_TYPE_IPV4V6; esm_data->pdn_type = ESM_PDN_TYPE_IPV4V6;
} else { } else {
/* Unkown PDN type */ /* Unkown PDN type */
LOG_TRACE(ERROR, "ESM-SAP - Invalid PDN type");
LOG_FUNC_RETURN (ESM_CAUSE_UNKNOWN_PDN_TYPE); LOG_FUNC_RETURN (ESM_CAUSE_UNKNOWN_PDN_TYPE);
} }
...@@ -765,7 +769,7 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi, ...@@ -765,7 +769,7 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi,
*/ */
//TODO: rc = esm_proc_information_request(); //TODO: rc = esm_proc_information_request();
} }
#if defined(ORIGINAL_CODE)
/* Execute the PDN connectivity procedure requested by the UE */ /* Execute the PDN connectivity procedure requested by the UE */
int pid = esm_proc_pdn_connectivity_request(ctx, pti, request_type, int pid = esm_proc_pdn_connectivity_request(ctx, pti, request_type,
&esm_data->apn, &esm_data->apn,
...@@ -773,6 +777,7 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi, ...@@ -773,6 +777,7 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi,
&esm_data->pdn_addr, &esm_data->pdn_addr,
&esm_data->qos, &esm_data->qos,
&esm_cause); &esm_cause);
if (pid != RETURNerror) { if (pid != RETURNerror) {
/* Create local default EPS bearer context */ /* Create local default EPS bearer context */
int rc = esm_proc_default_eps_bearer_context(ctx, pid, new_ebi, int rc = esm_proc_default_eps_bearer_context(ctx, pid, new_ebi,
...@@ -781,7 +786,17 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi, ...@@ -781,7 +786,17 @@ int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi,
esm_cause = ESM_CAUSE_SUCCESS; esm_cause = ESM_CAUSE_SUCCESS;
} }
} }
#else
int is_emergency = (request_type == ESM_PDN_REQUEST_EMERGENCY);
nas_itti_pdn_connectivity_req(
pti,
ctx->ueid,
ctx->imsi,
esm_data,
request_type);
esm_cause = ESM_CAUSE_SUCCESS;
#endif
/* Return the ESM cause value */ /* Return the ESM cause value */
LOG_FUNC_RETURN (esm_cause); LOG_FUNC_RETURN (esm_cause);
} }
......
...@@ -756,6 +756,8 @@ static int _esm_sap_recv(int msg_type, int is_standalone, ...@@ -756,6 +756,8 @@ static int _esm_sap_recv(int msg_type, int is_standalone,
esm_proc_data_t data; esm_proc_data_t data;
memset(&data, 0, sizeof(esm_proc_data_t)); memset(&data, 0, sizeof(esm_proc_data_t));
LOG_TRACE(DEBUG, "ESM-SAP - PDN_CONNECTIVITY_REQUEST pti %u ebi %u", pti, ebi);
/* /*
* Process PDN connectivity request message received from the UE * Process PDN connectivity request message received from the UE
*/ */
...@@ -773,6 +775,7 @@ static int _esm_sap_recv(int msg_type, int is_standalone, ...@@ -773,6 +775,7 @@ static int _esm_sap_recv(int msg_type, int is_standalone,
/* No ESM status message should be returned */ /* No ESM status message should be returned */
esm_cause = ESM_CAUSE_SUCCESS; esm_cause = ESM_CAUSE_SUCCESS;
} else { } else {
#if defined(ORIGINAL_CODE)
/* Setup PDN type */ /* Setup PDN type */
int pdn_type = -1; int pdn_type = -1;
if (data.pdn_type == ESM_PDN_TYPE_IPV4) { if (data.pdn_type == ESM_PDN_TYPE_IPV4) {
...@@ -842,14 +845,20 @@ static int _esm_sap_recv(int msg_type, int is_standalone, ...@@ -842,14 +845,20 @@ static int _esm_sap_recv(int msg_type, int is_standalone,
pti, ebi, pti, ebi,
&esm_msg.activate_dedicated_eps_bearer_context_request, &esm_msg.activate_dedicated_eps_bearer_context_request,
ebi, &qos, &pkfs, 2); ebi, &qos, &pkfs, 2);
#endif
esm_procedure = esm_proc_default_eps_bearer_context_request;
#else
esm_cause = ESM_CAUSE_SUCCESS;
#endif #endif
/* Setup the callback function used to send default EPS bearer /* Setup the callback function used to send default EPS bearer
* context request message onto the network */ * context request message onto the network */
esm_procedure = esm_proc_default_eps_bearer_context_request; //esm_procedure = esm_proc_default_eps_bearer_context_request;
} }
break; break;
} }
case PDN_DISCONNECT_REQUEST: case PDN_DISCONNECT_REQUEST:
/* /*
* Process PDN disconnect request message received from the UE * Process PDN disconnect request message received from the UE
......
...@@ -541,6 +541,12 @@ int esm_send_activate_default_eps_bearer_context_request(int pti, int ebi, ...@@ -541,6 +541,12 @@ int esm_send_activate_default_eps_bearer_context_request(int pti, int ebi,
/* Mandatory - EPS QoS */ /* Mandatory - EPS QoS */
msg->epsqos = *qos; msg->epsqos = *qos;
if ((apn == NULL) || ((apn != NULL) && (apn->value == NULL))) {
LOG_TRACE(WARNING, "ESM-SAP - apn is NULL!");
}
LOG_TRACE(INFO, "ESM-SAP - apn is %s", apn->value);
/* Mandatory - Access Point Name */ /* Mandatory - Access Point Name */
msg->accesspointname.accesspointnamevalue = *apn; msg->accesspointname.accesspointnamevalue = *apn;
......
...@@ -1490,16 +1490,38 @@ int nas_proc_deregister_ue(UInt32_t ue_id) ...@@ -1490,16 +1490,38 @@ int nas_proc_deregister_ue(UInt32_t ue_id)
LOG_FUNC_RETURN (rc); LOG_FUNC_RETURN (rc);
} }
int nas_proc_bearer_param(nas_bearer_param_t *nas_bearer_param_pP) int nas_proc_pdn_connectivity_res(emm_cn_pdn_res_t *emm_cn_pdn_res)
{ {
int rc = RETURNerror; int rc = RETURNerror;
emm_sap_t emm_sap;
LOG_FUNC_IN;
emm_sap.primitive = EMMCN_PDN_CONNECTIVITY_RES;
emm_sap.u.emm_cn.u.emm_cn_pdn_res = emm_cn_pdn_res;
rc = emm_sap_send(&emm_sap);
LOG_FUNC_RETURN (rc);
}
int nas_proc_pdn_connectivity_fail(emm_cn_pdn_fail_t *emm_cn_pdn_fail)
{
int rc = RETURNerror;
emm_sap_t emm_sap;
LOG_FUNC_IN; LOG_FUNC_IN;
rc = RETURNok; emm_sap.primitive = EMMCN_PDN_CONNECTIVITY_FAIL;
emm_sap.u.emm_cn.u.emm_cn_pdn_fail = emm_cn_pdn_fail;
rc = emm_sap_send(&emm_sap);
LOG_FUNC_RETURN (rc); LOG_FUNC_RETURN (rc);
} }
# endif # endif
#endif // NAS_MME #endif // NAS_MME
......
...@@ -138,7 +138,8 @@ int nas_proc_ul_transfer_ind(UInt32_t ueid, const Byte_t *data, UInt32_t len); ...@@ -138,7 +138,8 @@ int nas_proc_ul_transfer_ind(UInt32_t ueid, const Byte_t *data, UInt32_t len);
int nas_proc_auth_param_res(emm_cn_auth_res_t *emm_cn_auth_res); int nas_proc_auth_param_res(emm_cn_auth_res_t *emm_cn_auth_res);
int nas_proc_auth_param_fail(emm_cn_auth_fail_t *emm_cn_auth_fail); int nas_proc_auth_param_fail(emm_cn_auth_fail_t *emm_cn_auth_fail);
int nas_proc_deregister_ue(UInt32_t ue_id); int nas_proc_deregister_ue(UInt32_t ue_id);
int nas_proc_bearer_param(nas_bearer_param_t *nas_bearer_param_pP); int nas_proc_pdn_connectivity_res(nas_pdn_connectivity_rsp_t *nas_pdn_connectivity_rsp);
int nas_proc_pdn_connectivity_fail(nas_pdn_connectivity_fail_t *nas_pdn_connectivity_fail);
#endif #endif
#endif /* __NAS_PROC_H__*/ #endif /* __NAS_PROC_H__*/
...@@ -6,6 +6,32 @@ ...@@ -6,6 +6,32 @@
#include "TLVDecoder.h" #include "TLVDecoder.h"
#include "OctetString.h" #include "OctetString.h"
OctetString* dup_octet_string(OctetString *octetstring)
{
OctetString *os_p = NULL;
if (octetstring) {
os_p = calloc(1,sizeof(OctetString));
os_p->length = octetstring->length;
os_p->value = malloc(octetstring->length+1);
memcpy(os_p->value, octetstring->value, octetstring->length);
os_p->value[octetstring->length] = '\0';
}
return os_p;
}
void free_octet_string(OctetString *octetstring)
{
if (octetstring) {
if (octetstring->value) free(octetstring->value);
octetstring->value = NULL;
octetstring->length = 0;
free(octetstring);
}
}
int encode_octet_string(OctetString *octetstring, uint8_t *buffer, uint32_t buflen) int encode_octet_string(OctetString *octetstring, uint8_t *buffer, uint32_t buflen)
{ {
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, octetstring->length, buflen); CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, octetstring->length, buflen);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -20,4 +20,5 @@ libsgw_lite_la_SOURCES= \ ...@@ -20,4 +20,5 @@ libsgw_lite_la_SOURCES= \
sgw_lite_task.c \ sgw_lite_task.c \
sgw_lite_handlers.c sgw_lite_handlers.h \ sgw_lite_handlers.c sgw_lite_handlers.h \
sgw_lite_context_manager.c sgw_lite_context_manager.h \ sgw_lite_context_manager.c sgw_lite_context_manager.h \
sgw_lite.h sgw_lite_defs.h sgw_lite_ie_defs.h sgw_lite.h sgw_lite_defs.h sgw_lite_ie_defs.h \
pgw_lite_paa.c pgw_lite_paa.h
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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