Commit 050a6842 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'bug_fixes_for_bupt' into 'develop'

Bug fixes for BUPT

See merge request oai/oai-cn5g-smf!6
parents c98c86ee a15a05c0
......@@ -73,8 +73,8 @@ SMF =
APN_LIST = (
# IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDN_TYPE choice in {IPv4, IPv6, IPv4v6}
{APN_NI = "carrier.com"; PDN_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1},
{APN_NI = "apn1"; PDN_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1},
{APN_NI = "default"; PDN_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1},
{APN_NI = "carrier.com"; PDN_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1},
{APN_NI = "apn2"; PDN_TYPE = "IPv4"; IPV4_POOL = 2; IPV6_POOL = -1},
{APN_NI = "apn3"; PDN_TYPE = "IPv4"; IPV4_POOL = 3; IPV6_POOL = -1},
{APN_NI = "apn4"; PDN_TYPE = "IPv4"; IPV4_POOL = 4; IPV6_POOL = -1}
......
......@@ -103,7 +103,7 @@ void SMContextsCollectionApiImpl::post_sm_contexts(
smContextCreateData.getSNssai().getSst(),
smContextCreateData.getSNssai().getSd().c_str());
snssai_t snssai(smContextCreateData.getSNssai().getSst(),
smContextCreateData.getSNssai().getSd().c_str());
smContextCreateData.getSNssai().getSd());
sm_context_req_msg.set_snssai(snssai);
//PDU session ID
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -56,6 +56,7 @@ extern "C" {
#include "Ngap_NGAP-PDU.h"
#include "Ngap_PDUSessionResourceSetupResponseTransfer.h"
#include "Ngap_PDUSessionResourceModifyResponseTransfer.h"
#include "Ngap_PDUSessionResourceReleaseResponseTransfer.h"
}
namespace smf {
......@@ -121,6 +122,16 @@ class smf_n1_n2 {
std::shared_ptr<Ngap_PDUSessionResourceModifyResponseTransfer_t> &ngap_IE,
std::string &n2_sm_info);
/*
* Decode N2 SM Information Ngap_PDUSessionResourceReleaseResponseTransfer_t
* @param [std::shared_ptr<Ngap_PDUSessionResourceReleaseResponseTransfer_t>&] ngap_IE Store decoded NGAP message
* @param [std::string&] n2_sm_info N2 SM Information
* @return status of the decode process
*/
int decode_n2_sm_information(
std::shared_ptr<Ngap_PDUSessionResourceReleaseResponseTransfer_t> &ngap_IE,
std::string &n2_sm_info);
};
} // namespace smf
......
......@@ -389,8 +389,7 @@ void session_create_sm_context_procedure::handle_itti_msg(
Logger::smf_app().debug(
"Prepare a PDU Session Establishment Accept message and send to UE");
smf_n1_n2_inst.create_n1_sm_container(n11_triggered_pending->res,
PDU_SESSION_ESTABLISHMENT_ACCEPT,
n1_sm_msg,
PDU_SESSION_ESTABLISHMENT_ACCEPT, n1_sm_msg,
cause_value_5gsm_e::CAUSE_0_UNKNOWN); //TODO: need cause?
smf_app_inst->convert_string_2_hex(n1_sm_msg, n1_sm_msg_hex);
n11_triggered_pending->res.set_n1_sm_message(n1_sm_msg_hex);
......@@ -1100,6 +1099,7 @@ void session_update_sm_context_procedure::handle_itti_msg(
cause_value_5gsm_e::CAUSE_26_INSUFFICIENT_RESOURCES); //TODO: check Cause
smf_app_inst->convert_string_2_hex(n1_sm_msg, n1_sm_msg_hex);
n11_triggered_pending->res.set_n1_sm_message(n1_sm_msg_hex);
//N2 SM Information
smf_n1_n2_inst.create_n2_sm_information(
n11_triggered_pending->res, 1, n2_sm_info_type_e::PDU_RES_REL_CMD,
......
......@@ -127,6 +127,8 @@ int main(int argc, char* argv[]) {
SubscriptionsCollectionDocumentApiImpl SubscriptionsCollectionDocumentApiserver(router);
SubscriptionsCollectionDocumentApiserver.init();
std::cout << "AMF server is listening on address: " << amf_ip_address.c_str() << std::endl;
httpEndpoint->setHandler(router->handler());
httpEndpoint->serve();
......
This diff is collapsed.
{
"jsonData": {
"supi": "208931234561000",
"pei": "pei",
"gpsi": "gpsi",
"pduSessionId": 5,
"dnn": "default",
"sNssai": {"sst":1, "sd":123},
"hplmnSnssai": {"sst":1, "sd": 345},
"servingNfId": "",
"guami": {"plmnId": {"mcc": "122", "mnc":"13"}, "amfId":"2"},
"serviceName": "",
"servingNetwork": {"mcc": "122", "mnc":"13"},
"requestType": 1,
"anType": "",
"secondAnType": "",
"ratType": "",
"presenceInLadn": "",
"ueTimeZone": "",
"smContextStatusUri": "",
"hSmfUri": "",
"additionalHsmfUri": [],
"oldPduSessionId": 1,
"pduSessionsActivateList": [1,2],
"ueEpsPdnConnection": "",
"hoState": "",
"pcfId": "",
"nrfUi": "",
"supportedFeatures": "",
"selMode": "VERIFIED",
"udmGroupId": "",
"routingIndicator": "",
"epsBearerCtxStatus": "",
"cpCiotEnabled": true,
"invokeNef": true,
"maPduIndication": false,
"smContextRef": "",
"n2SmInfo": {"contentId":"n2SmInfo"},
"n1SmMsg": {"contentId":"n1SmMsg"}
},
"binaryDataN1SmMessage":"2e031fc100ff93a2390f616263646566406768696a6b2e6c6d",
"binaryDataN1SmMessage_full":"00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 02 00 55 00 01 40 00 40 84 3c 25 7f 00 00 01 7f 00 00 01 df b0 96 0c ea 4c f5 4b 00 00 00 00 00 03 00 35 20 bc ec 86 00 00 00 00 00 00 00 00 00 0f 40 21 00 00 01 00 26 00 1a 19 2e 03 1f c1 00 ff 93 a2 39 0f 61 62 63 64 65 66 40 67 68 69 6a 6b 2e 6c 6d"
}
{
"jsonData": {
"supi": "supi",
"pei": "pei",
"gpsi": "gpsi",
"pduSessionId": 1,
"dnn": "dnn",
"sNssai": {"sst":1, "sd":"sd"},
"hplmnSnssai": {"sst":1, "sd":"sd"},
"servingNfId": "",
"guami": {"plmnId": {"mcc": "122", "mnc":"13"}, "amfId":"2"},
"serviceName": "",
"servingNetwork": {"mcc": "122", "mnc":"13"},
"requestType": "",
"anType": "",
"secondAnType": "",
"ratType": "",
"presenceInLadn": "",
"ueLocation": "",
"ueTimeZone": "",
"addUeLocation": "",
"smContextStatusUri": "",
"hSmfUri": "",
"additionalHsmfUri": [],
"oldPduSessionId": "",
"pduSessionsActivateList": [1,2],
"ueEpsPdnConnection": "",
"hoState": "",
"pcfId": "",
"nrfUi": "",
"supportedFeatures": "",
"selMode": "",
"backupAmfInfo": [],
"traceData": "",
"udmGroupId": "",
"routingIndicator": "",
"epsInterworkingInd": "",
"indirectForwardingFlag": "",
"targetId": "",
"epsBearerCtxStatus": "",
"cpCiotEnabled": "",
"invokeNef": "",
"maPduIndication": "",
"smContextRef": "",
"n2SmInfo": "",
"n1SmMsg": {"contentId":"contentId"}
},
"binaryDataN1SmMessage":"binaryDataN1SmMessage",
"binaryDataN2SmInformation": "binaryDataN2SmInformation"
}
00000 00 00 00 00 00 00 00 00
00008 00 00 00 00 08 00 45 02
00010 00 55 00 01 40 00 40 84
00018 3c 25 7f 00 00 01 7f 00
00020 00 01 df b0 96 0c ea 4c
00028 f5 4b 00 00 00 00 00 03
00030 00 35 20 bc ec 86 00 00
00038 00 00 00 00 00 00 00 0f
00040 40 21 00 00 01 00 26 00
00048 1a 19 2e 03 1f c1 00 ff
00050 93 a2 39 0f 61 62 63 64
00058 65 66 40 67 68 69 6a 6b
00060 2e 6c 6d
{
"singleNssai": {"sst":1, "sd":123},
"dnnConfigurations": {
"default": {
"pduSessionTypes": {"defaultSessionType": "IPV4"} ,
"sscModes": {"defaultSscMode": "SSC_MODE_1"} ,
"5gQosProfile": {"5qi": 12345, "arp": {"priorityLevel": 1 , "preemptCap": "NOT_PREEMPT" , "preemptVuln": "NOT_PREEMPTABLE"} },
"sessionAmbr": {"uplink": "10Mbps", "downlink":"11Mbps"}
}
}
}
......@@ -44,14 +44,23 @@ void SessionManagementSubscriptionDataRetrievalApiImpl::get_sm_data(const std::s
nlohmann::json jsonData;
jsonData["singleNssai"]["sst"] = 222;
jsonData["singleNssai"]["sd"] = 123;
jsonData["dnnConfigurations"]["carrier.com"]["pduSessionTypes"]["defaultSessionType"] = "IPV4";
jsonData["dnnConfigurations"]["carrier.com"]["sscModes"]["defaultSscMode"] = "SSC_MODE_1";
jsonData["dnnConfigurations"]["carrier.com"]["5gQosProfile"]["5qi"] = 60;
jsonData["dnnConfigurations"]["carrier.com"]["5gQosProfile"]["arp"]["priorityLevel"] = 1;
jsonData["dnnConfigurations"]["carrier.com"]["5gQosProfile"]["arp"]["preemptCap"] = "NOT_PREEMPT";
jsonData["dnnConfigurations"]["carrier.com"]["5gQosProfile"]["arp"]["preemptVuln"] = "NOT_PREEMPTABLE";
jsonData["dnnConfigurations"]["carrier.com"]["sessionAmbr"]["uplink"] = "10Mbps";
jsonData["dnnConfigurations"]["carrier.com"]["sessionAmbr"]["downlink"] = "11Mbps";
jsonData["dnnConfigurations"]["default"]["pduSessionTypes"]["defaultSessionType"] = "IPV4";
jsonData["dnnConfigurations"]["default"]["sscModes"]["defaultSscMode"] = "SSC_MODE_1";
jsonData["dnnConfigurations"]["default"]["5gQosProfile"]["5qi"] = 60;
jsonData["dnnConfigurations"]["default"]["5gQosProfile"]["arp"]["priorityLevel"] = 1;
jsonData["dnnConfigurations"]["default"]["5gQosProfile"]["arp"]["preemptCap"] = "NOT_PREEMPT";
jsonData["dnnConfigurations"]["default"]["5gQosProfile"]["arp"]["preemptVuln"] = "NOT_PREEMPTABLE";
jsonData["dnnConfigurations"]["default"]["sessionAmbr"]["uplink"] = "20Mbps";
jsonData["dnnConfigurations"]["default"]["sessionAmbr"]["downlink"] = "22Mbps";
jsonData["dnnConfigurations"]["carrier.com"]["pduSessionTypes"]["defaultSessionType"] = "IPV4";
jsonData["dnnConfigurations"]["carrier.com"]["sscModes"]["defaultSscMode"] = "SSC_MODE_1";
jsonData["dnnConfigurations"]["carrier.com"]["5gQosProfile"]["5qi"] = 61;
jsonData["dnnConfigurations"]["carrier.com"]["5gQosProfile"]["arp"]["priorityLevel"] = 1;
jsonData["dnnConfigurations"]["carrier.com"]["5gQosProfile"]["arp"]["preemptCap"] = "NOT_PREEMPT";
jsonData["dnnConfigurations"]["carrier.com"]["5gQosProfile"]["arp"]["preemptVuln"] = "NOT_PREEMPTABLE";
jsonData["dnnConfigurations"]["carrier.com"]["sessionAmbr"]["uplink"] = "10Mbps";
jsonData["dnnConfigurations"]["carrier.com"]["sessionAmbr"]["downlink"] = "11Mbps";
/*
SessionManagementSubscriptionData subscriptionData;
......
......@@ -117,7 +117,6 @@ int main(int argc, char* argv[]) {
opts.flags(Pistache::Tcp::Options::ReuseAddr);
opts.maxPayload(PISTACHE_SERVER_MAX_PAYLOAD);
httpEndpoint->init(opts);
AccessAndMobilitySubscriptionDataRetrievalApiImpl AccessAndMobilitySubscriptionDataRetrievalApiserver(router);
AccessAndMobilitySubscriptionDataRetrievalApiserver.init();
......@@ -160,9 +159,12 @@ int main(int argc, char* argv[]) {
UEContextInSMSFDataRetrievalApiImpl UEContextInSMSFDataRetrievalApiserver(router);
UEContextInSMSFDataRetrievalApiserver.init();
std::cout << "UDM is listening on address: " << udm_ip_address.c_str() << std::endl;
httpEndpoint->setHandler(router->handler());
httpEndpoint->serve();
httpEndpoint->shutdown();
}
......
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