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
d0d795bc
Commit
d0d795bc
authored
Feb 03, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
3568333c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
160 deletions
+23
-160
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+1
-0
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+0
-2
src/amf-app/amf_config.hpp
src/amf-app/amf_config.hpp
+0
-1
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+18
-146
src/amf-app/amf_n11.hpp
src/amf-app/amf_n11.hpp
+0
-2
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+3
-9
src/amf-app/mysql_db.hpp
src/amf-app/mysql_db.hpp
+1
-0
No files found.
src/amf-app/amf_app.cpp
View file @
d0d795bc
...
...
@@ -335,6 +335,7 @@ void amf_app::handle_post_sm_context_response_error_400() {
Logger
::
amf_app
().
error
(
"Post SM context response error 400"
);
}
//------------------------------------------------------------------------------
bool
amf_app
::
generate_5g_guti
(
uint32_t
ranid
,
long
amfid
,
string
&
mcc
,
string
&
mnc
,
uint32_t
&
tmsi
)
{
string
ue_context_key
=
...
...
src/amf-app/amf_config.cpp
View file @
d0d795bc
...
...
@@ -467,8 +467,6 @@ void amf_config::display() {
" Api version ..........: %s"
,
ausf_addr
.
api_version
.
c_str
());
}
// Logger::config().info(" HTTP2 port ............: %d", n11_http2_port);
Logger
::
config
().
info
(
"- Remote SMF Pool.........: "
);
for
(
int
i
=
0
;
i
<
smf_pool
.
size
();
i
++
)
{
std
::
string
selected
;
...
...
src/amf-app/amf_config.hpp
View file @
d0d795bc
...
...
@@ -125,7 +125,6 @@ typedef struct interface_cfg_s {
struct
in6_addr
addr6
;
unsigned
int
mtu
;
unsigned
int
port
;
// util::thread_sched_params thread_rd_sched_params;
}
interface_cfg_t
;
typedef
struct
itti_cfg_s
{
...
...
src/amf-app/amf_n1.cpp
View file @
d0d795bc
This diff is collapsed.
Click to expand it.
src/amf-app/amf_n11.hpp
View file @
d0d795bc
...
...
@@ -69,8 +69,6 @@ class amf_n11 {
bool
smf_selection_from_configuration
(
std
::
string
&
smf_addr
,
std
::
string
&
smf_api_version
);
// bool smf_selection_from_context(
// std::string& smf_addr, std::string& smf_api_version);
void
handle_post_sm_context_response_error_400
();
void
handle_post_sm_context_response_error
(
long
code
,
std
::
string
cause
,
bstring
n1sm
,
std
::
string
supi
,
...
...
src/amf-app/amf_n2.cpp
View file @
d0d795bc
...
...
@@ -1115,7 +1115,6 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
/**************************send HandoverCommandMsg to Source
* gnb**************************/
// HandoverCommandMsg* handovercommand = new HandoverCommandMsg();
std
::
unique_ptr
<
HandoverCommandMsg
>
handovercommand
=
std
::
make_unique
<
HandoverCommandMsg
>
();
handovercommand
->
setMessageType
();
...
...
@@ -1162,7 +1161,6 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
/**************************setPduSessionResourceHandoverList_PDYSessionID_handovercommandtransfer-end**************************/
uint8_t
buffer
[
10240
];
int
encoded_size
=
handovercommand
->
encode2buffer
(
buffer
,
10240
);
// delete handovercommand;
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
std
::
shared_ptr
<
ue_ngap_context
>
unc
;
if
(
!
is_ran_ue_id_2_ue_ngap_context
(
ran_id_Global
))
{
...
...
@@ -1202,8 +1200,7 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
Logger
::
amf_n2
().
debug
(
"Missing IE UserLocationInformationNR"
);
return
;
}
// UEContextReleaseCommandMsg* ueContextReleaseCommand =
// new UEContextReleaseCommandMsg();
std
::
unique_ptr
<
UEContextReleaseCommandMsg
>
ueContextReleaseCommand
=
std
::
make_unique
<
UEContextReleaseCommandMsg
>
();
ueContextReleaseCommand
->
setMessageType
();
...
...
@@ -1212,7 +1209,6 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
Ngap_CauseRadioNetwork_successful_handover
);
uint8_t
buffer
[
10240
];
int
encoded_size
=
ueContextReleaseCommand
->
encode2buffer
(
buffer
,
10240
);
// delete ueContextReleaseCommand;
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
std
::
shared_ptr
<
nas_context
>
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
...
...
@@ -1289,8 +1285,7 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
amf_DL_value
->
getvalue
(
amf_dl_pdcp
,
amf_hfn_dl_pdcp
);
long
amf_drb_id
;
amf_drb_id
=
*
amf_dRB_id
;
// DownlinkRANStatusTransfer* downLinkranstatustransfer =
// new DownlinkRANStatusTransfer();
std
::
unique_ptr
<
DownlinkRANStatusTransfer
>
downLinkranstatustransfer
=
std
::
make_unique
<
DownlinkRANStatusTransfer
>
();
downLinkranstatustransfer
->
setmessagetype
();
...
...
@@ -1300,15 +1295,14 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
amf_drb_id
,
amf_ul_pdcp
,
amf_hfn_ul_pdcp
,
amf_dl_pdcp
,
amf_hfn_dl_pdcp
);
uint8_t
buffer
[
1024
];
int
encode_size
=
downLinkranstatustransfer
->
encodetobuffer
(
buffer
,
1024
);
// delete downLinkranstatustransfer;
bstring
b
=
blk2bstr
(
buffer
,
encode_size
);
// std::shared_ptr<ue_ngap_context> ngc =
// ran_ue_id_2_ue_ngap_context(AMF_TARGET_ran_id_global);
sctp_s_38412
.
sctp_send_msg
(
downlink_sctp_assoc_id
,
0
,
&
b
);
}
// Context management functions
//------------------------------------------------------------------------------
bool
amf_n2
::
is_ran_ue_id_2_ue_ngap_context
(
const
uint32_t
&
ran_ue_ngap_id
)
const
{
std
::
shared_lock
lock
(
m_ranid2uecontext
);
...
...
src/amf-app/mysql_db.hpp
View file @
d0d795bc
...
...
@@ -36,6 +36,7 @@
#define KEY_LENGTH (16)
#define SQN_LENGTH (6)
#define RAND_LENGTH (16)
typedef
struct
{
uint8_t
key
[
KEY_LENGTH
];
uint8_t
sqn
[
SQN_LENGTH
];
...
...
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