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
dc294603
Commit
dc294603
authored
Jul 29, 2022
by
yangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug: handover error -> The count does not match
parent
044ed83d
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
95 additions
and
106 deletions
+95
-106
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+8
-5
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+4
-1
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+51
-66
src/itti/msgs/itti_msg_n11.hpp
src/itti/msgs/itti_msg_n11.hpp
+1
-0
src/ngap/ngapIEs/COUNTValueForPDCP_SN18.cpp
src/ngap/ngapIEs/COUNTValueForPDCP_SN18.cpp
+4
-4
src/ngap/ngapIEs/PDUSessionResourceHandoverCommandTransfer.cpp
...gap/ngapIEs/PDUSessionResourceHandoverCommandTransfer.cpp
+9
-9
src/ngap/ngapIEs/PDUSessionResourceHandoverRequestAckTransfer.cpp
.../ngapIEs/PDUSessionResourceHandoverRequestAckTransfer.cpp
+4
-7
src/ngap/ngapIEs/QosFlowToBeForwardedList.cpp
src/ngap/ngapIEs/QosFlowToBeForwardedList.cpp
+2
-2
src/ngap/ngapIEs/dRBStatusDL.cpp
src/ngap/ngapIEs/dRBStatusDL.cpp
+2
-2
src/ngap/ngapIEs/dRBStatusUL.cpp
src/ngap/ngapIEs/dRBStatusUL.cpp
+2
-2
src/ngap/ngapIEs/dRBsSubjectToStatusTransferItem.cpp
src/ngap/ngapIEs/dRBsSubjectToStatusTransferItem.cpp
+4
-4
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
+2
-2
src/ngap/ngapMsgs/UplinkRANStatusTransfer.cpp
src/ngap/ngapMsgs/UplinkRANStatusTransfer.cpp
+2
-2
No files found.
src/amf-app/amf_n1.cpp
View file @
dc294603
...
...
@@ -666,6 +666,7 @@ void amf_n1::service_request_handle(bool isNasSig,
}
set_amf_ue_ngap_id_2_nas_context
(
amf_ue_ngap_id
,
nc
);
nc
.
get
()
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
nas_secu_ctx
*
secu
=
nc
.
get
()
->
security_ctx
;
ServiceRequest
*
serReq
=
new
ServiceRequest
();
serReq
->
decodefrombuffer
(
nullptr
,
(
uint8_t
*
)
bdata
(
nas
),
blength
(
nas
));
...
...
@@ -2194,7 +2195,6 @@ int amf_n1::security_select_algorithms(uint8_t nea, uint8_t nia,
}
return
0
;
}
//------------------------------------------------------------------------------
void
amf_n1
::
security_mode_complete_handle
(
uint32_t
ran_ue_ngap_id
,
long
amf_ue_ngap_id
,
...
...
@@ -2353,9 +2353,9 @@ void amf_n1::security_mode_complete_handle(uint32_t ran_ue_ngap_id,
protectedNas
);
uint8_t
*
kamf
=
nc
.
get
()
->
kamf
[
secu
->
vector_pointer
];
uint8_t
kgnb
[
32
];
uint32_t
ulcount
=
secu
->
ul_count
.
seq_num
|
(
secu
->
ul_count
.
overflow
<<
8
);
//
uint32_t ulcount = secu->ul_count.seq_num | (secu->ul_count.overflow << 8);
Authentication_5gaka
::
derive_kgnb
(
0
,
0x01
,
kamf
,
kgnb
);
ncc
=
1
;
//
ncc = 1;
print_buffer
(
"amf_n1"
,
"kamf"
,
kamf
,
32
);
// Authentication_5gaka::derive_kgnb(ulcount, 0x01, kamf, kgnb);
bstring
kgnb_bs
=
blk2bstr
(
kgnb
,
32
);
...
...
@@ -3055,8 +3055,11 @@ void amf_n1::run_mobility_registration_update_procedure(
itti_msg
->
kgnb
=
kgnb_bs
;
itti_msg
->
nas
=
protectedNas
;
itti_msg
->
is_sr
=
true
;
// service request indicator
itti_msg
->
pdu_session_id
=
psc
.
get
()
->
pdu_session_id
;
itti_msg
->
n2sm
=
psc
.
get
()
->
n2sm
;
if
(
psc
.
get
()
!=
nullptr
)
{
itti_msg
->
pdu_session_id
=
psc
.
get
()
->
pdu_session_id
;
itti_msg
->
n2sm
=
psc
.
get
()
->
n2sm
;
}
std
::
shared_ptr
<
itti_initial_context_setup_request
>
i
=
std
::
shared_ptr
<
itti_initial_context_setup_request
>
(
itti_msg
);
int
ret
=
itti_inst
->
send_msg
(
i
);
...
...
src/amf-app/amf_n11.cpp
View file @
dc294603
...
...
@@ -199,9 +199,12 @@ void amf_n11::handle_itti_message(
Logger
::
amf_n11
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
nlohmann
::
json
pdu_session_update_request
=
{};
// if (itti_msg.is_n2sm_set){
pdu_session_update_request
[
"n2SmInfoType"
]
=
itti_msg
.
n2sm_info_type
;
pdu_session_update_request
[
"n2SmInfo"
][
"contentId"
]
=
"n2msg"
;
if
(
!
itti_msg
.
ho_state
.
compare
(
"COMPLETED"
))
{
pdu_session_update_request
[
"hoState"
]
=
itti_msg
.
ho_state
;
}
std
::
string
json_part
=
pdu_session_update_request
.
dump
();
std
::
string
n2SmMsg
;
octet_stream_2_hex_stream
(
...
...
src/amf-app/amf_n2.cpp
View file @
dc294603
...
...
@@ -71,10 +71,8 @@ extern statistics stacs;
extern
void
print_buffer
(
const
std
::
string
app
,
const
std
::
string
commit
,
uint8_t
*
buf
,
int
len
);
uint32_t
ran_id_Global
=
0
;
uint32_t
AMF_TARGET_ran_id_global
=
0
;
sctp_assoc_id_t
downlink_sctp_assoc_id
=
0
;
sctp_assoc_id_t
source_assoc_id
=
0
;
int
ncc
=
0
;
void
amf_n2_task
(
void
*
);
...
...
@@ -938,11 +936,16 @@ void amf_n2::handle_itti_message(
//------------------------------------------------------------------------------
void
amf_n2
::
handle_itti_message
(
itti_handover_required
&
itti_msg
)
{
int
handover_num_8
=
0
;
ncc
++
;
if
(
ncc
>
7
)
{
ncc
=
0
;
handover_num_8
=
handover_num_8
+
1
;
}
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handvoerRequ
->
getAmfUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handvoerRequ
->
getRanUeNgapId
();
ran_id_Global
=
ran_ue_ngap_id
;
source_assoc_id
=
itti_msg
.
assoc_id
;
std
::
shared_ptr
<
gnb_context
>
gc
;
if
(
!
is_assoc_id_2_gnb_context
(
itti_msg
.
assoc_id
))
{
Logger
::
amf_n2
().
error
(
...
...
@@ -1001,7 +1004,7 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
string
mcc
,
mnc
;
plmn
->
getMcc
(
mcc
);
plmn
->
getMnc
(
mnc
);
printf
(
Logger
::
amf_n2
().
debug
(
"handover required:Target ID GlobalRanNodeID PLmn=mcc%s mnc%s "
"gnbid=%x
\n
"
,
mcc
.
c_str
(),
mnc
.
c_str
(),
gnbid
->
getValue
());
...
...
@@ -1013,7 +1016,7 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
string
mccOfselectTAI
,
mncOfselectTAI
;
plmn
->
getMcc
(
mccOfselectTAI
);
plmn
->
getMnc
(
mncOfselectTAI
);
printf
(
Logger
::
amf_n2
().
debug
(
"handover required:Target ID selectedTAI PLmn=mcc%s mnc%s tac=%x
\n
"
,
mccOfselectTAI
.
c_str
(),
mncOfselectTAI
.
c_str
(),
tac
->
getTac
());
std
::
vector
<
PDUSessionResourceItem_t
>
List_HORqd
;
...
...
@@ -1035,14 +1038,14 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
handoverrequest
->
setCause
(
Ngap_Cause_PR_radioNetwork
,
Ngap_CauseRadioNetwork_handover_desirable_for_radio_reason
);
handoverrequest
->
setUEAggregateMaximumBitRate
(
300000000
,
10000000
0
);
handoverrequest
->
setUESecurityCapabilities
(
0xe000
,
0xe000
,
0x
e000
,
0xe
000
);
handoverrequest
->
setUEAggregateMaximumBitRate
(
0x08a7d8c0
,
0x2098968
0
);
handoverrequest
->
setUESecurityCapabilities
(
0xe000
,
0xe000
,
0x
0000
,
0x0
000
);
S_NSSAI
s_nssai
;
s_nssai
.
setSst
(
"01"
);
std
::
vector
<
S_NSSAI
>
Allowed_Nssai
;
Allowed_Nssai
.
push_back
(
s_nssai
);
// handoverrequest->setAllowedNSSAI(Allowed_Nssai);
Guami_t
guami
;
guami
.
mcc
=
amf_cfg
.
guami
.
mcc
;
guami
.
mnc
=
amf_cfg
.
guami
.
mnc
;
...
...
@@ -1057,20 +1060,19 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
m_aMFRegionID
->
setAMFRegionID
(
guami
.
regionID
);
m_aMFSetID
->
setAMFSetID
(
guami
.
AmfSetID
);
m_aMFPointer
->
setAMFPointer
(
guami
.
AmfPointer
);
// handoverrequest->setMobilityRestrictionList(m_plmnId);
// handoverrequest->setGUAMI(m_plmnId, m_aMFRegionID, m_aMFSetID,
// m_aMFPointer);
std
::
shared_ptr
<
nas_context
>
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
nc
.
get
()
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
unc
=
ran_ue_id_2_ue_ngap_context
(
nc
.
get
()
->
ran_ue_ngap_id
);
unc
.
get
()
->
gnb_assoc_id
=
itti_msg
.
assoc_id
;
nas_secu_ctx
*
secu
=
nc
.
get
()
->
security_ctx
;
uint8_t
*
kamf
=
nc
.
get
()
->
kamf
[
secu
->
vector_pointer
];
uint8_t
kgnb
[
32
];
uint32_t
ulcount
=
secu
->
ul_count
.
seq_num
|
(
secu
->
ul_count
.
overflow
<<
8
);
Logger
::
amf_n1
().
debug
(
"uplink count(%d)"
,
secu
->
ul_count
.
seq_num
);
uint8_t
knh
[
32
];
Authentication_5gaka
::
handover_ncc_derive_knh
(
ulcount
,
0x01
,
kamf
,
kgnb
,
knh
,
ncc
);
0
,
0x01
,
kamf
,
kgnb
,
knh
,
ncc
+
8
*
handover_num_8
);
bstring
knh_bs
=
blk2bstr
(
knh
,
32
);
handoverrequest
->
setSecurityContext
(
ncc
/*NCC count*/
,
(
uint8_t
*
)
bdata
(
knh_bs
));
...
...
@@ -1116,7 +1118,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handoverrequestAck
->
getAmfUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handoverrequestAck
->
getRanUeNgapId
();
AMF_TARGET_ran_id_global
=
ran_ue_ngap_id
;
Logger
::
amf_n2
().
error
(
Logger
::
amf_n2
().
info
(
"handover request Ack ran_ue_ngap_id(0x%d) amf_ue_ngap_id(%d)"
,
ran_ue_ngap_id
,
amf_ue_ngap_id
);
std
::
shared_ptr
<
gnb_context
>
gc
;
...
...
@@ -1140,8 +1142,6 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
PDUSessionResourceHandoverRequestAckTransfer
*
PDUHandoverRequestAckTransfer
=
new
PDUSessionResourceHandoverRequestAckTransfer
();
uint8_t
buf
[
1024
];
cout
<<
list
[
0
].
handoverRequestAcknowledgeTransfer
.
buf
<<
endl
;
cout
<<
list
[
0
].
handoverRequestAcknowledgeTransfer
.
size
<<
endl
;
memcpy
(
buf
,
list
[
0
].
handoverRequestAcknowledgeTransfer
.
buf
,
...
...
@@ -1167,7 +1167,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
long
qosflowidentifiervalue
;
qosflowidentifiervalue
=
(
long
)
QosFlowWithDataForwardinglist
[
0
].
qosFlowIdentifier
;
cout
<<
"QFI get is "
<<
qosflowidentifiervalue
<<
endl
;
/**************************add-end**************************/
/**************************send HandoverCommandMsg to Source
...
...
@@ -1175,10 +1175,13 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
HandoverCommandMsg
*
handovercommand
=
new
HandoverCommandMsg
();
handovercommand
->
setMessageType
();
handovercommand
->
setAmfUeNgapId
(
amf_ue_ngap_id
);
handovercommand
->
setRanUeNgapId
(
ran_id_Global
);
std
::
shared_ptr
<
nas_context
>
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
std
::
shared_ptr
<
ue_ngap_context
>
ngc
=
ran_ue_id_2_ue_ngap_context
(
nc
.
get
()
->
ran_ue_ngap_id
);
handovercommand
->
setRanUeNgapId
(
nc
.
get
()
->
ran_ue_ngap_id
);
handovercommand
->
setHandoverType
(
Ngap_HandoverType_intra5gs
);
std
::
shared_ptr
<
nas_context
>
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
/**************************setPduSessionResourceHandoverList_PDYSessionID_handovercommandtransfer**************************/
std
::
vector
<
PDUSessionResourceHandoverItem_t
>
handover_list
;
...
...
@@ -1190,11 +1193,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
QosFlowToBeForwardedItem_t
forward_item
;
forward_item
.
QFI
=
qosflowidentifiervalue
;
forward_list
.
push_back
(
forward_item
);
// set dlforwardingup_tnlinformation
// TransportLayerAddress *transportlayeraddress = new TransportLayerAddress();
// transportlayeraddress->setTransportLayerAddress(n3_ip_address);
// GtpTeid *gtpTeid = new GtpTeid();
// gtpTeid->setGtpTeid(teid);
PDUSessionResourceHandoverCommandTransfer
*
handovercommandtransfer
=
new
PDUSessionResourceHandoverCommandTransfer
();
handovercommandtransfer
->
setQosFlowToBeForwardedList
(
forward_list
);
...
...
@@ -1202,7 +1201,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
uptlinfo
.
gtp_teid
=
teid
;
uptlinfo
.
ip_address
=
n3_ip_address
;
handovercommandtransfer
->
setUPTransportLayerInformation
(
uptlinfo
);
// handovercommand->setTargetToSource_TransparentContainer(targetTosource);
uint8_t
buffer2
[
500
];
int
encoded_size2
=
handovercommandtransfer
->
encodePDUSessionResourceHandoverCommandTransfer
(
...
...
@@ -1219,31 +1218,15 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
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
))
{
Logger
::
amf_n2
().
debug
(
"Create a new ue ngap context with ran_ue_ngap_id(0x%x)"
,
ran_id_Global
);
unc
=
std
::
shared_ptr
<
ue_ngap_context
>
(
new
ue_ngap_context
());
set_ran_ue_ngap_id_2_ue_ngap_context
(
ran_id_Global
,
unc
);
unc
.
get
()
->
gnb_assoc_id
=
source_assoc_id
;
}
else
{
unc
=
ran_ue_id_2_ue_ngap_context
(
ran_id_Global
);
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(ran_id_Global);
// 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
(
ngc
.
get
()
->
gnb_assoc_id
,
0
,
&
b
);
}
//------------------------------------------------------------------------------
void
amf_n2
::
handle_itti_message
(
itti_handover_notify
&
itti_msg
)
{
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handovernotify
->
getAmfUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handovernotify
->
getRanUeNgapId
();
Logger
::
amf_n2
().
error
(
Logger
::
amf_n2
().
info
(
"handover notify ran_ue_ngap_id(0x%d) amf_ue_ngap_id(%d)"
,
ran_ue_ngap_id
,
amf_ue_ngap_id
);
if
(
!
is_assoc_id_2_gnb_context
(
itti_msg
.
assoc_id
))
{
...
...
@@ -1260,28 +1243,30 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
UEContextReleaseCommandMsg
*
ueContextReleaseCommand
=
new
UEContextReleaseCommandMsg
();
ueContextReleaseCommand
->
setMessageType
();
ueContextReleaseCommand
->
setUeNgapIdPair
(
amf_ue_ngap_id
,
ran_id_Global
);
std
::
shared_ptr
<
nas_context
>
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
std
::
shared_ptr
<
ue_ngap_context
>
ngc
=
ran_ue_id_2_ue_ngap_context
(
nc
.
get
()
->
ran_ue_ngap_id
);
ueContextReleaseCommand
->
setUeNgapIdPair
(
amf_ue_ngap_id
,
nc
.
get
()
->
ran_ue_ngap_id
);
ueContextReleaseCommand
->
setCauseRadioNetwork
(
Ngap_CauseRadioNetwork_successful_handover
);
uint8_t
buffer
[
1024
0
];
int
encoded_size
=
ueContextReleaseCommand
->
encode2buffer
(
buffer
,
1024
0
);
uint8_t
buffer
[
1024
];
int
encoded_size
=
ueContextReleaseCommand
->
encode2buffer
(
buffer
,
1024
);
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
);
std
::
shared_ptr
<
ue_ngap_context
>
ngc
=
ran_ue_id_2_ue_ngap_context
(
nc
.
get
()
->
ran_ue_ngap_id
);
sctp_s_38412
.
sctp_send_msg
(
source_assoc_id
,
0
,
&
b
);
/*std::shared_ptr<nas_context> nc =
amf_n1_inst->amf_ue_id_2_nas_context(amf_ue_ngap_id); string supi = "imsi-" +
nc.get()->imsi; std::shared_ptr<pdu_session_context> psc =
amf_n11_inst->supi_to_pdu_ctx(supi); itti_nsmf_pdusession_update_sm_context
*itti_nsmf_msg = new itti_nsmf_pdusession_update_sm_context(TASK_AMF_N2,
TASK_AMF_N11); itti_nsmf_msg->supi = supi; itti_nsmf_msg->pdu_session_id =
psc.get()->pdu_session_id; itti_nsmf_msg->n2sm = psc.get()->n2sm;
std::shared_ptr<itti_nsmf_pdusession_update_sm_context> i =
std::shared_ptr<itti_nsmf_pdusession_update_sm_context>(itti_nsmf_msg);
//int ret = itti_inst->send_msg(i);*/
sctp_s_38412
.
sctp_send_msg
(
ngc
.
get
()
->
gnb_assoc_id
,
0
,
&
b
);
string
supi
=
"imsi-"
+
nc
.
get
()
->
imsi
;
std
::
shared_ptr
<
pdu_session_context
>
psc
=
amf_n11_inst
->
supi_to_pdu_ctx
(
supi
);
itti_nsmf_pdusession_update_sm_context
*
itti_nsmf_msg
=
new
itti_nsmf_pdusession_update_sm_context
(
TASK_AMF_N2
,
TASK_AMF_N11
);
itti_nsmf_msg
->
supi
=
supi
;
itti_nsmf_msg
->
pdu_session_id
=
psc
.
get
()
->
pdu_session_id
;
itti_nsmf_msg
->
n2sm
=
psc
.
get
()
->
n2sm
;
itti_nsmf_msg
->
n2sm_info_type
=
"HANDOVER_CMD"
;
itti_nsmf_msg
->
ho_state
=
"COMPLETED"
;
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
i
=
std
::
shared_ptr
<
itti_nsmf_pdusession_update_sm_context
>
(
itti_nsmf_msg
);
int
ret
=
itti_inst
->
send_msg
(
i
);
std
::
shared_ptr
<
ue_ngap_context
>
unc
;
if
(
!
is_ran_ue_id_2_ue_ngap_context
(
ran_ue_ngap_id
))
{
Logger
::
amf_n2
().
debug
(
...
...
@@ -1301,7 +1286,7 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
//------------------------------------------------------------------------------
void
amf_n2
::
handle_itti_message
(
itti_uplinkranstatsutransfer
&
itti_msg
)
{
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
uplinkrantransfer
->
getAmfUeNgapId
();
Logger
::
amf_n2
().
error
(
Logger
::
amf_n2
().
info
(
"uplinkranstatustransfer amf_ue_ngap_id(%d)"
,
amf_ue_ngap_id
);
if
(
!
is_assoc_id_2_gnb_context
(
itti_msg
.
assoc_id
))
{
Logger
::
amf_n2
().
error
(
...
...
src/itti/msgs/itti_msg_n11.hpp
View file @
dc294603
...
...
@@ -70,6 +70,7 @@ class itti_nsmf_pdusession_update_sm_context : public itti_msg_n11 {
}
public:
std
::
string
ho_state
;
std
::
string
supi
;
uint8_t
pdu_session_id
;
bstring
n2sm
;
...
...
src/ngap/ngapIEs/COUNTValueForPDCP_SN18.cpp
View file @
dc294603
...
...
@@ -21,16 +21,16 @@ bool COUNTValueForPDCP_SN18::encodedCOUNTValueForPDCP_SN18(
Ngap_COUNTValueForPDCP_SN18_t
*
countvalue
)
{
countvalue
->
pDCP_SN18
=
pdcp
;
countvalue
->
hFN_PDCP_SN18
=
hfn_pdcp
;
cout
<<
"the encode pdcp_sn18 is"
<<
countvalue
->
pDCP_SN18
<<
endl
;
cout
<<
"the encode hfn_pdcp_sn18 is"
<<
countvalue
->
hFN_PDCP_SN18
<<
endl
;
//
cout << "the encode pdcp_sn18 is" << countvalue->pDCP_SN18 << endl;
//
cout << "the encode hfn_pdcp_sn18 is" << countvalue->hFN_PDCP_SN18 << endl;
return
true
;
}
bool
COUNTValueForPDCP_SN18
::
decodedCOUNTValueForPDCP_SN18
(
Ngap_COUNTValueForPDCP_SN18_t
&
countValue
)
{
pdcp
=
countValue
.
pDCP_SN18
;
hfn_pdcp
=
countValue
.
hFN_PDCP_SN18
;
cout
<<
"the decode pdcp_sn18 is"
<<
countValue
.
pDCP_SN18
<<
endl
;
cout
<<
"the decode hfn_pdcp_sn18 is"
<<
countValue
.
hFN_PDCP_SN18
<<
endl
;
//
cout << "the decode pdcp_sn18 is" << countValue.pDCP_SN18 << endl;
//
cout << "the decode hfn_pdcp_sn18 is" << countValue.hFN_PDCP_SN18 << endl;
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/PDUSessionResourceHandoverCommandTransfer.cpp
View file @
dc294603
...
...
@@ -32,17 +32,17 @@ void PDUSessionResourceHandoverCommandTransfer::setQosFlowToBeForwardedList(
qosFlowToBeForwardedList
->
setQosFlowToBeForwardedItem
(
m_item
,
list
.
size
());
int
ret
=
qosFlowToBeForwardedList
->
encodeQosFlowToBeForwardedList
(
handovercommandtransferIE
->
qosFlowToBeForwardedList
);
cout
<<
"QFI in list "
<<
handovercommandtransferIE
->
qosFlowToBeForwardedList
->
list
.
count
<<
endl
;
//
cout << "QFI in list "
//
<< handovercommandtransferIE->qosFlowToBeForwardedList->list.count
//
<< endl;
if
(
handovercommandtransferIE
->
qosFlowToBeForwardedList
->
list
.
array
)
{
cout
<<
"array OK"
<<
endl
;
//
cout << "array OK" << endl;
if
(
handovercommandtransferIE
->
qosFlowToBeForwardedList
->
list
.
array
[
0
])
{
cout
<<
"QFI in list "
<<
handovercommandtransferIE
->
qosFlowToBeForwardedList
->
list
.
array
[
0
]
->
qosFlowIdentifier
<<
endl
;
//
cout << "QFI in list "
//
<< handovercommandtransferIE->qosFlowToBeForwardedList->list
//
.array[0]
//
->qosFlowIdentifier
//
<< endl;
}
else
{
cout
<<
"error1"
<<
endl
;
}
...
...
src/ngap/ngapIEs/PDUSessionResourceHandoverRequestAckTransfer.cpp
View file @
dc294603
...
...
@@ -61,11 +61,11 @@ bool PDUSessionResourceHandoverRequestAckTransfer::
cout
<<
"More data expected, call again"
<<
endl
;
return
false
;
}
else
{
cout
<<
"Failure to decode handoverRequestAcknowledegTransfer data"
<<
endl
;
cout
<<
"
Warn:
Failure to decode handoverRequestAcknowledegTransfer data"
<<
endl
;
// return false;
}
cout
<<
"rc.consumed to decode = "
<<
rc
.
consumed
<<
endl
;
cout
<<
endl
;
//
cout << "rc.consumed to decode = " << rc.consumed << endl;
//
cout << endl;
dLForwardingUP_TNLInformation
=
new
UpTransportLayerInformation
();
if
(
!
dLForwardingUP_TNLInformation
->
decodefromUpTransportLayerInformation
(
*
handoverRequestAcknowledegTransferIEs
...
...
@@ -102,10 +102,7 @@ bool PDUSessionResourceHandoverRequestAckTransfer::getqosFlowSetupResponseList(
if
(
!
QosFlowSetupResponseList
)
return
false
;
QosFlowItemWithDataForWarding
*
m_qosflowitemwithdataforwarding
;
int
num
=
0
;
if
(
QosFlowSetupResponseList
->
getQosFlowListWithDataForwarding
(
m_qosflowitemwithdataforwarding
,
num
))
{
cout
<<
"successful decode QosFlowList"
<<
endl
;
}
QosFlowSetupResponseList
->
getQosFlowListWithDataForwarding
(
m_qosflowitemwithdataforwarding
,
num
);
for
(
int
i
=
0
;
i
<
num
;
i
++
)
{
QosFlowLItemWithDataForwarding_t
response
;
m_qosflowitemwithdataforwarding
[
i
].
getQosFlowItemWithDataForWarding
(
...
...
src/ngap/ngapIEs/QosFlowToBeForwardedList.cpp
View file @
dc294603
...
...
@@ -17,7 +17,7 @@ bool QosFlowToBeForwardedList::encodeQosFlowToBeForwardedList(
m_ngap_qosflowtobeforwardedlist
=
(
Ngap_QosFlowToBeForwardedList_t
*
)
calloc
(
1
,
sizeof
(
Ngap_QosFlowToBeForwardedList_t
));
for
(
int
i
=
0
;
i
<
numofqosflowtobeforwardeditem
;
i
++
)
{
cout
<<
"encoding list..."
<<
endl
;
//
cout << "encoding list..." << endl;
Ngap_QosFlowToBeForwardedItem_t
*
response
=
(
Ngap_QosFlowToBeForwardedItem_t
*
)
calloc
(
1
,
sizeof
(
Ngap_QosFlowToBeForwardedItem_t
));
...
...
@@ -26,7 +26,7 @@ bool QosFlowToBeForwardedList::encodeQosFlowToBeForwardedList(
cout
<<
"encode QosFlowTowardedItem error"
<<
endl
;
return
false
;
}
cout
<<
"QFI is "
<<
response
->
qosFlowIdentifier
<<
endl
;
//
cout << "QFI is " << response->qosFlowIdentifier << endl;
if
(
ASN_SEQUENCE_ADD
(
&
m_ngap_qosflowtobeforwardedlist
->
list
,
response
)
!=
0
)
{
cout
<<
"encode QosFlowTowardedList error"
<<
endl
;
...
...
src/ngap/ngapIEs/dRBStatusDL.cpp
View file @
dc294603
...
...
@@ -48,7 +48,7 @@ bool dRBStatusDL::encodedRBStatusDL(Ngap_DRBStatusDL_t* dL) {
cout
<<
"encodedRBStatusDL error"
<<
endl
;
return
false
;
}
cout
<<
"encodedRBStatusDL successfully"
<<
endl
;
//
cout << "encodedRBStatusDL successfully" << endl;
return
true
;
}
bool
dRBStatusDL
::
decodedRBStatusDL
(
Ngap_DRBStatusDL_t
*
dL
)
{
...
...
@@ -57,7 +57,7 @@ bool dRBStatusDL::decodedRBStatusDL(Ngap_DRBStatusDL_t* dL) {
cout
<<
"decodedRBStatusDL error"
<<
endl
;
return
false
;
}
cout
<<
"decodedRBStatusDL successfully"
<<
endl
;
//
cout << "decodedRBStatusDL successfully" << endl;
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/dRBStatusUL.cpp
View file @
dc294603
...
...
@@ -49,7 +49,7 @@ bool dRBStatusUL::encodedRBStatusUL(Ngap_DRBStatusUL_t* uL) {
cout
<<
"encodeddRBStatusUL18 error"
<<
endl
;
return
false
;
}
cout
<<
"encodedRBStatusUL successfully"
<<
endl
;
//
cout << "encodedRBStatusUL successfully" << endl;
return
true
;
}
bool
dRBStatusUL
::
decodedRBStatusUL
(
Ngap_DRBStatusUL_t
*
uL
)
{
...
...
@@ -58,7 +58,7 @@ bool dRBStatusUL::decodedRBStatusUL(Ngap_DRBStatusUL_t* uL) {
cout
<<
"decodeddRBStatusUL18 error"
<<
endl
;
return
false
;
}
cout
<<
"decodedRBStatusUL successfully"
<<
endl
;
//
cout << "decodedRBStatusUL successfully" << endl;
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/dRBsSubjectToStatusTransferItem.cpp
View file @
dc294603
...
...
@@ -27,7 +27,7 @@ bool dRBSubjectItem::decodefromdRBSubjectItem(
Ngap_DRBsSubjectToStatusTransferItem_t
*
dRB_item
)
{
if
(
dRB_item
->
dRB_ID
)
{
drb_id
=
&
dRB_item
->
dRB_ID
;
cout
<<
"the decode drb_id is"
<<
*
drb_id
<<
endl
;
//
cout << "the decode drb_id is" << *drb_id << endl;
}
drb_ul
=
new
dRBStatusUL
();
if
(
!
drb_ul
->
decodedRBStatusUL
(
&
dRB_item
->
dRBStatusUL
))
{
...
...
@@ -39,14 +39,14 @@ bool dRBSubjectItem::decodefromdRBSubjectItem(
cout
<<
"decode from dRBSubjectItem dRBStatusDL error"
<<
endl
;
return
false
;
}
cout
<<
"decode from dRBSubjectItem successfully"
<<
endl
;
//
cout << "decode from dRBSubjectItem successfully" << endl;
return
true
;
}
bool
dRBSubjectItem
::
encodedRBSubjectItem
(
Ngap_DRBsSubjectToStatusTransferItem_t
*
dRB_item
)
{
if
(
drb_id
)
{
dRB_item
->
dRB_ID
=
*
drb_id
;
cout
<<
"the encode drb_id is"
<<
*
drb_id
<<
endl
;
//
cout << "the encode drb_id is" << *drb_id << endl;
}
if
(
!
drb_ul
->
encodedRBStatusUL
(
&
dRB_item
->
dRBStatusUL
))
{
cout
<<
"encode from dRBSubjectItem dRBStatusUL error"
<<
endl
;
...
...
@@ -56,7 +56,7 @@ bool dRBSubjectItem::encodedRBSubjectItem(
cout
<<
"encode from dRBSubjectItem dRBStatusDL error"
<<
endl
;
return
false
;
}
cout
<<
"encode from dRBSubjectItem successfully"
<<
endl
;
//
cout << "encode from dRBSubjectItem successfully" << endl;
return
true
;
}
}
// namespace ngap
\ No newline at end of file
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
View file @
dc294603
...
...
@@ -34,7 +34,7 @@ bool dRBSubjectList::encodefromdRBSubjectlist(
return
false
;
}
}
cout
<<
"encodefromdRBSubjectlist successfully"
<<
endl
;
//
cout << "encodefromdRBSubjectlist successfully" << endl;
return
true
;
}
bool
dRBSubjectList
::
decodefromdRBSubjectlist
(
...
...
@@ -48,7 +48,7 @@ bool dRBSubjectList::decodefromdRBSubjectlist(
return
false
;
}
}
cout
<<
"decodefromdRBSubjectlist successfully"
<<
endl
;
//
cout << "decodefromdRBSubjectlist successfully" << endl;
return
true
;
}
}
// namespace ngap
\ No newline at end of file
src/ngap/ngapMsgs/UplinkRANStatusTransfer.cpp
View file @
dc294603
...
...
@@ -128,8 +128,8 @@ bool UplinkRANStatusTransfer::defromPDU(Ngap_NGAP_PDU_t* ngap_msg_pdu) {
<<
endl
;
return
false
;
}
cout
<<
"can get the buffer of RANStatusTransfer_TransparentContainer"
<<
endl
;
//
cout << "can get the buffer of RANStatusTransfer_TransparentContainer"
//
<< endl;
}
else
{
cout
<<
"cann't get the buffer of "
"RANStatusTransfer_TransparentContainer"
...
...
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