Added initial create session response structure. Compiling now.

master
Pedro Alvarez 7 years ago
parent ff32f31c9b
commit 2172662388

@ -149,7 +149,7 @@ const uint8_t GTPC_MSG_TYPE_MBMS_SESSION_STOP_RESPONSE = 236;
* *
***************************************************************************/ ***************************************************************************/
typedef struct gtpc_create_session_request struct gtpc_create_session_request
{ {
bool imsi_present; bool imsi_present;
uint64_t imsi; // C uint64_t imsi; // C
@ -232,8 +232,50 @@ typedef struct gtpc_create_session_request
//bool acpo_present; //bool acpo_present;
//uint8_t apco; // CO //uint8_t apco; // CO
//bool ext; // O //bool ext; // O
} gtpc_create_session_request_t; };
/****************************************************************************
*
* GTP-C v2 Create Session Response
* Ref: 3GPP TS 29.274 v10.14.0 Table 7.2.2-1
*
***************************************************************************/
struct gtpc_create_session_response
{
struct gtpc_cause_ie cause; //M
//Change Reporting Action //C
//CSG Information Reporting Action //CO
bool sender_f_teid_present;
struct gtpc_f_teid_ie sender_f_teid; //C
//PGW S5/S8/S2b F-TEID //C
//struct gtpc_pdn_address_allocation_ie pdn_address_allocation; //C
//apn_restriction
//apn_ambr
//linked_eps_bearer_id
//pco
struct gtpc_bearer_context_created_ie
{
uint8_t ebi;
//
} bearer_context_created; //M
/*
struct gtpc_bearer_context_removed_ie
{
uint8_t ebi;
//
} bearer_context_removed; //C
*/
//recovery; //C
//charging_gateway_name; //C
//charging_gateway_address; //C
//PGW-FQ-CSID //C
//SGW-FQ-CSID //C
//SGW LDN //O
//PGW LDN //O
//PGW Back-Off Time //O
//acpo //CO
};
}; //namespace }; //namespace
#endif //GTPC_V2_MSG_H #endif //GTPC_V2_MSG_H

@ -29,7 +29,7 @@
#include "srslte/common/buffer_pool.h" #include "srslte/common/buffer_pool.h"
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include "spgw/spgw.h" #include "spgw/spgw.h"
#include "srslte/asn1/gtpc.h"
namespace srsepc namespace srsepc
{ {
@ -41,7 +41,7 @@ public:
static void cleanup(void); static void cleanup(void);
void init(); void init();
void send_create_session_request(uint64_t imsi, struct create_session_response *cs_resp); void send_create_session_request(uint64_t imsi, struct srslte::gtpc_create_session_response *cs_resp);
private: private:

@ -70,7 +70,7 @@ mme_gtpc::init()
} }
void void
mme_gtpc::send_create_session_request(uint64_t imsi, struct create_session_response *cs_resp) mme_gtpc::send_create_session_request(uint64_t imsi, struct srslte::gtpc_create_session_response *cs_resp)
{ {
struct srslte::gtpc_pdu cs_req_pdu; struct srslte::gtpc_pdu cs_req_pdu;
struct srslte::gtpc_create_session_request *cs_req = &cs_req_pdu.choice.create_session_request; struct srslte::gtpc_create_session_request *cs_req = &cs_req_pdu.choice.create_session_request;

@ -28,6 +28,7 @@
#include <cmath> #include <cmath>
#include "srslte/common/bcd_helpers.h" #include "srslte/common/bcd_helpers.h"
#include "mme/s1ap.h" #include "mme/s1ap.h"
#include "srslte/asn1/gtpc.h"
namespace srsepc{ namespace srsepc{
@ -484,12 +485,11 @@ s1ap::handle_nas_authentication_response(srslte::byte_buffer_t *nas_msg, srslte:
//Send Security Mode Command //Send Security Mode Command
m_s1ap_nas_transport.pack_security_mode_command(reply_msg, ue_ctx); m_s1ap_nas_transport.pack_security_mode_command(reply_msg, ue_ctx);
//FIXME The packging of GTP-C messages is not ready //FIXME The packging of GTP-C messages is not ready.
//This means that GTP-U tunnels are created with function calls, as oposed to GTP-C. //This means that GTP-U tunnels are created with function calls, as opposed to GTP-C.
//In future send_create_session_request will return void and the handle_create_session_response will be called from the GTP-C class itself. struct srslte::gtpc_create_session_response cs_resp;
struct gtpc_create_session_response cs_resp;
m_gtpc->send_create_session_request(ue_ctx->imsi, &cs_resp); m_gtpc->send_create_session_request(ue_ctx->imsi, &cs_resp);
m_gtpc->handle_create_session_response(cs_resp); //m_gtpc->handle_create_session_response(cs_resp);
} }
return true; return true;
} }

Loading…
Cancel
Save