Commit 93d21e09 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Add IEs to support UE Rel 16

parent 09327ee6
......@@ -213,6 +213,16 @@ class smf_app {
protocol_configuration_options_t& pco_resp,
const pco_protocol_or_container_id_t* const poc_id);
/*
* process_pco_selected_bearer_control_mode
* @param [protocol_configuration_options_t &] pco_resp
* @param [pco_protocol_or_container_id_t *const] proc_id
* @return
*/
int process_pco_selected_bearer_control_mode(
protocol_configuration_options_t& pco_resp,
const pco_protocol_or_container_id_t* const poc_id);
public:
explicit smf_app(const std::string& config_file);
smf_app(smf_app const&) = delete;
......
......@@ -1514,7 +1514,10 @@ void smf_context::handle_pdu_session_create_sm_context_request(
.ci_ip_address_allocation_via_nas_signalling = 0,
.ci_ipv4_address_allocation_via_dhcpv4 = 0,
.ci_ipv4_link_mtu_request = 0,
.ci_dns_server_ipv6_address_request = 0};
.ci_dns_server_ipv6_address_request = 0,
.ci_ipv6_p_cscf_request = 0,
.ci_ipv4_p_cscf_request = 0,
.ci_selected_bearer_control_mode = 0};
smf_app_inst->process_pco_request(pco_req, pco_resp, pco_ids);
sm_context_resp_pending->res.set_epco(pco_resp);
......
......@@ -153,7 +153,8 @@ bool smf_n1::create_n1_pdu_session_establishment_accept(
return false;
}
sm_msg->pdu_session_establishment_accept.presence = 0x038a;
sm_msg->pdu_session_establishment_accept.presence =
0x039a; // Update Presence when adding a new IE
if (static_cast<uint8_t>(sm_cause) > 0) {
sm_msg->pdu_session_establishment_accept.presence = 0x039b;
sm_msg->pdu_session_establishment_accept._5gsmcause =
......@@ -217,9 +218,9 @@ bool smf_n1::create_n1_pdu_session_establishment_accept(
sm_msg->pdu_session_establishment_accept.snssai.sd,
sm_msg->pdu_session_establishment_accept.snssai.sd);
// TODO: AlwaysonPDUSessionIndication
// sm_msg->pdu_session_establishment_accept.alwaysonpdusessionindication.apsi_indication
// = ALWAYSON_PDU_SESSION_REQUIRED;
// AlwaysonPDUSessionIndication
sm_msg->pdu_session_establishment_accept.alwaysonpdusessionindication
.apsi_indication = ALWAYSON_PDU_SESSION_REQUIRED;
// TODO: MappedEPSBearerContexts
// TODO: EAPMessage
......
......@@ -386,6 +386,23 @@ int smf_app::process_pco_p_cscf_v6_request(
return pco_push_protocol_or_container_id(pco_resp, &poc_id_resp);
}
//------------------------------------------------------------------------------
int smf_app::process_pco_selected_bearer_control_mode(
protocol_configuration_options_t& pco_resp,
const pco_protocol_or_container_id_t* const poc_id) {
pco_protocol_or_container_id_t poc_id_resp = {0};
uint8_t value;
Logger::smf_app().debug(
"PCO: Protocol identifier Selected Bearer Control Mode");
poc_id_resp.protocol_id =
PCO_CONTAINER_IDENTIFIER_SELECTED_BEARER_CONTROL_MODE;
poc_id_resp.length_of_protocol_id_contents = 1;
value = 0x02; // MS/NW mode, hardcoded for now
poc_id_resp.protocol_id_contents = std::to_string(value);
return pco_push_protocol_or_container_id(pco_resp, &poc_id_resp);
}
//------------------------------------------------------------------------------
int smf_app::process_pco_request(
const protocol_configuration_options_t& pco_req,
......@@ -446,6 +463,11 @@ int smf_app::process_pco_request(
pco_resp, &pco_req.protocol_or_container_ids[id]);
pco_ids.ci_ipv4_p_cscf_request = true;
break;
case PCO_CONTAINER_IDENTIFIER_SELECTED_BEARER_CONTROL_MODE:
process_pco_selected_bearer_control_mode(
pco_resp, &pco_req.protocol_or_container_ids[id]);
pco_ids.ci_selected_bearer_control_mode = true;
break;
default:
Logger::smf_app().warn(
"PCO: Protocol/container identifier 0x%04X not supported now",
......
......@@ -50,6 +50,7 @@ typedef struct protocol_configuration_options_ids_s {
uint8_t ci_dns_server_ipv6_address_request : 1;
uint8_t ci_ipv6_p_cscf_request : 1;
uint8_t ci_ipv4_p_cscf_request : 1;
uint8_t ci_selected_bearer_control_mode : 1;
} protocol_configuration_options_ids_t;
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment