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-Simple
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
CommunityXG
OpenXG-AMF-Simple
Commits
ad101763
Commit
ad101763
authored
Mar 12, 2021
by
luhan Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support 5G Phone
parent
62847c81
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
12 deletions
+26
-12
etc/amf_openxg.conf
etc/amf_openxg.conf
+4
-4
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+4
-3
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+5
-0
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+2
-2
src/nas/ies/UESecurityCapability.cpp
src/nas/ies/UESecurityCapability.cpp
+3
-1
src/ngap/ngapIEs/S-NSSAI.cpp
src/ngap/ngapIEs/S-NSSAI.cpp
+4
-1
src/ngap/ngap_app/ngap_app.cpp
src/ngap/ngap_app/ngap_app.cpp
+3
-0
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
.../amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
+1
-1
No files found.
etc/amf_openxg.conf
View file @
ad101763
...
...
@@ -37,17 +37,17 @@ AMF =
GUAMI
:
{
MCC
=
"
11
0"
;
MNC
=
"11"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
# YOUR GUAMI CONFIG HERE
MCC
=
"
46
0"
;
MNC
=
"11"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
# YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST
= (
{
MCC
=
"
11
0"
;
MNC
=
"11"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"0"
}
#48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{
MCC
=
"
46
0"
;
MNC
=
"11"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"0"
}
#48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
#{MCC = "110"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
);
PLMN_SUPPORT_LIST
= (
{
MCC
=
"
11
0"
;
MNC
=
"11"
;
TAC
=
100
;
# YOUR PLMN CONFIG HERE
MCC
=
"
46
0"
;
MNC
=
"11"
;
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
...
...
@@ -87,7 +87,7 @@ AMF =
MYSQL_server
=
"127.0.0.1"
;
# MySQL Server address
MYSQL_user
=
"root"
;
# Database server login
MYSQL_pass
=
"linux"
;
# Database server password
MYSQL_db
=
"OPE
XN
G_DB"
;
# Your database name
MYSQL_db
=
"OPE
NX
G_DB"
;
# Your database name
## OP
OPERATOR_key
=
"63bfa50ee6523365ff14c1f45f88737d"
;
# OP key matching your database
...
...
src/amf-app/amf_n1.cpp
View file @
ad101763
...
...
@@ -675,8 +675,9 @@ void amf_n1::service_request_handle(
if
(
pdu_session_status
==
0x00
){
serApt
->
setPDU_session_status
(
0x0000
);
}
else
{
//serApt->setPDU_session_status(pdu_session_status);
serApt
->
setPDU_session_status
(
0x2000
);
serApt
->
setPDU_session_status
(
htonl
(
pdu_session_status
));
Logger
::
amf_n1
().
debug
(
"setting pdu session status 0x%x"
,
htonl
(
pdu_session_status
));
//serApt->setPDU_session_status(0x2000);
}
serApt
->
setPDU_session_reactivation_result
(
0x0000
);
uint8_t
buffer
[
BUFFER_SIZE_256
];
...
...
@@ -2022,7 +2023,7 @@ void amf_n1::security_mode_complete_handle(
Logger
::
amf_n1
().
debug
(
"Allocated GUTI %s"
,
guti
.
c_str
());
// TODO: remove hardcoded values
regAccept
->
set_5GS_Network_Feature_Support
(
0x0
0
,
0x00
);
regAccept
->
set_5GS_Network_Feature_Support
(
0x0
1
,
0x00
);
regAccept
->
setT3512_Value
(
0x5
,
0x1e
);
uint8_t
buffer
[
BUFFER_SIZE_1024
]
=
{
0
};
int
encoded_size
=
regAccept
->
encode2buffer
(
buffer
,
BUFFER_SIZE_1024
);
...
...
src/amf-app/amf_n11.cpp
View file @
ad101763
...
...
@@ -261,6 +261,10 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) {
uint8_t
pti
=
sm_msg
[
2
];
Logger
::
amf_n11
().
debug
(
"Decoded PTI for PDUSessionEstablishmentRequest(0x%x)"
,
pti
);
psc
.
get
()
->
isn2sm_avaliable
=
false
;
handle_pdu_session_initial_request
(
supi
,
psc
,
smf_addr
,
smf
.
sm_msg
,
dnn
);
/*
if (psc.get()->isn1sm_avaliable && psc.get()->isn2sm_avaliable) {
itti_n1n2_message_transfer_request* itti_msg =
new itti_n1n2_message_transfer_request(TASK_AMF_N11, TASK_AMF_APP);
...
...
@@ -289,6 +293,7 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) {
handle_pdu_session_initial_request(
supi, psc, smf_addr, smf.sm_msg, dnn);
}
*/
}
break
;
case
EXISTING_PDU_SESSION
:
{
// TODO:
...
...
src/amf-app/amf_n2.cpp
View file @
ad101763
...
...
@@ -636,7 +636,7 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
}
}
uint8_t
buffer
[
1
0000
];
uint8_t
buffer
[
2
0000
];
int
encoded_size
=
msg
->
encode2buffer
(
buffer
,
10000
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
sctp_s_38412
.
sctp_send_msg
(
...
...
@@ -675,7 +675,7 @@ void amf_n2::handle_itti_message(
item
.
pduSessionNAS_PDU
=
nas_pdu
;
item
.
sizeofpduSessionNAS_PDU
=
blength
(
itti_msg
.
nas
);
item
.
s_nssai
.
sst
=
"01"
;
// TODO: get from N1N2msgTranferMsg
item
.
s_nssai
.
sd
=
"
N
one"
;
// TODO: get from N1N2msgTranferMsg
item
.
s_nssai
.
sd
=
"
n
one"
;
// TODO: get from N1N2msgTranferMsg
// Get NSSAI from PDU Session Context
std
::
shared_ptr
<
nas_context
>
nc
;
...
...
src/nas/ies/UESecurityCapability.cpp
View file @
ad101763
...
...
@@ -112,7 +112,9 @@ int UESecurityCapability::decodefrombuffer(
_5g_EASel
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
_5g_IASel
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
decoded_size
++
;
if
(
length
==
4
)
decoded_size
+=
2
;
//to do: decoding EEA EIA
Logger
::
nas_mm
().
debug
(
"UESecurityCapability EA 0x%d,IA 0x%d"
,
_5g_EASel
,
_5g_IASel
);
return
decoded_size
;
...
...
src/ngap/ngapIEs/S-NSSAI.cpp
View file @
ad101763
...
...
@@ -89,7 +89,10 @@ void S_NSSAI::getSst(std::string& charSst) {
//------------------------------------------------------------------------------
void
S_NSSAI
::
setSd
(
const
std
::
string
charSd
)
{
sdIsSet
=
true
;
if
(
charSd
.
compare
(
"none"
))
sdIsSet
=
true
;
else
sdIsSet
=
false
;
sd
=
fromString
<
int
>
(
charSd
);
}
...
...
src/ngap/ngap_app/ngap_app.cpp
View file @
ad101763
...
...
@@ -71,6 +71,9 @@ void ngap_app::handle_receive(
"Decoded NGAP message, procedure code %d, present %d"
,
ngap_msg_pdu
->
choice
.
initiatingMessage
->
procedureCode
,
ngap_msg_pdu
->
present
);
printf
(
"after decoding ...
\n
"
);
asn_fprint
(
stderr
,
&
asn_DEF_Ngap_NGAP_PDU
,
ngap_msg_pdu
);
printf
(
"end decoding ...
\n
"
);
(
*
messages_callback
[
ngap_msg_pdu
->
choice
.
initiatingMessage
->
procedureCode
]
[
ngap_msg_pdu
->
present
-
1
])(
assoc_id
,
stream
,
ngap_msg_pdu
);
...
...
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
View file @
ad101763
...
...
@@ -86,7 +86,7 @@ void N1N2MessageCollectionDocumentApiImpl::n1_n2_message_transfer(
bstring
n1sm
;
msg_str_2_msg_hex
(
n1sm_str
.
substr
(
0
,
n1sm_str
.
length
()
-
2
),
n1sm_str
.
substr
(
0
,
n1sm_str
.
length
()),
n1sm
);
// TODO: verify n1sm_length
bstring
n2sm
;
...
...
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