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
ffdf36a0
Commit
ffdf36a0
authored
Jul 19, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup for N2 handover
parent
91226be5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
34 deletions
+13
-34
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+2
-0
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+0
-1
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+11
-33
No files found.
src/amf-app/amf_app.cpp
View file @
ffdf36a0
...
@@ -205,6 +205,7 @@ void amf_app::set_supi_2_ue_context(
...
@@ -205,6 +205,7 @@ void amf_app::set_supi_2_ue_context(
supi2ue_ctx
[
supi
]
=
uc
;
supi2ue_ctx
[
supi
]
=
uc
;
}
}
//------------------------------------------------------------------------------
bool
amf_app
::
find_pdu_session_context
(
bool
amf_app
::
find_pdu_session_context
(
const
string
&
supi
,
const
std
::
uint8_t
pdu_session_id
,
const
string
&
supi
,
const
std
::
uint8_t
pdu_session_id
,
std
::
shared_ptr
<
pdu_session_context
>&
psc
)
{
std
::
shared_ptr
<
pdu_session_context
>&
psc
)
{
...
@@ -215,6 +216,7 @@ bool amf_app::find_pdu_session_context(
...
@@ -215,6 +216,7 @@ bool amf_app::find_pdu_session_context(
return
true
;
return
true
;
}
}
//------------------------------------------------------------------------------
bool
amf_app
::
get_pdu_sessions_context
(
bool
amf_app
::
get_pdu_sessions_context
(
const
string
&
supi
,
const
string
&
supi
,
std
::
vector
<
std
::
shared_ptr
<
pdu_session_context
>>&
sessions_ctx
)
{
std
::
vector
<
std
::
shared_ptr
<
pdu_session_context
>>&
sessions_ctx
)
{
...
...
src/amf-app/amf_n1.cpp
View file @
ffdf36a0
...
@@ -2002,7 +2002,6 @@ bool amf_n1::start_security_mode_control_procedure(
...
@@ -2002,7 +2002,6 @@ bool amf_n1::start_security_mode_control_procedure(
nc
.
get
()
->
is_current_security_available
=
true
;
nc
.
get
()
->
is_current_security_available
=
true
;
}
}
// SecurityModeCommand* smc = new SecurityModeCommand();
std
::
unique_ptr
<
SecurityModeCommand
>
smc
=
std
::
unique_ptr
<
SecurityModeCommand
>
smc
=
std
::
make_unique
<
SecurityModeCommand
>
();
std
::
make_unique
<
SecurityModeCommand
>
();
smc
->
setHeader
(
PLAIN_5GS_MSG
);
smc
->
setHeader
(
PLAIN_5GS_MSG
);
...
...
src/amf-app/amf_n2.cpp
View file @
ffdf36a0
...
@@ -1296,7 +1296,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
...
@@ -1296,7 +1296,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
// TODO: Experimental procedure, to be tested
// TODO: Experimental procedure, to be tested
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handoverrequestAck
->
getAmfUeNgapId
();
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handoverrequestAck
->
getAmfUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handoverrequestAck
->
getRanUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handoverrequestAck
->
getRanUeNgapId
();
Logger
::
amf_n2
().
error
(
Logger
::
amf_n2
().
debug
(
"Handover Request Ack ran_ue_ngap_id (0x%d) amf_ue_ngap_id (%d)"
,
"Handover Request Ack ran_ue_ngap_id (0x%d) amf_ue_ngap_id (%d)"
,
ran_ue_ngap_id
,
amf_ue_ngap_id
);
ran_ue_ngap_id
,
amf_ue_ngap_id
);
...
@@ -1390,44 +1390,22 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
...
@@ -1390,44 +1390,22 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
uptlinfo
.
gtp_teid
=
teid
;
uptlinfo
.
gtp_teid
=
teid
;
uptlinfo
.
ip_address
=
n3_ip_address
;
uptlinfo
.
ip_address
=
n3_ip_address
;
handovercommandtransfer
->
setUPTransportLayerInformation
(
uptlinfo
);
handovercommandtransfer
->
setUPTransportLayerInformation
(
uptlinfo
);
uint8_t
buffer2
[
500
];
int
encoded_size2
=
uint8_t
buffer_ho_cmd_transfer
[
BUFFER_SIZE_512
];
int
encoded_size
=
handovercommandtransfer
->
encodePDUSessionResourceHandoverCommandTransfer
(
handovercommandtransfer
->
encodePDUSessionResourceHandoverCommandTransfer
(
buffer2
,
500
);
buffer_ho_cmd_transfer
,
BUFFER_SIZE_512
);
OCTET_STRING_t
OCT_handovercommandtransfer
;
item
.
HandoverCommandTransfer
.
buf
=
buffer_ho_cmd_transfer
;
OCT_handovercommandtransfer
.
buf
=
buffer2
;
item
.
HandoverCommandTransfer
.
size
=
encoded_size
;
OCT_handovercommandtransfer
.
size
=
encoded_size2
;
item
.
HandoverCommandTransfer
=
OCT_handovercommandtransfer
;
handover_list
.
push_back
(
item
);
handover_list
.
push_back
(
item
);
handovercommand
->
setPduSessionResourceHandoverList
(
handover_list
);
handovercommand
->
setPduSessionResourceHandoverList
(
handover_list
);
handovercommand
->
setTargetToSource_TransparentContainer
(
targetTosource
);
handovercommand
->
setTargetToSource_TransparentContainer
(
targetTosource
);
// setPduSessionResourceHandoverList_PDYSessionID_handovercommandtransfer-end
uint8_t
buffer
[
BUFFER_SIZE_1024
];
int
encoded_size
=
handovercommand
->
encode2buffer
(
buffer
,
BUFFER_SIZE_1024
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
/*
uint8_t
buffer
[
BUFFER_SIZE_1024
];
// Create/Update UE NGAP Context if necessary
encoded_size
=
handovercommand
->
encode2buffer
(
buffer
,
BUFFER_SIZE_1024
);
// TO be verified
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
if (!is_ran_ue_id_2_ue_ngap_context(unc.get()->ran_ue_ngap_id)) {
Logger::amf_n2().debug(
"Create a new ue ngap context with ran_ue_ngap_id(0x%x)",
unc.get()->ran_ue_ngap_id);
unc = std::shared_ptr<ue_ngap_context>(new ue_ngap_context());
set_ran_ue_ngap_id_2_ue_ngap_context(unc.get()->ran_ue_ngap_id, unc);
unc.get()->gnb_assoc_id = source_assoc_id;
} else {
unc =
ran_ue_id_2_ue_ngap_context(unc.get()->ran_ue_ngap_id);
unc.get()->gnb_assoc_id = source_assoc_id;
}
*/
// std::shared_ptr<ue_ngap_context> ngc =
// ran_ue_id_2_ue_ngap_context(nc.get()->ran_ue_ngap_id);
// std::shared_ptr<ue_ngap_context> ngc =
// ran_ue_id_2_ue_ngap_context(unc.get()->ran_ue_ngap_id);
// sctp_s_38412.sctp_send_msg(ngc.get()->gnb_assoc_id, 0, &b);
sctp_s_38412
.
sctp_send_msg
(
unc
.
get
()
->
gnb_assoc_id
,
0
,
&
b
);
sctp_s_38412
.
sctp_send_msg
(
unc
.
get
()
->
gnb_assoc_id
,
0
,
&
b
);
}
}
...
...
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