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
a4562ebf
Commit
a4562ebf
authored
Mar 17, 2021
by
Niuhaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support baicells gNB
parent
15250bad
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
327 additions
and
3 deletions
+327
-3
etc/cpe_openxg.conf
etc/cpe_openxg.conf
+111
-0
etc/openxg.sql
etc/openxg.sql
+206
-0
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+10
-3
No files found.
etc/cpe_openxg.conf
0 → 100755
View file @
a4562ebf
################################################################################
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The OpenAirInterface Software Alliance licenses this file to You under
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
# except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.openairinterface.org/?page_id=698
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
AMF
=
{
INSTANCE_ID
=
10
;
# 0 is the default
PID_DIRECTORY
=
"/var/run"
;
# /var/run is the default
AMF_NAME
=
"OAI-AMF"
;
RELATIVE_CAPACITY
=
30
;
# Display statistics about whole system (in seconds)
STATISTICS_TIMER_INTERVAL
=
20
;
# YOUR CONFIG HERE
CORE_CONFIGURATION
:
{
EMERGENCY_SUPPORT
=
"false"
;
};
GUAMI
:
{
MCC
=
"110"
;
MNC
=
"11"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
# YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST
= (
{
MCC
=
"110"
;
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
=
"110"
;
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
)
}
);
INTERFACES
:
{
# AMF binded interface for N1/N2 interface (NGAP)
NGAP_AMF
:
{
INTERFACE_NAME
=
"ens3"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
PORT
=
38412
;
# YOUR NETWORK CONFIG HERE
PPID
=
60
;
# YOUR NETWORK CONFIG HERE
};
# AMF binded interface for N11
N11
:
{
INTERFACE_NAME
=
"ens9"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
PORT
=
8282
;
# YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL
= (
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"192.168.122.151"
;
PORT
=
"8889"
;
VERSION
=
"v2"
;
SELECTED
=
"true"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
2
;
IPV4_ADDRESS
=
"192.168.122.2"
;
PORT
=
"80"
;
VERSION
=
"v1"
;
SELECTED
=
"false"
}
# YOUR SMF CONFIG HERE
);
};
};
AUTHENTICATION
:
{
## MySQL mandatory options
MYSQL_server
=
"127.0.0.1"
;
# MySQL Server address
MYSQL_user
=
"openxg"
;
# Database server login
MYSQL_pass
=
"linux"
;
# Database server password
MYSQL_db
=
"OPENXG_DB"
;
# Your database name
## OP
OPERATOR_key
=
"63bfa50ee6523365ff14c1f45f88737d"
;
# OP key matching your database
RANDOM
=
"true"
;
};
NAS
:
{
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST
= [
"NIA1"
,
"NIA1"
,
"NIA1"
];
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST
= [
"NEA0"
,
"NEA1"
,
"NEA2"
];
};
};
MODULES
=
{
NGAP_MESSAGE
= (
{
MSG_NAME
=
"NGSetupRequest"
;
ProcedureCode
=
21
;
TypeOfMessage
=
"initialMessage"
}
);
};
etc/openxg.sql
0 → 100644
View file @
a4562ebf
This diff is collapsed.
Click to expand it.
src/amf-app/amf_n2.cpp
View file @
a4562ebf
...
...
@@ -305,7 +305,7 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
NGSetupResponseMsg
ngSetupResp
;
ngSetupResp
.
setMessageType
();
ngSetupResp
.
setAMFName
(
amf_cfg
.
AMF_Name
);
ngSetupResp
.
setRelativeAmfCapacity
(
amf_cfg
.
relativeAMFCapacity
);
//
ngSetupResp.setRelativeAmfCapacity(amf_cfg.relativeAMFCapacity);
std
::
vector
<
struct
GuamiItem_s
>
guami_list
;
for
(
int
i
=
0
;
i
<
amf_cfg
.
guami_list
.
size
();
i
++
)
{
struct
GuamiItem_s
tmp
;
...
...
@@ -318,6 +318,7 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
guami_list
.
push_back
(
tmp
);
}
ngSetupResp
.
setGUAMIList
(
guami_list
);
ngSetupResp
.
setRelativeAmfCapacity
(
amf_cfg
.
relativeAMFCapacity
);
std
::
vector
<
PlmnSliceSupport_t
>
plmn_list
;
for
(
int
i
=
0
;
i
<
amf_cfg
.
plmn_list
.
size
();
i
++
)
{
PlmnSliceSupport_t
tmp
;
...
...
@@ -588,18 +589,24 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
guami
.
AmfSetID
=
amf_cfg
.
guami
.
AmfSetID
;
guami
.
AmfPointer
=
amf_cfg
.
guami
.
AmfPointer
;
msg
->
setGuami
(
guami
);
std
::
vector
<
S_Nssai
>
list
;
S_Nssai
item
;
item
.
sst
=
"01"
;
item
.
sd
=
"None"
;
list
.
push_back
(
item
);
msg
->
setAllowedNssai
(
list
);
msg
->
setUESecurityCapability
(
0xe000
,
0xe000
,
0xe000
,
0xe000
);
// TODO: remove hardcoded value
msg
->
setSecurityKey
((
uint8_t
*
)
bdata
(
itti_msg
.
kgnb
));
msg
->
setNasPdu
((
uint8_t
*
)
bdata
(
itti_msg
.
nas
),
blength
(
itti_msg
.
nas
));
std
::
vector
<
S_Nssai
>
list
;
/*
std::vector<S_Nssai> list;
S_Nssai item;
item.sst = "01";
item.sd = "None";
list.push_back(item);
msg
->
setAllowedNssai
(
list
);
msg->setAllowedNssai(list);
*/
bdestroy
(
itti_msg
.
nas
);
bdestroy
(
itti_msg
.
kgnb
);
if
(
itti_msg
.
is_sr
)
{
...
...
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