Commit f1b16745 authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Display in int and hex for SD

parent 36e0bec2
......@@ -853,8 +853,8 @@ void smf_app::handle_pdu_session_create_sm_context_request(
snssai_t snssai = smreq->req.get_snssai();
Logger::smf_app().info(
"Handle a PDU Session Create SM Context Request message from AMF, "
"SUPI " SUPI_64_FMT ", SNSSAI SST %d, SD %#0x",
supi64, snssai.sst, snssai.sd);
"SUPI " SUPI_64_FMT ", SNSSAI SST %d, SD %ld (0x%x)",
supi64, snssai.sst, snssai.sd, snssai.sd);
// Step 2. Verify Procedure transaction id, pdu session id, message type,
// request type, etc.
......
......@@ -1059,20 +1059,14 @@ void smf_config::display() {
Logger::smf_app().info(
" Session Management Subscription Data %d:", index);
std::string nssai_str = {};
nssai_str = nssai_str.append(" ")
.append(SMF_CONFIG_STRING_NSSAI_SST)
.append(": ")
.append(std::to_string(sub.single_nssai.sst));
if (sub.single_nssai.sd != 0xffffff) {
nssai_str = nssai_str.append(", ")
.append(SMF_CONFIG_STRING_NSSAI_SD)
.append(": ")
.append(std::to_string(sub.single_nssai.sd));
if (sub.single_nssai.sd != SD_NO_VALUE) {
Logger::smf_app().info(
" SST, SD: %d, %ld (0x%x)", sub.single_nssai.sst,
sub.single_nssai.sd, sub.single_nssai.sd);
} else {
Logger::smf_app().info(" SST: %d", sub.single_nssai.sst);
}
Logger::smf_app().info("%s", nssai_str.c_str());
Logger::smf_app().info(
" " SMF_CONFIG_STRING_DNN ": %s", sub.dnn.c_str());
Logger::smf_app().info(
......
......@@ -3575,8 +3575,8 @@ void smf_context::insert_dnn_subscription(
std::unique_lock<std::recursive_mutex> lock(m_context);
dnn_subscriptions[key] = ss;
Logger::smf_app().info(
"Inserted DNN Subscription, key: %ld (SST %d, SD %#0x)", key, snssai.sst,
snssai.sd);
"Inserted DNN Subscription, key: %ld (SST %d, SD %ld (0x%x))", key,
snssai.sst, snssai.sd, snssai.sd);
}
//------------------------------------------------------------------------------
......@@ -3601,8 +3601,8 @@ void smf_context::insert_dnn_subscription(
dnn_subscriptions[key] = ss;
}
Logger::smf_app().info(
"Inserted DNN Subscription, key: %ld (SST %d, SD %#0x), dnn %s", key,
snssai.sst, snssai.sd, dnn.c_str());
"Inserted DNN Subscription, key: %ld (SST %d, SD %ld (0x%x)), dnn %s",
key, snssai.sst, snssai.sd, snssai.sd, dnn.c_str());
}
//------------------------------------------------------------------------------
......@@ -3633,8 +3633,9 @@ bool smf_context::find_dnn_subscription(
get_snssai_key(snssai, key);
Logger::smf_app().info(
"Find a DNN Subscription with key: %ld (SST %d, SD %#0x), map size %d",
(uint8_t) snssai.sst, snssai.sd, dnn_subscriptions.size());
"Find a DNN Subscription with key: %ld (SST %d, SD %ld (0x%x)), map size "
"%d",
(uint8_t) snssai.sst, snssai.sd, snssai.sd, dnn_subscriptions.size());
std::unique_lock<std::recursive_mutex> lock(m_context);
if (dnn_subscriptions.count(key) > 0) {
......@@ -3643,8 +3644,8 @@ bool smf_context::find_dnn_subscription(
}
Logger::smf_app().info(
"DNN subscription (SST %d, SD %#0x) not found", (uint8_t) snssai.sst,
snssai.sd);
"DNN subscription (SST %d, SD %ld (0x%x)) not found",
(uint8_t) snssai.sst, snssai.sd, snssai.sd);
return false;
}
......
......@@ -212,8 +212,9 @@ bool smf_n1::create_n1_pdu_session_establishment_accept(
sm_context_res.get_snssai().sd;
Logger::smf_n1().debug(
"SNSSAI SST %d, SD %#0x",
"SNSSAI SST %d, SD %ld (0x%x)",
sm_msg->pdu_session_establishment_accept.snssai.sst,
sm_msg->pdu_session_establishment_accept.snssai.sd,
sm_msg->pdu_session_establishment_accept.snssai.sd);
// TODO: AlwaysonPDUSessionIndication
......
......@@ -476,8 +476,8 @@ bool pfcp_associations::select_up_node(
Logger::smf_app().info(
"Select the UPF for the corresponding DNN %s, NSSSAI (SST: "
"%d, "
"SD: %d) ",
d.dnn.c_str(), snssai.sst, snssai.sd);
"SD: %ld (0x%x)) ",
d.dnn.c_str(), snssai.sst, snssai.sd, snssai.sd);
return true;
}
}
......
......@@ -203,7 +203,7 @@ void nf_profile::display() const {
Logger::smf_app().debug("\tSNSSAI:");
}
for (auto s : snssais) {
Logger::smf_app().debug("\t\t SST %d, SD %#0x", s.sst, s.sd);
Logger::smf_app().debug("\t\t SST %d, SD %ld (0x%x)", s.sst, s.sd, s.sd);
}
if (!fqdn.empty()) {
Logger::smf_app().debug("\tFQDN: %s", fqdn.c_str());
......@@ -393,7 +393,8 @@ void smf_profile::display() const {
for (auto s : smf_info.snssai_smf_info_list) {
Logger::smf_app().debug("\t\tParameters supported by the SMF:");
Logger::smf_app().debug(
"\t\t\tSNSSAI (SST %d, SD %#0x)", s.snssai.sst, s.snssai.sd);
"\t\t\tSNSSAI (SST %d, SD %ld (0x%x))", s.snssai.sst, s.snssai.sd,
s.snssai.sd);
for (auto d : s.dnn_smf_info_list) {
Logger::smf_app().debug("\t\t\tDNN %s", d.dnn.c_str());
}
......@@ -533,7 +534,8 @@ void upf_profile::display() const {
for (auto s : upf_info.snssai_upf_info_list) {
Logger::smf_app().debug("\t\tParameters supported by the UPF:");
Logger::smf_app().debug(
"\t\t\tSNSSAI (SST %d, SD %#0x)", s.snssai.sst, s.snssai.sd);
"\t\t\tSNSSAI (SST %d, SD %ld (0x%x))", s.snssai.sst, s.snssai.sd,
s.snssai.sd);
for (auto d : s.dnn_upf_info_list) {
Logger::smf_app().debug("\t\t\tDNN %s", d.dnn.c_str());
}
......
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