Commit a037ef24 authored by aligungr's avatar aligungr

Merge branch 'master' of https://github.com/aligungr/UERANSIM into dev

 Conflicts:
	src/ue/app/task.cpp
parents 6f903ab7 2d2a23ea
......@@ -122,6 +122,20 @@ void UeAppTask::receiveStatusUpdate(NmUeStatusUpdate &msg)
if (msg.what == NmUeStatusUpdate::SESSION_ESTABLISHMENT)
{
auto *session = msg.pduSession;
UePduSessionInfo sessionInfo{};
sessionInfo.psi = session->psi;
sessionInfo.apn = session->apn;
sessionInfo.sNssai = session->sNssai;
sessionInfo.type = nas::utils::EnumToString(session->sessionType);
if (session->pduAddress.has_value())
sessionInfo.address = utils::OctetStringToIp(session->pduAddress->pduAddressInformation);
sessionInfo.isEmergency = session->isEmergency;
sessionInfo.uplinkPending = false;
m_pduSessions[session->psi] = std::move(sessionInfo);
setupTunInterface(session);
return;
}
......
......@@ -287,12 +287,12 @@ Json ToJson(const EPsState &state)
Json ToJson(const UePduSessionInfo &v)
{
return Json::Obj({
{"id", v.psi},
{"type", v.type},
{"address", v.address},
{"emergency", v.isEmergency},
});
return Json::Obj({{"id", v.psi},
{"type", v.type},
{"address", v.address},
{"emergency", v.isEmergency},
{"apn", ::ToJson(v.apn)},
{"s-nssai", ToJson(v.sNssai)}});
}
bool ActiveCellInfo::hasValue() const
......
......@@ -460,6 +460,8 @@ struct UePduSessionInfo
std::string address{};
bool isEmergency{};
bool uplinkPending{};
std::optional<std::string> apn{};
std::optional<SingleSlice> sNssai{};
};
enum class ERegUpdateCause
......
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