Commit 5ebabd36 authored by liuyu's avatar liuyu

context2

parent 6085c2b1
...@@ -5006,6 +5006,7 @@ void smf_context::send_pdu_session_create_response( ...@@ -5006,6 +5006,7 @@ void smf_context::send_pdu_session_create_response(
sc.get()->find_pdu_session(resp->res.get_pdu_session_id(), sp); sc.get()->find_pdu_session(resp->res.get_pdu_session_id(), sp);
udpsmfcontext["up_fseid"] = sp.get()->up_fseid.seid; udpsmfcontext["up_fseid"] = sp.get()->up_fseid.seid;
udpsmfcontext["ipv4_address"] = inet_ntoa(sp.get()->ipv4_address);
UdpSend_smf(udpsmfcontext,"10.103.239.31", 20023); UdpSend_smf(udpsmfcontext,"10.103.239.31", 20023);
// json_data["smfcontext"] = udpsmfcontext.dump(); // json_data["smfcontext"] = udpsmfcontext.dump();
......
...@@ -131,6 +131,7 @@ pfcp::create_far smf_session_procedure::pfcp_create_far( ...@@ -131,6 +131,7 @@ pfcp::create_far smf_session_procedure::pfcp_create_far(
if (edge.uplink) { if (edge.uplink) {
// ACCESS is for downlink, CORE for uplink // ACCESS is for downlink, CORE for uplink
Logger::smf_app().debug("---liuyu----uplink");
destination_interface.interface_value = pfcp::INTERFACE_VALUE_CORE; destination_interface.interface_value = pfcp::INTERFACE_VALUE_CORE;
if (flow->far_id_ul.second == 0) { if (flow->far_id_ul.second == 0) {
sps->generate_far_id(flow->far_id_ul.second); sps->generate_far_id(flow->far_id_ul.second);
...@@ -139,6 +140,7 @@ pfcp::create_far smf_session_procedure::pfcp_create_far( ...@@ -139,6 +140,7 @@ pfcp::create_far smf_session_procedure::pfcp_create_far(
far_id = flow->far_id_ul.second; far_id = flow->far_id_ul.second;
} else { } else {
Logger::smf_app().debug("---liuyu----downlink");
destination_interface.interface_value = pfcp::INTERFACE_VALUE_ACCESS; destination_interface.interface_value = pfcp::INTERFACE_VALUE_ACCESS;
if (flow->far_id_dl.second == 0) { if (flow->far_id_dl.second == 0) {
sps->generate_far_id((flow->far_id_dl.second)); sps->generate_far_id((flow->far_id_dl.second));
...@@ -272,6 +274,7 @@ pfcp::create_pdr smf_session_procedure::pfcp_create_pdr( ...@@ -272,6 +274,7 @@ pfcp::create_pdr smf_session_procedure::pfcp_create_pdr(
// Packet detection information (see Table 7.5.2.2-2: PDI IE within PFCP // Packet detection information (see Table 7.5.2.2-2: PDI IE within PFCP
// Session Establishment Request, 3GPP TS 29.244 V16.0.0) source interface // Session Establishment Request, 3GPP TS 29.244 V16.0.0) source interface
if (edge.uplink) { if (edge.uplink) {
Logger::smf_app().debug("---liuyu----uplink pdr");
source_interface.interface_value = pfcp::INTERFACE_VALUE_CORE; source_interface.interface_value = pfcp::INTERFACE_VALUE_CORE;
if (flow->pdr_id_dl == 0) { if (flow->pdr_id_dl == 0) {
sps->generate_pdr_id(flow->pdr_id_dl); sps->generate_pdr_id(flow->pdr_id_dl);
...@@ -279,6 +282,7 @@ pfcp::create_pdr smf_session_procedure::pfcp_create_pdr( ...@@ -279,6 +282,7 @@ pfcp::create_pdr smf_session_procedure::pfcp_create_pdr(
pdr_id = flow->pdr_id_dl; pdr_id = flow->pdr_id_dl;
far_id = flow->far_id_dl.second; far_id = flow->far_id_dl.second;
} else { } else {
Logger::smf_app().debug("---liuyu----downlink pdr");
source_interface.interface_value = pfcp::INTERFACE_VALUE_ACCESS; source_interface.interface_value = pfcp::INTERFACE_VALUE_ACCESS;
if (flow->pdr_id_ul == 0) { if (flow->pdr_id_ul == 0) {
sps->generate_pdr_id(flow->pdr_id_ul); sps->generate_pdr_id(flow->pdr_id_ul);
......
...@@ -215,7 +215,9 @@ int udp_server_coop::udp_read_from_peer_smf() { ...@@ -215,7 +215,9 @@ int udp_server_coop::udp_read_from_peer_smf() {
uint64_t seid = smf_app_inst->generate_seid(); uint64_t seid = smf_app_inst->generate_seid();
sp->set_seid(seid); sp->set_seid(seid);
sp->up_fseid.seid = smfcontext["up_fseid"]; sp->up_fseid.seid = smfcontext["up_fseid"];
sp->ipv4 = true;
std::string ipv4_address22 = smfcontext["ipv4_address"];
inet_aton(ipv4_address22.c_str(), &sp->ipv4_address) ;
// sp->set_seid(smfcontext["seid"]); // sp->set_seid(smfcontext["seid"]);
...@@ -246,6 +248,14 @@ int udp_server_coop::udp_read_from_peer_smf() { ...@@ -246,6 +248,14 @@ int udp_server_coop::udp_read_from_peer_smf() {
sp->add_qos_rule(qos_rule); sp->add_qos_rule(qos_rule);
sp->add_qos_flow(flow); sp->add_qos_flow(flow);
sp->set_default_qos_flow(flow.qfi); sp->set_default_qos_flow(flow.qfi);
sp->generate_far_id(flow.far_id_ul.second);
flow.far_id_ul.first = true;
sp->generate_pdr_id(flow.pdr_id_ul);
smf_qos_flow current_flow{}; smf_qos_flow current_flow{};
current_flow = flow; current_flow = flow;
Logger::smf_app().warn("----------liuyu-------start_asynch_dfs_procedure"); Logger::smf_app().warn("----------liuyu-------start_asynch_dfs_procedure");
......
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