Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
2026e6ea
Commit
2026e6ea
authored
May 24, 2021
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change mothed .c_str() ,modify gnb_context model
parent
21860716
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
300 additions
and
5 deletions
+300
-5
etc/etc_amf_openxg.conf
etc/etc_amf_openxg.conf
+1
-1
qqq.pcap
qqq.pcap
+0
-0
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+32
-1
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+108
-1
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+154
-1
src/amf-app/amf_n2.hpp
src/amf-app/amf_n2.hpp
+5
-0
src/oai-amf/main.cpp
src/oai-amf/main.cpp
+0
-1
No files found.
etc/etc_amf_openxg.conf
View file @
2026e6ea
...
...
@@ -74,7 +74,7 @@ AMF =
PORT
=
8282
;
# YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL
= (
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"
192.168.122.197
"
;
PORT
=
"8889"
;
VERSION
=
"v2"
;
SELECTED
=
"true"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"
192.168.70.133
"
;
PORT
=
"8889"
;
VERSION
=
"v2"
;
SELECTED
=
"true"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
2
;
IPV4_ADDRESS
=
"192.168.122.2"
;
PORT
=
"80"
;
VERSION
=
"v1"
;
SELECTED
=
"false"
}
# YOUR SMF CONFIG HERE
);
};
...
...
qqq.pcap
0 → 100644
View file @
2026e6ea
File added
src/amf-app/amf_app.cpp
View file @
2026e6ea
...
...
@@ -32,7 +32,7 @@
#include <iostream>
#include <cstdlib>
#include "itti.hpp"
#include <nlohmann/json.hpp>
#include "ngap_app.hpp"
#include "amf_config.hpp"
#include "amf_n2.hpp"
...
...
@@ -254,6 +254,37 @@ void amf_app::handle_itti_message(itti_nas_signalling_establishment_request &itt
if
(
is_guti_valid
)
{
itti_n1_msg
->
guti
=
guti
;
}
std
::
string
udsf_url
=
"http://10.28.234.76:8081/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
ue_context_key
;
nlohmann
::
json
udsf_ue_context
;
udsf_ue_context
[
"meta"
]
[
"tags"
]
=
{
{
"record_id"
,
nlohmann
::
json
::
array
({
ue_context_key
})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
}
;
udsf_ue_context
[
"blocks"
]
=
nlohmann
::
json
::
array
({
nlohmann
::
json
::
object
({
{
"ran_ue_ngap_id"
,
to_string
(
uc
.
get
()
->
ran_ue_ngap_id
)},
{
"amf_ue_ngap_id"
,
to_string
(
uc
.
get
()
->
amf_ue_ngap_id
)},
{
"isUeContextRequest"
,
to_string
(
uc
.
get
()
->
isUeContextRequest
)},
{
"rrc_estb_cause"
,
to_string
(
uc
.
get
()
->
rrc_estb_cause
)},
{
"cgi"
,
nlohmann
::
json
::
object
({
{
"mcc"
,
uc
.
get
()
->
cgi
.
mcc
},
{
"mnc"
,
uc
.
get
()
->
cgi
.
mnc
},
{
"nrCellID"
,
to_string
(
uc
.
get
()
->
cgi
.
nrCellID
)},
})
},
{
"tai"
,
nlohmann
::
json
::
object
({
{
"mcc"
,
uc
.
get
()
->
tai
.
mcc
},
{
"mnc"
,
uc
.
get
()
->
tai
.
mnc
},
{
"tac"
,
to_string
(
uc
.
get
()
->
tai
.
tac
)},
})
}
})
});
std
::
string
json_part
=
udsf_ue_context
.
dump
();
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
json_part
,
"PUT"
);
std
::
shared_ptr
<
itti_uplink_nas_data_ind
>
i
=
std
::
shared_ptr
<
itti_uplink_nas_data_ind
>
(
itti_n1_msg
);
int
ret
=
itti_inst
->
send_msg
(
i
);
if
(
0
!=
ret
)
{
...
...
src/amf-app/amf_n1.cpp
View file @
2026e6ea
This diff is collapsed.
Click to expand it.
src/amf-app/amf_n2.cpp
View file @
2026e6ea
This diff is collapsed.
Click to expand it.
src/amf-app/amf_n2.hpp
View file @
2026e6ea
...
...
@@ -34,7 +34,9 @@
#include "ue_ngap_context.hpp"
#include "amf.hpp"
namespace
amf_application
{
#define UDSF_CURL_TIMEOUT_MS 100L
class
amf_n2
:
public
ngap
::
ngap_app
{
public:
...
...
@@ -51,6 +53,9 @@ class amf_n2 : public ngap::ngap_app{
void
handle_itti_message
(
itti_ue_radio_capability_indication
&
itti_msg
);
bool
verifyPlmn
(
std
::
vector
<
SupportedItem_t
>
list
);
std
::
vector
<
SupportedItem_t
>
get_common_plmn
(
std
::
vector
<
SupportedItem_t
>
list
);
void
curl_http_client_udsf
(
std
::
string
remoteUri
,
std
::
string
jsonData
,
std
::
string
http_mothed
)
;
private:
std
::
map
<
uint32_t
,
std
::
shared_ptr
<
ue_ngap_context
>>
ranid2uecontext
;
// ran ue ngap id
mutable
std
::
shared_mutex
m_ranid2uecontext
;
...
...
src/oai-amf/main.cpp
View file @
2026e6ea
...
...
@@ -50,7 +50,6 @@ extern void ue_gnb_simulator();
using
namespace
config
;
using
namespace
amf_application
;
amf_config
amf_cfg
;
amf_modules
modules
;
itti_mw
*
itti_inst
=
nullptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment