Added structures to create session request. Starting to add create session response structure

master
Pedro Alvarez 7 years ago
parent e754c6cbf5
commit ff32f31c9b

@ -27,8 +27,6 @@
#include "srslte/phy/io/netsource.h"
//#include <linux/in.h>
//#include <linux/in6.h>
/****************************************************************
*
@ -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

@ -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;

@ -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

@ -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;

Loading…
Cancel
Save