Partial update for data plane on eNB for S1-U
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5194 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -180,9 +180,9 @@ typedef struct nas_bearer_param_s {
|
||||
pre_emp_capability_t pre_emp_capability;
|
||||
|
||||
/* S-GW TEID for user-plane */
|
||||
uint32_t teid;
|
||||
uint32_t sgw_s1u_teid;
|
||||
/* S-GW IP address for User-Plane */
|
||||
ip_address_t s_gw_address;
|
||||
ip_address_t sgw_s1u_address;
|
||||
} nas_bearer_param_t;
|
||||
|
||||
typedef struct nas_conn_rel_ind_s {
|
||||
|
||||
+30
-22
@@ -1,32 +1,40 @@
|
||||
/*******************************************************************************
|
||||
Eurecom OpenAirInterface core network
|
||||
Copyright(c) 1999 - 2014 Eurecom
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2012 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 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.
|
||||
|
||||
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.
|
||||
|
||||
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.fr/openairinterface
|
||||
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes
|
||||
06410 Biot FRANCE
|
||||
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 gtpv1u.h
|
||||
* \brief
|
||||
* \author Sebastien ROUX, Lionel Gauthier
|
||||
* \company Eurecom
|
||||
* \email: lionel.gauthier@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifndef GTPV1_U_H_
|
||||
#define GTPV1_U_H_
|
||||
|
||||
+720
-348
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,52 @@
|
||||
#include "NwGtpv1u.h"
|
||||
#include "gtpv1u.h"
|
||||
#include "udp_eNB_task.h"
|
||||
/*******************************************************************************
|
||||
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 gtpv1u_eNB_defs.h
|
||||
* \brief
|
||||
* \author Sebastien ROUX, Lionel GAUTHIER
|
||||
* \version 1.0
|
||||
* \company Eurecom
|
||||
* \email: lionel.gauthier@eurecom.fr
|
||||
*/
|
||||
|
||||
#include "hashtable.h"
|
||||
|
||||
//TEST LG #define GTPU_IN_KERNEL
|
||||
|
||||
//#include "tree.h"
|
||||
|
||||
#ifndef GTPV1U_ENB_DEFS_H_
|
||||
#define GTPV1U_ENB_DEFS_H_
|
||||
|
||||
#define GTPV1U_UDP_PORT (2152)
|
||||
#define GTPV1U_BEARER_OFFSET 3
|
||||
|
||||
#define MAX_BEARERS_PER_UE (11)
|
||||
#define GTPV1U_MAX_BEARERS_ID (max_val_DRB_Identity - GTPV1U_BEARER_OFFSET)
|
||||
|
||||
typedef enum {
|
||||
BEARER_DOWN = 0,
|
||||
@@ -23,28 +57,37 @@ typedef enum {
|
||||
BEARER_MAX,
|
||||
} bearer_state_t;
|
||||
|
||||
|
||||
typedef struct gtpv1u_teid_data_s {
|
||||
/* UE identifier for oaisim stack */
|
||||
module_id_t enb_id;
|
||||
module_id_t ue_id;
|
||||
ebi_t eps_bearer_id;
|
||||
} gtpv1u_teid_data_t;
|
||||
|
||||
|
||||
typedef struct gtpv1u_bearer_s {
|
||||
/* TEID used in dl and ul */
|
||||
uint32_t teid_eNB; ///< eNB TEID
|
||||
uint32_t teid_sgw; ///< Remote TEID
|
||||
uint32_t sgw_ip_addr;
|
||||
uint16_t port;
|
||||
NwGtpv1uStackSessionHandleT stack_session;
|
||||
teid_t teid_eNB; ///< eNB TEID
|
||||
teid_t teid_sgw; ///< Remote TEID
|
||||
uint32_t sgw_ip_addr;
|
||||
tcp_udp_port_t port;
|
||||
//NwGtpv1uStackSessionHandleT stack_session;
|
||||
bearer_state_t state;
|
||||
} gtpv1u_bearer_t;
|
||||
|
||||
typedef struct gtpv1u_ue_data_s {
|
||||
/* UE identifier for oaisim stack */
|
||||
uint8_t ue_id;
|
||||
module_id_t ue_id;
|
||||
|
||||
/* Unique identifier used between PDCP and GTP-U to distinguish UEs */
|
||||
uint32_t instance_id;
|
||||
|
||||
int num_bearers;
|
||||
/* Bearer related data.
|
||||
* Note that the first LCID available for data is 3 and we fixed the maximum
|
||||
* number of e-rab per UE to be 11. The real rb id will 3 + rab_id (0..10).
|
||||
* number of e-rab per UE to be (32 [id range]), max RB is 11. The real rb id will 3 + rab_id (3..32).
|
||||
*/
|
||||
gtpv1u_bearer_t bearers[MAX_BEARERS_PER_UE];
|
||||
gtpv1u_bearer_t bearers[GTPV1U_MAX_BEARERS_ID];
|
||||
|
||||
//RB_ENTRY(gtpv1u_ue_data_s) gtpv1u_ue_node;
|
||||
} gtpv1u_ue_data_t;
|
||||
@@ -52,14 +95,18 @@ typedef struct gtpv1u_ue_data_s {
|
||||
typedef struct gtpv1u_data_s{
|
||||
/* nwgtpv1u stack internal data */
|
||||
NwGtpv1uStackHandleT gtpv1u_stack;
|
||||
|
||||
/* RB tree of UEs */
|
||||
hash_table_t *ue_mapping;
|
||||
hash_table_t *ue_mapping; // PDCP->GTPV1U
|
||||
hash_table_t *teid_mapping; // GTPV1U -> PDCP
|
||||
|
||||
//RB_HEAD(gtpv1u_ue_map, gtpv1u_ue_data_s) gtpv1u_ue_map_head;
|
||||
/* Local IP address to use */
|
||||
uint32_t enb_ip_address_for_S1u_S12_S4_up;
|
||||
char *ip_addr;
|
||||
tcp_udp_port_t enb_port_for_S1u_S12_S4_up;
|
||||
/* UDP internal data */
|
||||
udp_data_t udp_data;
|
||||
//udp_data_t udp_data;
|
||||
|
||||
uint16_t seq_num;
|
||||
uint8_t restart_counter;
|
||||
@@ -74,13 +121,19 @@ typedef struct gtpv1u_data_s{
|
||||
#endif
|
||||
} gtpv1u_data_t;
|
||||
|
||||
int gtpv1u_new_data_req(gtpv1u_data_t *gtpv1u_data_p,
|
||||
uint8_t ue_id, uint8_t rab_id,
|
||||
uint8_t *buffer, uint32_t buf_len);
|
||||
int
|
||||
gtpv1u_new_data_req(
|
||||
uint8_t enb_id,
|
||||
uint8_t ue_id,
|
||||
uint8_t rab_id,
|
||||
uint8_t *buffer,
|
||||
uint32_t buf_len);
|
||||
|
||||
int gtpv1u_initial_req(gtpv1u_data_t *gtpv1u_data_p, uint32_t teid,
|
||||
uint16_t port, uint32_t address);
|
||||
|
||||
int gtpv1u_eNB_init(gtpv1u_data_t *gtpv1u_data_p);
|
||||
int
|
||||
gtpv1u_initial_req(
|
||||
gtpv1u_data_t *gtpv1u_data_p,
|
||||
uint32_t teid,
|
||||
uint16_t port,
|
||||
uint32_t address);
|
||||
|
||||
#endif /* GTPV1U_ENB_DEFS_H_ */
|
||||
|
||||
@@ -62,13 +62,11 @@ typedef struct {
|
||||
/* Local IP address to use */
|
||||
uint32_t sgw_ip_address_for_S1u_S12_S4_up;
|
||||
char *ip_addr;
|
||||
/* UDP internal data */
|
||||
//udp_data_t udp_data;
|
||||
|
||||
uint16_t seq_num;
|
||||
uint8_t restart_counter;
|
||||
//gtpv1u_teid2enb_info_t* teid2enb_mapping[];
|
||||
hash_table_t *S1U_mapping;
|
||||
hash_table_t *S1U_mapping;
|
||||
|
||||
} gtpv1u_data_t;
|
||||
|
||||
|
||||
@@ -1,32 +1,40 @@
|
||||
/*******************************************************************************
|
||||
Eurecom OpenAirInterface core network
|
||||
Copyright(c) 1999 - 2014 Eurecom
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2012 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 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.
|
||||
|
||||
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.
|
||||
|
||||
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.fr/openairinterface
|
||||
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes
|
||||
06410 Biot FRANCE
|
||||
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 gtpv1u_task.c
|
||||
* \brief
|
||||
* \author Sebastien ROUX, Lionel Gauthier
|
||||
* \company Eurecom
|
||||
* \email: lionel.gauthier@eurecom.fr
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@@ -189,10 +197,10 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP)
|
||||
NwGtpv1uUlpApiT stack_req;
|
||||
NwGtpv1uRcT rc;
|
||||
/* Local tunnel end-point identifier */
|
||||
uint32_t s1u_teid;
|
||||
gtpv1u_teid2enb_info_t *gtpv1u_teid2enb_info;
|
||||
MessageDef *message_p;
|
||||
hashtable_rc_t hash_rc;
|
||||
uint32_t s1u_teid = 0;
|
||||
gtpv1u_teid2enb_info_t *gtpv1u_teid2enb_info = NULL;
|
||||
MessageDef *message_p = NULL;
|
||||
hashtable_rc_t hash_rc;
|
||||
|
||||
GTPU_DEBUG("Rx GTPV1U_CREATE_TUNNEL_REQ Context %d\n", create_tunnel_reqP->context_teid);
|
||||
memset(&stack_req, 0, sizeof(NwGtpv1uUlpApiT));
|
||||
@@ -238,10 +246,10 @@ static int gtpv1u_create_s1u_tunnel(Gtpv1uCreateTunnelReq *create_tunnel_reqP)
|
||||
}
|
||||
|
||||
GTPU_DEBUG("Tx GTPV1U_CREATE_TUNNEL_RESP Context %u teid %u eps bearer id %u status %d\n",
|
||||
message_p->ittiMsg.gtpv1uCreateTunnelResp.context_teid,
|
||||
message_p->ittiMsg.gtpv1uCreateTunnelResp.S1u_teid,
|
||||
message_p->ittiMsg.gtpv1uCreateTunnelResp.eps_bearer_id,
|
||||
message_p->ittiMsg.gtpv1uCreateTunnelResp.status);
|
||||
message_p->ittiMsg.gtpv1uCreateTunnelResp.context_teid,
|
||||
message_p->ittiMsg.gtpv1uCreateTunnelResp.S1u_teid,
|
||||
message_p->ittiMsg.gtpv1uCreateTunnelResp.eps_bearer_id,
|
||||
message_p->ittiMsg.gtpv1uCreateTunnelResp.status);
|
||||
return itti_send_msg_to_task(TASK_SPGW_APP, INSTANCE_DEFAULT, message_p);
|
||||
}
|
||||
|
||||
@@ -270,23 +278,23 @@ static int gtpv1u_delete_s1u_tunnel(Teid_t context_teidP, Teid_t S1U_teidP)
|
||||
|
||||
static int gtpv1u_update_s1u_tunnel(Gtpv1uUpdateTunnelReq *reqP)
|
||||
{
|
||||
hashtable_rc_t hash_rc;
|
||||
hashtable_rc_t hash_rc;
|
||||
gtpv1u_teid2enb_info_t *gtpv1u_teid2enb_info;
|
||||
MessageDef *message_p;
|
||||
|
||||
GTPU_DEBUG("Rx GTPV1U_UPDATE_TUNNEL_REQ Context %u, S-GW S1U teid %u, eNB S1U teid %u\n",
|
||||
reqP->context_teid,
|
||||
reqP->sgw_S1u_teid,
|
||||
reqP->enb_S1u_teid);
|
||||
reqP->context_teid,
|
||||
reqP->sgw_S1u_teid,
|
||||
reqP->enb_S1u_teid);
|
||||
message_p = itti_alloc_new_message(TASK_GTPV1_U, GTPV1U_UPDATE_TUNNEL_RESP);
|
||||
|
||||
hash_rc = hashtable_get(gtpv1u_sgw_data.S1U_mapping, reqP->sgw_S1u_teid, (void**)>pv1u_teid2enb_info);
|
||||
|
||||
if (hash_rc == HASH_TABLE_OK) {
|
||||
gtpv1u_teid2enb_info->teid_enb = reqP->enb_S1u_teid;
|
||||
gtpv1u_teid2enb_info->enb_ip_addr = reqP->enb_ip_address_for_S1u;
|
||||
gtpv1u_teid2enb_info->state = BEARER_UP;
|
||||
gtpv1u_teid2enb_info->port = GTPV1U_UDP_PORT;
|
||||
gtpv1u_teid2enb_info->teid_enb = reqP->enb_S1u_teid;
|
||||
gtpv1u_teid2enb_info->enb_ip_addr = reqP->enb_ip_address_for_S1u;
|
||||
gtpv1u_teid2enb_info->state = BEARER_UP;
|
||||
gtpv1u_teid2enb_info->port = GTPV1U_UDP_PORT;
|
||||
message_p->ittiMsg.gtpv1uUpdateTunnelResp.status = 0; ///< Status (Failed = 0xFF or Success = 0x0)
|
||||
} else {
|
||||
GTPU_ERROR("Mapping not found\n");
|
||||
@@ -387,11 +395,11 @@ static void *gtpv1u_thread(void *args)
|
||||
|
||||
// DATA TO BE SENT TO UDP
|
||||
case GTPV1U_TUNNEL_DATA_REQ: {
|
||||
Gtpv1uTunnelDataReq *data_req_p;
|
||||
NwGtpv1uUlpApiT stack_req;
|
||||
NwGtpv1uRcT rc;
|
||||
hashtable_rc_t hash_rc;
|
||||
gtpv1u_teid2enb_info_t *gtpv1u_teid2enb_info;
|
||||
Gtpv1uTunnelDataReq *data_req_p = NULL;
|
||||
NwGtpv1uUlpApiT stack_req;
|
||||
NwGtpv1uRcT rc;
|
||||
hashtable_rc_t hash_rc;
|
||||
gtpv1u_teid2enb_info_t *gtpv1u_teid2enb_info = NULL;
|
||||
|
||||
data_req_p = &received_message_p->ittiMsg.gtpv1uTunnelDataReq;
|
||||
//ipv4_send_data(ipv4_data_p->sd, data_ind_p->buffer, data_ind_p->length);
|
||||
|
||||
@@ -1,9 +1,46 @@
|
||||
/*******************************************************************************
|
||||
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 gtpv1u_task.c
|
||||
* \brief
|
||||
* \author Lionel Gauthier
|
||||
* \company Eurecom
|
||||
* \email: lionel.gauthier@eurecom.fr
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "gtpv1u.h"
|
||||
|
||||
#define GTPV1U_LINEAR_TEID_ALLOCATION 1
|
||||
//#define GTPV1U_LINEAR_TEID_ALLOCATION 1
|
||||
|
||||
#ifdef GTPV1U_LINEAR_TEID_ALLOCATION
|
||||
static uint32_t g_gtpv1u_teid = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
AM_CFLAGS = \
|
||||
@ADD_CFLAGS@ \
|
||||
-I$(top_srcdir)/COMMON \
|
||||
-I$(top_srcdir)/COMMON \
|
||||
-I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \
|
||||
-I$(top_srcdir)/NAS/EURECOM-NAS/src/include \
|
||||
-I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \
|
||||
@@ -18,11 +18,11 @@ noinst_LTLIBRARIES = libmmeapp.la
|
||||
libmmeapp_la_LDFLAGS = -all-static
|
||||
|
||||
libmmeapp_la_SOURCES = \
|
||||
mme_app_context.c \
|
||||
mme_app_main.c mme_app_defs.h \
|
||||
mme_app_bearer.c \
|
||||
mme_app_authentication.c \
|
||||
mme_app_context.c \
|
||||
mme_app_main.c mme_app_defs.h \
|
||||
mme_app_bearer.c \
|
||||
mme_app_authentication.c \
|
||||
mme_app_statistics.c mme_app_statistics.h \
|
||||
mme_app_defs.h mme_app_extern.h \
|
||||
mme_app_itti_messaging.h \
|
||||
mme_app_defs.h mme_app_extern.h \
|
||||
mme_app_itti_messaging.h \
|
||||
s6a_2_nas_cause.c
|
||||
|
||||
@@ -334,8 +334,8 @@ int mme_app_handle_create_sess_resp(SgwCreateSessionResponse *create_sess_resp_p
|
||||
NAS_BEARER_PARAM(message_p).pre_emp_vulnerability = current_bearer_p->pre_emp_vulnerability;
|
||||
NAS_BEARER_PARAM(message_p).pre_emp_capability = current_bearer_p->pre_emp_capability;
|
||||
|
||||
NAS_BEARER_PARAM(message_p).teid = current_bearer_p->s_gw_teid;
|
||||
memcpy(&NAS_BEARER_PARAM(message_p).s_gw_address,
|
||||
NAS_BEARER_PARAM(message_p).sgw_s1u_teid = current_bearer_p->s_gw_teid;
|
||||
memcpy(&NAS_BEARER_PARAM(message_p).sgw_s1u_address,
|
||||
¤t_bearer_p->s_gw_address, sizeof(ip_address_t));
|
||||
|
||||
memcpy(&NAS_BEARER_PARAM(message_p).ambr, &ue_context_p->subscribed_ambr,
|
||||
|
||||
@@ -98,13 +98,21 @@ void *mme_app_thread(void *args)
|
||||
mme_app_statistics_display();
|
||||
}
|
||||
} break;
|
||||
|
||||
case TERMINATE_MESSAGE: {
|
||||
/* Termination message received TODO -> release any data allocated */
|
||||
itti_exit_task();
|
||||
} break;
|
||||
|
||||
case S1AP_UE_CAPABILITIES_IND: {
|
||||
// TO DO;
|
||||
} break;
|
||||
|
||||
default: {
|
||||
MME_APP_DEBUG("Unkwnon message ID %d:%s\n",
|
||||
ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p));
|
||||
AssertFatal(0, "Unkwnon message ID %d:%s\n",
|
||||
ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p));
|
||||
} break;
|
||||
}
|
||||
itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p);
|
||||
|
||||
@@ -138,7 +138,7 @@ typedef struct ue_context_s {
|
||||
|
||||
network_access_mode_t access_mode;
|
||||
|
||||
/* TODO: add ue radio cap, ms classmarks, cupported codecs */
|
||||
/* TODO: add ue radio cap, ms classmarks, supported codecs */
|
||||
|
||||
/* TODO: add ue network capability, ms network capability */
|
||||
/* TODO: add selected NAS algorithm */
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
MESSAGE_DEF(GTPV1U_ENB_CREATE_TUNNEL_REQ, MESSAGE_PRIORITY_MAX, gtpv1u_enb_create_tunnel_req_t, Gtpv1uCreateTunnelReq)
|
||||
MESSAGE_DEF(GTPV1U_ENB_CREATE_TUNNEL_RESP, MESSAGE_PRIORITY_MAX, gtpv1u_enb_create_tunnel_resp_t, Gtpv1uCreateTunnelResp)
|
||||
MESSAGE_DEF(GTPV1U_ENB_UPDATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_update_tunnel_req_t, Gtpv1uUpdateTunnelReq)
|
||||
MESSAGE_DEF(GTPV1U_ENB_UPDATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, gtpv1u_enb_update_tunnel_resp_t, Gtpv1uUpdateTunnelResp)
|
||||
MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_req_t, Gtpv1uDeleteTunnelReq)
|
||||
MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_resp_t, Gtpv1uDeleteTunnelResp)
|
||||
MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_IND, MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_ind_t, Gtpv1uTunnelDataInd)
|
||||
MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_req_t, Gtpv1uTunnelDataReq)
|
||||
Executable
+74
@@ -0,0 +1,74 @@
|
||||
#ifndef GTPV1_U_MESSAGES_TYPES_H_
|
||||
#define GTPV1_U_MESSAGES_TYPES_H_
|
||||
|
||||
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
|
||||
|
||||
#define GTPV1U_ENB_CREATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uCreateTunnelReq
|
||||
#define GTPV1U_ENB_CREATE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uCreateTunnelResp
|
||||
#define GTPV1U_ENB_UPDATE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelReq
|
||||
#define GTPV1U_ENB_UPDATE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uUpdateTunnelResp
|
||||
#define GTPV1U_ENB_DELETE_TUNNEL_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelReq
|
||||
#define GTPV1U_ENB_DELETE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelResp
|
||||
#define GTPV1U_ENB_TUNNEL_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uTunnelDataInd
|
||||
#define GTPV1U_ENB_TUNNEL_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uTunnelDataReq
|
||||
|
||||
typedef struct gtpv1u_enb_create_tunnel_req_s {
|
||||
module_id_t ue_index;
|
||||
int num_tunnels;
|
||||
teid_t sgw_S1u_teid[GTPV1U_MAX_BEARERS_PER_UE]; ///< Tunnel Endpoint Identifier
|
||||
ebi_t eps_bearer_id[GTPV1U_MAX_BEARERS_PER_UE];
|
||||
transport_layer_addr_t sgw_addr[GTPV1U_MAX_BEARERS_PER_UE];
|
||||
} gtpv1u_enb_create_tunnel_req_t;
|
||||
|
||||
typedef struct gtpv1u_enb_create_tunnel_resp_s {
|
||||
uint8_t status; ///< Status of S1U endpoint creation (Failed = 0xFF or Success = 0x0)
|
||||
uint8_t ue_index;
|
||||
int num_tunnels;
|
||||
teid_t enb_S1u_teid[GTPV1U_MAX_BEARERS_PER_UE]; ///< Tunnel Endpoint Identifier
|
||||
ebi_t eps_bearer_id[GTPV1U_MAX_BEARERS_PER_UE];
|
||||
transport_layer_addr_t enb_addr[GTPV1U_MAX_BEARERS_PER_UE];
|
||||
} gtpv1u_enb_create_tunnel_resp_t;
|
||||
|
||||
typedef struct gtpv1u_enb_update_tunnel_req_s {
|
||||
uint8_t ue_index;
|
||||
teid_t enb_S1u_teid; ///< eNB S1U Tunnel Endpoint Identifier
|
||||
teid_t sgw_S1u_teid; ///< SGW S1U local Tunnel Endpoint Identifier
|
||||
transport_layer_addr_t sgw_addr;
|
||||
ebi_t eps_bearer_id;
|
||||
} gtpv1u_enb_update_tunnel_req_t;
|
||||
|
||||
typedef struct gtpv1u_enb_update_tunnel_resp_s {
|
||||
uint8_t ue_index;
|
||||
uint8_t status; ///< Status (Failed = 0xFF or Success = 0x0)
|
||||
teid_t enb_S1u_teid; ///< eNB S1U Tunnel Endpoint Identifier
|
||||
teid_t sgw_S1u_teid; ///< SGW S1U local Tunnel Endpoint Identifier
|
||||
ebi_t eps_bearer_id;
|
||||
} gtpv1u_enb_update_tunnel_resp_t;
|
||||
|
||||
typedef struct gtpv1u_enb_delete_tunnel_req_s {
|
||||
module_id_t ue_index;
|
||||
ebi_t eps_bearer_id;
|
||||
teid_t enb_S1u_teid; ///< local SGW S11 Tunnel Endpoint Identifier
|
||||
} gtpv1u_enb_delete_tunnel_req_t;
|
||||
|
||||
typedef struct gtpv1u_enb_delete_tunnel_resp_s {
|
||||
uint8_t ue_index;
|
||||
uint8_t status; ///< Status of S1U endpoint deleteion (Failed = 0xFF or Success = 0x0)
|
||||
teid_t enb_S1u_teid; ///< local S1U Tunnel Endpoint Identifier to be deleted
|
||||
} gtpv1u_enb_delete_tunnel_resp_t;
|
||||
|
||||
typedef struct gtpv1u_enb_tunnel_data_ind_s {
|
||||
uint8_t ue_index;
|
||||
uint8_t *buffer;
|
||||
uint32_t length;
|
||||
teid_t enb_S1u_teid; ///< Tunnel Endpoint Identifier
|
||||
} gtpv1u_enb_tunnel_data_ind_t;
|
||||
|
||||
typedef struct gtpv1u_enb_tunnel_data_req_s {
|
||||
uint8_t *buffer;
|
||||
uint32_t length;
|
||||
uint8_t ue_index;
|
||||
rb_id_t rab_id;
|
||||
} gtpv1u_enb_tunnel_data_req_t;
|
||||
|
||||
#endif /* GTPV1_U_MESSAGES_TYPES_H_ */
|
||||
@@ -14,4 +14,5 @@
|
||||
#include "x2ap_messages_def.h"
|
||||
#include "sctp_messages_def.h"
|
||||
#include "udp_messages_def.h"
|
||||
#include "gtpv1_u_messages_def.h"
|
||||
|
||||
|
||||
@@ -22,5 +22,6 @@
|
||||
#include "x2ap_messages_types.h"
|
||||
#include "sctp_messages_types.h"
|
||||
#include "udp_messages_types.h"
|
||||
#include "gtpv1_u_messages_types.h"
|
||||
|
||||
#endif /* MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -101,6 +101,7 @@ typedef enum pdcp_transmission_mode_e {
|
||||
//-----------------------------------------------------------------------------
|
||||
// IP DRIVER / PDCP TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint16_t tcp_udp_port_t;
|
||||
typedef enum ip_traffic_type_e {
|
||||
TRAFFIC_IPVX_TYPE_UNKNOWN = 0,
|
||||
TRAFFIC_IPV6_TYPE_UNICAST = 1,
|
||||
@@ -127,4 +128,10 @@ typedef enum config_action_e {
|
||||
CONFIG_ACTION_MBMS_ADD = 10,
|
||||
CONFIG_ACTION_MBMS_MODIFY = 11
|
||||
} config_action_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// GTPV1U TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef uint32_t teid_t; // tunnel endpoint identifier
|
||||
typedef uint8_t ebi_t; // eps bearer id
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200)
|
||||
// UDP TASK
|
||||
TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 200)
|
||||
// GTP_V1U task
|
||||
TASK_DEF(TASK_GTPU, TASK_PRIORITY_MED, 200)
|
||||
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 200)
|
||||
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200)
|
||||
/// X2ap task, acts as both source and target
|
||||
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200)
|
||||
|
||||
Reference in New Issue
Block a user