diff --git a/lib/include/srslte/asn1/gtpc_msg.h b/lib/include/srslte/asn1/gtpc_msg.h index efb429217..d25d64484 100644 --- a/lib/include/srslte/asn1/gtpc_msg.h +++ b/lib/include/srslte/asn1/gtpc_msg.h @@ -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; uint64_t imsi; // C @@ -232,8 +232,50 @@ typedef struct gtpc_create_session_request //bool acpo_present; //uint8_t apco; // CO //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 #endif //GTPC_V2_MSG_H diff --git a/srsepc/hdr/mme/mme_gtpc.h b/srsepc/hdr/mme/mme_gtpc.h index a393cfe56..22a4e6463 100644 --- a/srsepc/hdr/mme/mme_gtpc.h +++ b/srsepc/hdr/mme/mme_gtpc.h @@ -29,7 +29,7 @@ #include "srslte/common/buffer_pool.h" #include #include "spgw/spgw.h" - +#include "srslte/asn1/gtpc.h" namespace srsepc { @@ -41,7 +41,7 @@ public: static void cleanup(void); 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: diff --git a/srsepc/src/mme/mme_gtpc.cc b/srsepc/src/mme/mme_gtpc.cc index 3e62a0bcb..2c27b3f7f 100644 --- a/srsepc/src/mme/mme_gtpc.cc +++ b/srsepc/src/mme/mme_gtpc.cc @@ -70,7 +70,7 @@ mme_gtpc::init() } 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_create_session_request *cs_req = &cs_req_pdu.choice.create_session_request; diff --git a/srsepc/src/mme/s1ap.cc b/srsepc/src/mme/s1ap.cc index 7dc3648ee..f2dcaa6a5 100644 --- a/srsepc/src/mme/s1ap.cc +++ b/srsepc/src/mme/s1ap.cc @@ -28,6 +28,7 @@ #include #include "srslte/common/bcd_helpers.h" #include "mme/s1ap.h" +#include "srslte/asn1/gtpc.h" namespace srsepc{ @@ -484,12 +485,11 @@ s1ap::handle_nas_authentication_response(srslte::byte_buffer_t *nas_msg, srslte: //Send Security Mode Command m_s1ap_nas_transport.pack_security_mode_command(reply_msg, ue_ctx); - //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. - //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 gtpc_create_session_response cs_resp; + //FIXME The packging of GTP-C messages is not ready. + //This means that GTP-U tunnels are created with function calls, as opposed to GTP-C. + struct srslte::gtpc_create_session_response 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; }