Commit b3829736 authored by gauthier's avatar 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 @@
// Messages files used between tasks
#include "gtpv1_u_messages_def.h"
#include "ip_forward_messages_def.h"
#include "mme_app_messages_def.h"
#include "nas_messages_def.h"
#include "s11_messages_def.h"
#include "s1ap_messages_def.h"
......@@ -13,3 +12,4 @@
#include "sctp_messages_def.h"
#include "sgw_lite_def.h"
#include "udp_messages_def.h"
#include "mme_app_messages_def.h"
......@@ -15,7 +15,6 @@
#include "gtpv1_u_messages_types.h"
#include "ip_forward_messages_types.h"
#include "mme_app_messages_types.h"
#include "s11_messages_types.h"
#include "s1ap_messages_types.h"
#include "nas_messages_types.h"
......@@ -23,5 +22,6 @@
#include "sctp_messages_types.h"
#include "sgw_lite_messages_types.h"
#include "udp_messages_types.h"
#include "mme_app_messages_types.h"
#endif /* MESSAGES_TYPES_H_ */
//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 @@
#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_ */
......@@ -35,9 +35,10 @@ 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)
/* MME app -> NAS layer messages */
MESSAGE_DEF(NAS_BEARER_PARAM, MESSAGE_PRIORITY_MED, nas_bearer_param_t, nas_bearer_param)
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_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_FAIL, MESSAGE_PRIORITY_MED, nas_auth_param_fail_t, nas_auth_param_fail)
#if defined(DISABLE_USE_NAS)
MESSAGE_DEF(NAS_ATTACH_REQ, MESSAGE_PRIORITY_MED, nas_attach_req_t, nas_attach_req)
......
......@@ -24,6 +24,8 @@
#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_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_CONNECTION_ESTABLISHMENT_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_est_cnf
#define NAS_BEARER_PARAM(mSGpTR) (mSGpTR)->ittiMsg.nas_bearer_param
......@@ -34,6 +36,8 @@
#define NAS_DATA_LENGHT_MAX 256
typedef enum {
EMM_MSG_HEADER = 1,
EMM_MSG_ATTACH_REQUEST,
......@@ -67,6 +71,8 @@ typedef enum {
EMM_MSG_CS_SERVICE_NOTIFICATION,
} emm_message_ids_t;
typedef enum {
ESM_MSG_HEADER = 1,
ESM_MSG_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST,
......@@ -93,50 +99,103 @@ typedef enum {
ESM_MSG_ESM_STATUS,
} esm_message_ids_t;
typedef struct nas_raw_msg_s {
uint32_t lenght;
uint8_t data[NAS_DATA_LENGHT_MAX];
} nas_raw_msg_t;
typedef struct nas_emm_plain_msg_s {
emm_message_ids_t present;
EMM_msg choice;
} nas_emm_plain_msg_t;
typedef struct nas_emm_protected_msg_s {
nas_message_security_header_t header;
emm_message_ids_t present;
EMM_msg choice;
} nas_emm_protected_msg_t;
typedef struct nas_esm_plain_msg_s {
esm_message_ids_t present;
ESM_msg choice;
} nas_esm_plain_msg_t;
typedef struct nas_esm_protected_msg_s {
nas_message_security_header_t header;
esm_message_ids_t present;
ESM_msg choice;
} nas_esm_protected_msg_t;
typedef struct nas_paging_ind_s {
} nas_paging_ind_t;
typedef struct nas_pdn_connectivity_req_s {
char imsi[16];
uint8_t imsi_length;
OctetString apn;
OctetString pdn_addr;
int mme_pdn_index;
network_qos_t esm_qos;
int is_emergency;
int pti; // nas ref Identity of the procedure transaction executed to activate the PDN connection entry
unsigned ue_id; // nas ref
char imsi[16];
uint8_t imsi_length;
network_qos_t qos;
OctetString apn;
OctetString pdn_addr;
int pdn_type;
void *proc_data;
int request_type;
} 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 {
nas_establish_ind_t nas;
......@@ -146,8 +205,10 @@ typedef struct nas_conn_est_ind_s {
s1ap_initial_ue_message_t transparent;
} nas_conn_est_ind_t;
typedef nas_establish_rsp_t nas_conn_est_rej_t;
#if defined(DISABLE_USE_NAS)
typedef struct nas_conn_est_cnf_s {
uint32_t ue_id;
......@@ -160,56 +221,35 @@ typedef struct nas_conn_est_cnf_s {
typedef nas_establish_cnf_t nas_conn_est_cnf_t;
#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 {
} nas_conn_rel_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_cnf_t nas_dl_data_cnf_t;
typedef struct nas_non_del_ind_s {
} nas_non_del_ind_t;
typedef struct nas_rab_est_req_s {
} nas_rab_est_req_t;
typedef struct nas_rab_est_rsp_s {
} nas_rab_est_rsp_t;
typedef struct nas_rab_rel_req_s {
} nas_rab_rel_req_t;
typedef struct nas_attach_req_s {
/* TODO: Set the correct size */
char apn[100];
......@@ -219,6 +259,7 @@ typedef struct nas_attach_req_s {
s1ap_initial_ue_message_t transparent;
} nas_attach_req_t;
typedef struct nas_auth_req_s {
/* UE imsi */
char imsi[16];
......@@ -229,6 +270,7 @@ typedef struct nas_auth_req_s {
int cause;
} nas_auth_req_t;
typedef struct nas_auth_resp_s {
char imsi[16];
} nas_auth_resp_t;
......@@ -244,10 +286,11 @@ typedef struct nas_auth_param_req_s {
/* Indicates whether the procedure corresponds to a new connection or not */
uint8_t initial_req:1;
uint8_t re_synchronization:1;
uint8_t auts[14];
uint8_t re_synchronization:1;
uint8_t auts[14];
} nas_auth_param_req_t;
typedef struct nas_auth_param_rsp_s {
/* UE identifier */
uint32_t ue_id;
......@@ -267,6 +310,7 @@ typedef struct nas_auth_param_fail_s {
nas_cause_t cause;
} nas_auth_param_fail_t;
#if defined(DISABLE_USE_NAS)
typedef struct nas_attach_accept_s {
s1ap_initial_ctxt_setup_req_t transparent;
......
......@@ -5,23 +5,23 @@
#define S1AP_DEREGISTER_UE_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_deregister_ue_req
typedef struct s1ap_initial_ue_message_s {
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
cgi_t e_utran_cgi;
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
cgi_t e_utran_cgi;
} s1ap_initial_ue_message_t;
typedef struct s1ap_initial_ctxt_setup_req_s {
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
/* Key eNB */
uint8_t keNB[32];
uint8_t keNB[32];
ambr_t ambr;
ambr_t apn_ambr;
ambr_t ambr;
ambr_t apn_ambr;
/* EPS bearer ID */
unsigned ebi:4;
unsigned ebi:4;
/* QoS */
qci_t qci;
......@@ -30,16 +30,16 @@ typedef struct s1ap_initial_ctxt_setup_req_s {
pre_emp_capability_t pre_emp_capability;
/* S-GW TEID for user-plane */
uint32_t teid;
Teid_t teid;
/* 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;
typedef struct s1ap_ue_cap_ind_s {
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
uint8_t radio_capabilities[100];
uint32_t radio_capabilities_length;
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
uint8_t radio_capabilities[100];
uint32_t radio_capabilities_length;
} s1ap_ue_cap_ind_t;
#define S1AP_ITTI_UE_PER_DEREGISTER_MESSAGE 20
......
......@@ -5,23 +5,37 @@
typedef struct s6a_update_location_req_s {
#define SKIP_SUBSCRIBER_DATA (0x1)
unsigned skip_subsriber_data:1;
unsigned skip_subscriber_data:1;
#define INITIAL_ATTACH (0x1)
unsigned initial_attach:1;
char imsi[IMSI_DIGITS_MAX + 1];
uint8_t imsi_length;
plmn_t visited_plmn;
rat_type_t rat_type;
char imsi[IMSI_DIGITS_MAX + 1]; // username
uint8_t imsi_length; // username
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;
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];
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;
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
int i;
ebi_t eps_bearer_id = 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);
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
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).num_tunnels = 0;
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];
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);
......@@ -564,36 +568,44 @@ static int gtpv1u_create_s1u_tunnel(gtpv1u_enb_create_tunnel_req_t *create_tunne
// PDCP->GTPV1U mapping
//-----------------------
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) {
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);
if ((hash_rc == HASH_TABLE_KEY_NOT_EXISTS) || (hash_rc == HASH_TABLE_OK)) {
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);
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) {
if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) {
gtpv1u_ue_data_p = calloc (1, sizeof(gtpv1u_ue_data_t));
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");
}
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);
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->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);
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].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_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = s1u_teid;
} else {
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).enb_S1u_teid[i] = 0;
GTPV1U_ENB_CREATE_TUNNEL_RESP(message_p).status = 0xFF;
......
......@@ -68,10 +68,11 @@ typedef struct gtpv1u_teid_data_s {
typedef struct gtpv1u_bearer_s {
/* TEID used in dl and ul */
teid_t teid_eNB; ///< eNB TEID
teid_t teid_sgw; ///< Remote TEID
in_addr_t sgw_ip_addr;
tcp_udp_port_t port;
teid_t teid_eNB; ///< eNB TEID
teid_t teid_sgw; ///< Remote TEID
in_addr_t sgw_ip_addr;
struct in6_addr sgw_ip6_addr;
tcp_udp_port_t port;
//NwGtpv1uStackSessionHandleT stack_session;
bearer_state_t state;
} gtpv1u_bearer_t;
......
......@@ -167,22 +167,24 @@ NwGtpv1uRcT gtpv1u_process_stack_req(
data_ind_p->local_S1u_teid = pUlpApi->apiInfo.recvMsgInfo.teid;
if (data_ind_p->buffer == NULL) {
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 {
memcpy(data_ind_p->buffer, buffer, buffer_len);
data_ind_p->length = buffer_len;
if (itti_send_msg_to_task(TASK_FW_IP, INSTANCE_DEFAULT, message_p) < 0) {
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;
}
}
}
break;
case NW_GTPV1U_ULP_API_CREATE_TUNNEL_ENDPOINT:{
}
break;
default: {
GTPU_ERROR("Received undefined UlpApi (%02x) from gtpv1u stack!\n",
pUlpApi->apiType);
......@@ -222,13 +224,12 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP)
memset(gtpv1u_teid2enb_info, 0, sizeof(gtpv1u_teid2enb_info_t));
gtpv1u_teid2enb_info->state = BEARER_IN_CONFIG;
#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.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[2] = 1;
gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[3] = 2;
gtpv1u_teid2enb_info->state = BEARER_IN_CONFIG;
//#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.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[2] = 1;
// gtpv1u_teid2enb_info->enb_ip_addr.address.ipv4_address[3] = 2;
message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_CREATE_TUNNEL_RESP);
......@@ -384,7 +385,7 @@ static void *gtpv1u_thread(void *args)
case UDP_DATA_IND: {
udp_data_ind_t *udp_data_ind_p;
udp_data_ind_p = &received_message_p->ittiMsg.udp_data_ind;
nwGtpv1uProcessUdpReq(gtpv1u_sgw_data.gtpv1u_stack,
nwGtpv1uProcessUdpReq(gtpv1u_sgw_data.gtpv1u_stack,
udp_data_ind_p->buffer,
udp_data_ind_p->buffer_length,
udp_data_ind_p->peer_port,
......@@ -407,7 +408,7 @@ static void *gtpv1u_thread(void *args)
memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
/*
* typedef struct
* typedef struct
{
NW_IN NwU32T teid;
NW_IN NwU32T ipAddr;
......@@ -470,7 +471,7 @@ static void *gtpv1u_thread(void *args)
}
break;
}
free(received_message_p);
itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p);
received_message_p = NULL;
}
return NULL;
......
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.
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
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
......@@ -368,3 +367,4 @@ operates.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
......@@ -19,10 +19,12 @@ noinst_LTLIBRARIES = libmmeapp.la
libmmeapp_la_LDFLAGS = -all-static
libmmeapp_la_SOURCES = \
mme_app_capabilities.c \
mme_app_context.c \
mme_app_main.c mme_app_defs.h \
mme_app_bearer.c \
mme_app_authentication.c \
mme_app_location.c \
mme_app_statistics.c mme_app_statistics.h \
mme_app_defs.h mme_app_extern.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,