diff --git a/lib/include/srslte/asn1/gtpc_ies.h b/lib/include/srslte/asn1/gtpc_ies.h index e643b8f41..24652be5b 100644 --- a/lib/include/srslte/asn1/gtpc_ies.h +++ b/lib/include/srslte/asn1/gtpc_ies.h @@ -27,8 +27,6 @@ #include "srslte/phy/io/netsource.h" -//#include -//#include /**************************************************************** * @@ -135,7 +133,7 @@ enum gtpc_ie_type GTPC_IE_TYPE_TMGI = 158, GTPC_IE_TYPE_ADDITIONAL_MM_CONTEXT_FOR_SRVCC = 159, GTPC_IE_TYPE_ADDITIONAL_FLAGS_FOR_SRVCC = 160, -//161 RESERVED +//161 RESERVED GTPC_IE_TYPE_MDT_CONFIGURATION = 162, GTPC_IE_TYPE_APCO = 163, //164 RESERVED @@ -241,7 +239,7 @@ struct gtpc_ambr_ie * ***************************************************************************/ /* - * IP addresses should the sockaddr_storage struct, which can hold IPv4 + * IP addresse IEs should the sockaddr_storage struct, which can hold IPv4 * and IPv6 addresses. */ @@ -321,8 +319,22 @@ struct gtpc_f_teid_ie bool v6_present; enum gtpc_interface_type interface_type; uint32_t teid; - struct in_addr ipv4; - struct in6_addr ipv6; + in_addr_t ipv4; + struct in6_addr ipv6; //FIXME }; +//TODO +//TODO IEs between 8.22 and 8.28 missing +//TODO + +/**************************************************************************** + * + * GTP-C Bearer Context IE + * Ref: 3GPP TS 29.274 v10.14.0 Table 8.28-1 + * + ***************************************************************************/ +//The usage of this grouped IE is specific to the GTP-C message being sent. +//As such, each GTP-C message will define it's bearer context structures +//locally, according to the rules of TS 29.274 v10.14.0 Section 7. + #endif //GTPC_IES_H diff --git a/lib/include/srslte/asn1/gtpc_msg.h b/lib/include/srslte/asn1/gtpc_msg.h index ccb2c7ae4..efb429217 100644 --- a/lib/include/srslte/asn1/gtpc_msg.h +++ b/lib/include/srslte/asn1/gtpc_msg.h @@ -170,7 +170,7 @@ typedef struct gtpc_create_session_request bool pgw_addr_present; struct gtpc_f_teid_ie pgw_addr; // C - char[MAX_APN_LENGTH] apn; // M + char apn[MAX_APN_LENGTH]; // M //bool selection_mode_present; //enum selection_mode_ selection_mode; // C/CO //bool pdn_type_present; @@ -186,7 +186,23 @@ typedef struct gtpc_create_session_request //bool pco_present; //uint8_t pco; // C - struct gtpc_bearer_context_ie bearer_context_created; // M + struct gtpc_bearer_context_created_ie //see TS 29.274 v10.14.0 Table 7.2.1-2 + { + uint8_t ebi; + bool tft_present; + bool s1_u_enodeb_f_teid_present; + struct gtpc_f_teid_ie s1_u_enodeb_f_teid; + bool s4_u_sgsn_f_teid_present; + struct gtpc_f_teid_ie s4_u_sgsn_f_teid; + bool s5_s8_u_sgw_f_teid_present; + struct gtpc_f_teid_ie s5_s8_u_sgw_f_teid; + bool s5_s8_u_pgw_f_teid_present; + struct gtpc_f_teid_ie s5_s8_u_pgw_f_teid; + bool s12_rnc_f_teid_present; + struct gtpc_f_teid_ie s12_rnc_f_teid; + bool s2b_u_epdg_f_teid_present; + struct gtpc_f_teid_ie s2b_u_epdg_f_teid; + } bearer_context_created; // M //bool bearer_context_deleted_present; //struct bearer_context_ bearer_context_deleted; // C //bool trace_information_present; diff --git a/srsepc/src/mme/mme_gtpc.cc b/srsepc/src/mme/mme_gtpc.cc index aafcf367b..3e62a0bcb 100644 --- a/srsepc/src/mme/mme_gtpc.cc +++ b/srsepc/src/mme/mme_gtpc.cc @@ -91,9 +91,9 @@ mme_gtpc::send_create_session_request(uint64_t imsi, struct create_session_respo cs_req->rat_type = GTPC_RAT_TYPE::EUTRAN; //Save RX Control TEID - create_rx_control_teid(cs_req->sender_f_tied); + //create_rx_control_teid(cs_req->sender_f_teid); - spgw->handle_create_session_request(&cs_req, cs_resp); + //spgw->handle_create_session_request(&cs_req, cs_resp); return; } } //namespace srsepc diff --git a/srsepc/src/mme/s1ap.cc b/srsepc/src/mme/s1ap.cc index a334d47dc..7dc3648ee 100644 --- a/srsepc/src/mme/s1ap.cc +++ b/srsepc/src/mme/s1ap.cc @@ -487,7 +487,8 @@ s1ap::handle_nas_authentication_response(srslte::byte_buffer_t *nas_msg, srslte: //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 = m_gtpc->send_create_session_request(ue_ctx->imsi); + struct 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); } return true;