Added PAA information in the create session response.
This commit is contained in:
parent
d76daf3db5
commit
ee21a277e5
|
@ -25,9 +25,11 @@
|
|||
#ifndef GTPC_IES_H
|
||||
#define GTPC_IES_H
|
||||
|
||||
|
||||
#include "srslte/phy/io/netsource.h"
|
||||
|
||||
namespace srslte
|
||||
{
|
||||
|
||||
/****************************************************************
|
||||
*
|
||||
* GTP-C IE Types
|
||||
|
@ -303,7 +305,33 @@ struct gtpc_ambr_ie
|
|||
*/
|
||||
|
||||
//TODO
|
||||
//TODO IEs between 8.10 and 8.17 missing
|
||||
//TODO IEs between 8.10 and 8.13 missing
|
||||
//TODO
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* GTP-C PAA Type IE
|
||||
* Ref: 3GPP TS 29.274 v10.14.0 Figure 8.14-1
|
||||
*
|
||||
***************************************************************************/
|
||||
enum gtpc_pdn_type
|
||||
{
|
||||
GTPC_PDN_TYPE_IPV4 = 1,
|
||||
GTPC_PDN_TYPE_IPV6 = 2,
|
||||
GTPC_PDN_TYPE_IPV4V6 = 3
|
||||
};
|
||||
|
||||
struct gtpc_pdn_address_allocation_ie
|
||||
{
|
||||
enum gtpc_pdn_type pdn_type;
|
||||
bool ipv4_present;
|
||||
bool ipv6_present;
|
||||
in_addr_t ipv4;
|
||||
struct in6_addr;
|
||||
};
|
||||
|
||||
//TODO
|
||||
//TODO IEs between 8.15 and 8.17 missing
|
||||
//TODO
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -396,4 +424,5 @@ struct gtpc_f_teid_ie
|
|||
//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.
|
||||
|
||||
} //namespace
|
||||
#endif //GTPC_IES_H
|
||||
|
|
|
@ -248,7 +248,7 @@ struct gtpc_create_session_response
|
|||
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
|
||||
struct gtpc_pdn_address_allocation_ie paa; //C
|
||||
//apn_restriction
|
||||
//apn_ambr
|
||||
//linked_eps_bearer_id
|
||||
|
|
|
@ -54,10 +54,10 @@ typedef struct {
|
|||
typedef struct {
|
||||
uint64_t imsi;
|
||||
in_addr_t ue_ipv4;
|
||||
struct gtpc_f_teid_ie uplink_ctrl;
|
||||
struct gtpc_f_teid_ie uplink_user;
|
||||
struct gtpc_f_teid_ie downlink_ctrl;
|
||||
struct gtpc_f_teid_ie downlink_user;
|
||||
struct srslte::gtpc_f_teid_ie uplink_ctrl;
|
||||
struct srslte::gtpc_f_teid_ie uplink_user;
|
||||
struct srslte::gtpc_f_teid_ie downlink_ctrl;
|
||||
struct srslte::gtpc_f_teid_ie downlink_user;
|
||||
} spgw_ue_ctxr;
|
||||
|
||||
class spgw:
|
||||
|
|
|
@ -321,21 +321,21 @@ spgw::handle_create_session_request(struct srslte::gtpc_create_session_request *
|
|||
//Initialize to zero\\
|
||||
bzero(cs_resp,sizeof(struct srslte::gtpc_create_session_response));
|
||||
//Setup Cause\\
|
||||
cs_resp->cause = ;
|
||||
cs_resp->cause.cause_value = srslte::GTPC_CAUSE_VALUE_REQUEST_ACCEPTED;
|
||||
//Setup sender F-TEID (ctrl)\\
|
||||
cs_resp->sender_f_teid.teid_present = true;
|
||||
cs_resp->sender_f_teid.teid = spgw_uplink_ctrl_teid;
|
||||
cs_resp->sender_f_teid.ipv4 = 0;//FIXME This is not relevant, as the GTP-C is not transmitted over sockets yet.
|
||||
//Bearer context created\\
|
||||
cs_resp->eps_bearer_context_created.ebi = 5;
|
||||
cs_resp->eps_bearer_context_created.cause = ;
|
||||
cs_resp->eps_bearer_context_created.cause.cause_value = srslte::GTPC_CAUSE_VALUE_REQUEST_ACCEPTED;
|
||||
cs_resp->eps_bearer_context_created.s1_u_sgw_f_teid_present=true;
|
||||
cs_resp->eps_bearer_context_created.s1_u_sgw_f_teid.teid = spgw_uplink_user_teid;
|
||||
//Fill in the PDA\\
|
||||
cs_resp->pda_present = true;
|
||||
cs_resp->pda.pdn_type = srslte::GTPC_IPV4;
|
||||
cs_resp->ipv4_present = true;
|
||||
cs_resp->ipv4 = ue_ip;
|
||||
cs_resp->paa_present = true;
|
||||
cs_resp->paa.pdn_type = srslte::GTPC_PDN_TYPE_IPV4;
|
||||
cs_resp->paa.ipv4_present = true;
|
||||
cs_resp->paa.ipv4 = ue_ip;
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue