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
17491201
Commit
17491201
authored
Jun 01, 2021
by
liuyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ue context
parent
beb25ce6
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
66 deletions
+99
-66
etc/ly.conf
etc/ly.conf
+8
-8
etc/openxg.sql
etc/openxg.sql
+1
-1
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+30
-29
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+24
-2
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+35
-25
src/ngap/libngap/OPEN_TYPE.c
src/ngap/libngap/OPEN_TYPE.c
+1
-1
No files found.
etc/ly.conf
View file @
17491201
...
...
@@ -37,17 +37,17 @@ AMF =
GUAMI
:
{
MCC
=
"460"
;
MNC
=
"
0
3"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
# YOUR GUAMI CONFIG HERE
MCC
=
"460"
;
MNC
=
"
3
3"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
# YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST
= (
#{MCC = "460"; MNC = "
0
3"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "0"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{
MCC
=
"460"
;
MNC
=
"
0
3"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
}
#48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
#{MCC = "460"; MNC = "
3
3"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "0"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{
MCC
=
"460"
;
MNC
=
"
3
3"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
}
#48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
);
PLMN_SUPPORT_LIST
= (
{
MCC
=
"460"
;
MNC
=
"
0
3"
;
TAC
=
100
;
# YOUR PLMN CONFIG HERE
MCC
=
"460"
;
MNC
=
"
3
3"
;
TAC
=
100
;
# YOUR PLMN CONFIG HERE
SLICE_SUPPORT_LIST
= (
{
SST
=
"1"
;
SD
=
"none"
},
# YOUR NSSAI CONFIG HERE
{
SST
=
"1"
;
SD
=
"12"
}
# YOUR NSSAI CONFIG HERE
...
...
@@ -69,7 +69,7 @@ AMF =
NAUSF
:
{
INTERFACE_NAME
=
"eth0"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"1
72.16.200.13
/24"
;
IPV4_ADDRESS
=
"1
27.0.0.1
/24"
;
PORT
=
8383
;
# YOUR NETWORK CONFIG HERE
};
...
...
@@ -81,8 +81,8 @@ AMF =
PORT
=
8282
;
# YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL
= (
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"1
72.16.200.15"
;
PORT
=
"8889
"
;
VERSION
=
"v1"
;
SELECTED
=
"true"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
2
;
IPV4_ADDRESS
=
"1
0.103.238.21
"
;
PORT
=
"8181"
;
VERSION
=
"v1"
;
SELECTED
=
"false"
}
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"1
92.168.70.133"
;
PORT
=
"80
"
;
VERSION
=
"v1"
;
SELECTED
=
"true"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
2
;
IPV4_ADDRESS
=
"1
92.168.70.133
"
;
PORT
=
"8181"
;
VERSION
=
"v1"
;
SELECTED
=
"false"
}
# YOUR SMF CONFIG HERE
);
};
};
...
...
@@ -93,7 +93,7 @@ AMF =
## MySQL mandatory options
MYSQL_server
=
"127.0.0.1"
;
# MySQL Server address
MYSQL_user
=
"root"
;
# Database server login
MYSQL_pass
=
"
linux
"
;
# Database server password
MYSQL_pass
=
"
123
"
;
# Database server password
MYSQL_db
=
"OPENXG_DB"
;
# Your database name
## OP
...
...
etc/openxg.sql
View file @
17491201
This diff is collapsed.
Click to expand it.
src/amf-app/amf_app.cpp
View file @
17491201
...
...
@@ -285,35 +285,36 @@ void amf_app::handle_itti_message(
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"
,
udsf_ue_context
);
/********************** hxs add *******************************/
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
;
nlohmann
::
json
cgi
;
cgi
[
"Content-ID"
]
=
"cgi"
;
cgi
[
"Content-Type"
]
=
"JSON"
;
cgi
[
"content"
][
"mcc"
]
=
uc
.
get
()
->
cgi
.
mcc
;
cgi
[
"content"
][
"mnc"
]
=
uc
.
get
()
->
cgi
.
mnc
;
cgi
[
"content"
][
"nrCellID"
]
=
to_string
(
uc
.
get
()
->
cgi
.
nrCellID
);
nlohmann
::
json
tai
;
tai
[
"Content-ID"
]
=
"tai"
;
tai
[
"Content-Type"
]
=
"JSON"
;
tai
[
"content"
][
"mcc"
]
=
uc
.
get
()
->
tai
.
mcc
;
tai
[
"content"
][
"mnc"
]
=
uc
.
get
()
->
tai
.
mnc
;
tai
[
"content"
][
"tac"
]
=
to_string
(
uc
.
get
()
->
tai
.
tac
);
udsf_ue_context
[
"meta"
]
[
"tags"
]
=
{
{
"record_id"
,
nlohmann
::
json
::
array
({
to_string
(
uc
.
get
()
->
ran_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
}
;
udsf_ue_context
[
"blocks"
]
=
nlohmann
::
json
::
array
({
{{
"Content-ID"
,
"ran_ue_ngap_id"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
uc
.
get
()
->
ran_ue_ngap_id
)}},
{{
"Content-ID"
,
"amf_ue_ngap_id"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
uc
.
get
()
->
amf_ue_ngap_id
)}},
{{
"Content-ID"
,
"rrc_estb_cause"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
uc
.
get
()
->
rrc_estb_cause
)}},
{{
"Content-ID"
,
"isUeContextRequest"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
uc
.
get
()
->
isUeContextRequest
)}}
});
udsf_ue_context
[
"blocks"
].
push_back
(
cgi
);
udsf_ue_context
[
"blocks"
].
push_back
(
tai
);
std
::
string
json_part
=
udsf_ue_context
.
dump
();
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
json_part
,
"PUT"
,
udsf_ue_context
);
/********************** hxs add *******************************/
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
);
...
...
src/amf-app/amf_n1.cpp
View file @
17491201
...
...
@@ -238,6 +238,11 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind &nas_data_ind) {
std
::
string
guti
=
nas_data_ind
.
guti
;
if
(
is_guti_2_nas_context
(
guti
))
nc
=
guti_2_nas_context
(
guti
);
//TODO HSX 从udsf找是否存在
else
{
Logger
::
amf_n1
().
error
(
"No existing nas_context with GUTI %s"
,
nas_data_ind
.
guti
.
c_str
());
...
...
@@ -246,6 +251,8 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind &nas_data_ind) {
}
else
{
if
(
is_amf_ue_id_2_nas_context
(
amf_ue_ngap_id
))
nc
=
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
//TODO HSX 从udsf找是否存在
else
Logger
::
amf_n1
().
warn
(
"No existing nas_context with amf_ue_ngap_id 0x%x"
,
amf_ue_ngap_id
);
...
...
@@ -368,6 +375,20 @@ void amf_n1::nas_signalling_establishment_request_handle(
nc
.
get
()
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
nc
.
get
()
->
serving_network
=
snn
;
// stacs.UE_connected += 1;
/********************** hxs add *******************************/
std
::
string
udsf_url
=
"http://10.28.234.76:8081/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"nas_context/records/"
)
+
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)
;
nlohmann
::
json
udsf_nas_context
;
udsf_nas_context
[
"meta"
]
[
"tags"
]
=
{
{
"record_id"
,
nlohmann
::
json
::
array
({
to_string
(
nc
.
get
()
->
amf_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
}
;
/********************** hxs add *******************************/
}
else
{
// Logger::amf_n1().debug("existing nas_context with amf_ue_ngap_id(0x%x)
// --> Update",amf_ue_ngap_id); nc =
...
...
@@ -377,8 +398,6 @@ void amf_n1::nas_signalling_establishment_request_handle(
uint8_t
*
buf
=
(
uint8_t
*
)
bdata
(
plain_msg
);
uint8_t
message_type
=
*
(
buf
+
2
);
Logger
::
amf_n1
().
debug
(
"NAS message type 0x%x"
,
message_type
);
switch
(
message_type
)
{
case
REGISTRATION_REQUEST
:
{
Logger
::
amf_n1
().
debug
(
...
...
@@ -648,6 +667,8 @@ void amf_n1::service_request_handle(bool isNasSig,
delete
serApt
;
return
;
}
psc
.
get
()
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
psc
.
get
()
->
amf_ue_ngap_id
=
amf_ue_ngap_id
;
}
else
{
Logger
::
amf_n1
().
error
(
"Cannot get pdu_session_context with SUPI %s"
,
supi
.
c_str
());
...
...
@@ -2726,6 +2747,7 @@ void amf_n1::ul_nas_transport_handle(uint32_t ran_ue_ngap_id,
itti_msg
->
snssai
.
sD
=
std
::
to_string
(
snssai
.
sd
);
itti_msg
->
plmn
.
mnc
=
plmn
.
mnc
;
itti_msg
->
plmn
.
mcc
=
plmn
.
mcc
;
itti_msg
->
plmn
.
tac
=
plmn
.
tac
;
std
::
shared_ptr
<
itti_smf_services_consumer
>
i
=
std
::
shared_ptr
<
itti_smf_services_consumer
>
(
itti_msg
);
int
ret
=
itti_inst
->
send_msg
(
i
);
...
...
src/amf-app/amf_n2.cpp
View file @
17491201
...
...
@@ -513,24 +513,24 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
//check the gNB context on which this UE is attached with assoc_id
itti_nas_signalling_establishment_request
*
itti_msg
=
new
itti_nas_signalling_establishment_request
(
TASK_AMF_N2
,
TASK_AMF_APP
);
//get gnb_context from udsf.200 ok gnb_context is exist
gnb_context
*
gc1
=
new
gnb_context
();
nlohmann
::
json
udsf_response
;
std
::
string
udsf_url
=
"http://10.28.234.76:8081/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
std
::
to_string
(
init_ue_msg
.
assoc_id
)
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id (%d)"
,
init_ue_msg
.
assoc_id
);
return
;
}
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
gc1
->
gnb_context_from_json
(
udsf_response
);
std
::
shared_ptr
<
gnb_context
>
gc
;
gc
=
std
::
shared_ptr
<
gnb_context
>
(
gc1
);
// if (!is_assoc_id_2_gnb_context(init_ue_msg.assoc_id)) {
// gnb_context *gc1 = new gnb_context();
// nlohmann::json udsf_response;
// std::string udsf_url = "http://10.28.234.76:8081/nudsf-dr/v1/amfdata/" + std::string("gnb_context/records/") + std::to_string(init_ue_msg.assoc_id) ;
// if(!amf_n2_inst->curl_http_client_udsf(udsf_url,"","GET",udsf_response)){
// Logger::amf_n2().error("No existing gNG context with assoc_id (%d)", init_ue_msg.assoc_id);
// return;
// }
// Logger::amf_n2().debug("udsf_response: %s", udsf_response.dump().c_str());
// gc1->gnb_context_from_json(udsf_response);
std
::
shared_ptr
<
gnb_context
>
gc
;
// gc = std::shared_ptr<gnb_context>(gc1);
if
(
!
is_assoc_id_2_gnb_context
(
init_ue_msg
.
assoc_id
))
{
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id (%d)"
,
init_ue_msg
.
assoc_id
);
return
;
}
//
gc = assoc_id_2_gnb_context(init_ue_msg.assoc_id);
gc
=
assoc_id_2_gnb_context
(
init_ue_msg
.
assoc_id
);
if
(
gc
.
get
()
->
ng_state
==
NGAP_RESETING
||
gc
.
get
()
->
ng_state
==
NGAP_SHUTDOWN
)
{
Logger
::
amf_n2
().
warn
(
"Received new association request on an association that is being %s, ignoring"
,
ng_gnb_state_str
[
gc
.
get
()
->
ng_state
]);
}
else
if
(
gc
.
get
()
->
ng_state
!=
NGAP_READY
)
{
...
...
@@ -613,25 +613,27 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
itti_msg
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
itti_msg
->
amf_ue_ngap_id
=
-
1
;
/***************************hxs add**************/
//send udsf to storage us_ngap_context recordid=ran+ue_ngap_id
std
::
string
udsf_put_url
=
"http://10.28.234.76:8081/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
std
::
to_string
(
itti_msg
->
ran_ue_ngap_id
)
;
std
::
string
udsf_put_url
=
"http://10.28.234.76:8081/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
std
::
to_string
(
unc
.
get
()
->
ran_ue_ngap_id
)
;
nlohmann
::
json
udsf_ue_ngap_context
;
udsf_ue_ngap_context
[
"meta"
]
[
"tags"
]
=
{
{
"record_id"
,
nlohmann
::
json
::
array
({
to_string
(
unc
.
get
()
->
ran_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
}
;
udsf_ue_ngap_context
[
"blocks"
]
=
nlohmann
::
json
::
array
({
{{
"Content-ID"
,
"ran_ue_ngap_id"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
itti_msg
->
ran_ue_ngap_id
)}},
{{
"Content-ID"
,
"ran_ue_ngap_id"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
unc
.
get
()
->
ran_ue_ngap_id
)}},
{{
"Content-ID"
,
"amf_ue_ngap_id"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
""
}},
{{
"Content-ID"
,
"sctp_stream_recv"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
unc
.
get
()
->
sctp_stream_recv
)}},
{{
"Content-ID"
,
"sctp_stream_send"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
unc
.
get
()
->
sctp_stream_send
)}},
{{
"Content-ID"
,
"gnb_assoc_id"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
to_string
(
unc
.
get
()
->
gnb_assoc_id
)}},
{{
"Content-ID"
,
"s_tmsi_5g"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
""
}},
{{
"Content-ID"
,
"ng_ue_state"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
""
}}
{{
"Content-ID"
,
"ng_ue_state"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
""
}},
{{
"Content-ID"
,
"ueContextRequest"
},{
"Content-Type"
,
"varchar(32)"
},{
"content"
,
""
}}
});
std
::
string
json_part
=
udsf_ue_ngap_context
.
dump
();
amf_n2_inst
->
curl_http_client_udsf
(
udsf_put_url
,
json_part
,
"PUT"
,
udsf_ue_ngap_context
);
/************************hxs add****************/
std
::
shared_ptr
<
itti_nas_signalling_establishment_request
>
i
=
std
::
shared_ptr
<
itti_nas_signalling_establishment_request
>
(
itti_msg
);
int
ret
=
itti_inst
->
send_msg
(
i
);
if
(
0
!=
ret
)
{
...
...
@@ -909,8 +911,9 @@ void amf_n2::handle_itti_message(
Logger
::
amf_n2
().
debug
(
" (%d bytes)
\n
"
,
encoded_size
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
sctp_s_38412
.
sctp_send_msg
(
gc
.
get
()
->
sctp_assoc_id
,
unc
.
get
()
->
sctp_stream_send
,
&
b
);
// sctp_s_38412.sctp_send_msg(gc.get()->sctp_assoc_id, unc.get()->sctp_stream_send, b);
sctp_s_38412
.
curl_http_client_Plugin
(
gc
.
get
()
->
sctp_assoc_id
,
unc
.
get
()
->
sctp_stream_send
,
b
);
// free memory
free_wrapper
((
void
**
)
&
buffer
);
}
...
...
@@ -986,7 +989,8 @@ void amf_n2::handle_itti_message(itti_ue_context_release_request& itti_msg) {
uint8_t
buffer
[
BUFFER_SIZE_512
];
int
encoded_size
=
ueCtxRelCmd
->
encode2buffer
(
buffer
,
BUFFER_SIZE_512
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
sctp_s_38412
.
sctp_send_msg
(
itti_msg
.
assoc_id
,
itti_msg
.
stream
,
&
b
);
//sctp_s_38412.sctp_send_msg(itti_msg.assoc_id, itti_msg.stream, &b);
sctp_s_38412
.
curl_http_client_Plugin
(
itti_msg
.
assoc_id
,
itti_msg
.
stream
,
b
);
}
void
amf_n2
::
handle_itti_message
(
itti_ue_context_release_command
&
itti_msg
)
{
...
...
@@ -1218,7 +1222,8 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
std
::
shared_ptr
<
gnb_context
>
gc_target
;
gc_target
=
gnb_id_2_gnb_context
(
gnbid
->
getValue
());
downlink_sctp_assoc_id
=
gc_target
.
get
()
->
sctp_assoc_id
;
sctp_s_38412
.
sctp_send_msg
(
gc_target
.
get
()
->
sctp_assoc_id
,
0
,
&
b
);
// sctp_s_38412.sctp_send_msg(gc_target.get()->sctp_assoc_id, 0, &b);
sctp_s_38412
.
curl_http_client_Plugin
(
gc_target
.
get
()
->
sctp_assoc_id
,
0
,
b
);
}
//------------------------------------------------------------------------------
...
...
@@ -1346,7 +1351,9 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
// 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(unc.get()->gnb_assoc_id, 0, &b);
sctp_s_38412
.
curl_http_client_Plugin
(
unc
.
get
()
->
gnb_assoc_id
,
0
,
b
);
}
//------------------------------------------------------------------------------
...
...
@@ -1381,7 +1388,8 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
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
);
//sctp_s_38412.sctp_send_msg(source_assoc_id, 0, &b);
sctp_s_38412
.
curl_http_client_Plugin
(
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 =
...
...
@@ -1465,7 +1473,9 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
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
);
//sctp_s_38412.sctp_send_msg(downlink_sctp_assoc_id, 0, &b);
sctp_s_38412
.
curl_http_client_Plugin
(
downlink_sctp_assoc_id
,
0
,
b
);
}
// Context management functions
//------------------------------------------------------------------------------
...
...
src/ngap/libngap/OPEN_TYPE.c
View file @
17491201
...
...
@@ -410,7 +410,7 @@ asn_dec_rval_t OPEN_TYPE_aper_get(
}
selected
=
elm
->
type_selector
(
td
,
sptr
);
printf
(
"element selected %d
\n
"
,
selected
.
presence_index
);
//
printf("element selected %d \n", selected.presence_index);
if
(
!
selected
.
presence_index
)
{
ASN__DECODE_FAILED
;
printf
(
"element ASN DECODE FAILED"
);
...
...
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