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
eaac1b10
Commit
eaac1b10
authored
Jan 24, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add skeleton for Nudm_SDM_Get and Nnssf_NSSelection_Get (AMF re-allocation procedure)
parent
fad58ec3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
226 additions
and
4 deletions
+226
-4
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+70
-2
src/amf-app/amf_n1.hpp
src/amf-app/amf_n1.hpp
+15
-0
src/common/3gpp_23.003.h
src/common/3gpp_23.003.h
+4
-2
src/common/3gpp_29.503.h
src/common/3gpp_29.503.h
+42
-0
src/common/3gpp_29.531.h
src/common/3gpp_29.531.h
+95
-0
No files found.
src/amf-app/amf_n1.cpp
View file @
eaac1b10
...
...
@@ -1416,12 +1416,12 @@ void amf_n1::run_registration_procedure(std::shared_ptr<nas_context>& nc) {
ngksi
=
(
nc
.
get
()
->
amf_ue_ngap_id
+
1
);
// % (NGKSI_MAX_VALUE + 1);
}
nc
.
get
()
->
ngKsi
=
ngksi
;
handle_auth_vector_successful_result
(
nc
);
}
else
{
Logger
::
amf_n1
().
error
(
"Request authentication vectors failure"
);
response_registration_reject_msg
(
_5GMM_CAUSE_ILLEGAL_UE
,
nc
.
get
()
->
ran_ue_ngap_id
,
nc
.
get
()
->
amf_ue_ngap_id
);
// cause?
return
;
}
}
else
{
Logger
::
amf_n1
().
debug
(
...
...
@@ -1435,8 +1435,15 @@ void amf_n1::run_registration_procedure(std::shared_ptr<nas_context>& nc) {
// TODO: How to handle?
}
nc
.
get
()
->
ngKsi
=
ngksi
;
handle_auth_vector_successful_result
(
nc
);
}
// TODO: If AMF can't handle this UE, reroute the Registration Request to a
// new AMF Get UE's slice selection subscription from UDM if not available
if
(
reroute_registration_request
(
nc
))
{
return
;
}
handle_auth_vector_successful_result
(
nc
);
}
else
if
(
nc
.
get
()
->
is_5g_guti_present
)
{
Logger
::
amf_n1
().
debug
(
"Start to run UE Identification Request procedure"
);
nc
.
get
()
->
is_auth_vectors_present
=
false
;
...
...
@@ -3693,3 +3700,64 @@ bool amf_n1::get_mobile_reachable_timer_timeout(
std
::
shared_lock
lock
(
m_nas_context
);
return
nc
.
get
()
->
is_mobile_reachable_timer_timeout
;
}
//------------------------------------------------------------------------------
bool
amf_n1
::
reroute_registration_request
(
std
::
shared_ptr
<
nas_context
>&
nc
)
{
Logger
::
amf_n1
().
debug
(
"Registration with AMF re-allocation, Reroute Registration Request to "
"the target AMF"
);
nssai_t
nssai
=
{};
if
(
!
get_slice_selection_subscription_data
(
nc
,
nssai
))
{
// Get NSSAI from
// UDM
return
false
;
}
if
(
check_requested_nssai
(
nc
,
nssai
))
{
// Check that AMF can process the Requested NSSAIs or not
return
false
;
}
// Process NS selection to select the appropriate AMF
std
::
string
nf_instance_id
=
{};
slice_info_fo_registration_t
slice_info
=
{};
authorized_network_slice_info_t
authorized_network_slice_info
=
{};
if
(
!
get_network_slice_selection
(
nf_instance_id
,
slice_info
,
authorized_network_slice_info
))
{
return
false
;
}
std
::
string
target_amf
=
{};
// Send N1MessageNotify to the Target AMF
send_n1_message_notity
(
nc
,
target_amf
);
return
true
;
}
//------------------------------------------------------------------------------
bool
amf_n1
::
check_requested_nssai
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
const
nssai_t
&
nssai
)
const
{
// TODO
return
true
;
}
//------------------------------------------------------------------------------
bool
amf_n1
::
get_slice_selection_subscription_data
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
nssai_t
&
nssai
)
const
{
// TODO: UDM selection (from NRF or configuration file)
if
(
amf_cfg
.
support_features
.
enable_external_udm
)
{
}
return
true
;
}
//------------------------------------------------------------------------------
bool
amf_n1
::
get_network_slice_selection
(
const
std
::
string
&
nf_instance_id
,
slice_info_fo_registration_t
&
slice_info
,
authorized_network_slice_info_t
&
authorized_network_slice_info
)
const
{
// TODO: UDM selection (from NRF or configuration file)
if
(
amf_cfg
.
support_features
.
enable_external_udm
)
{
}
return
true
;
}
void
amf_n1
::
send_n1_message_notity
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
const
std
::
string
&
target_amf
)
const
{}
src/amf-app/amf_n1.hpp
View file @
eaac1b10
...
...
@@ -37,6 +37,8 @@
#include <shared_mutex>
#include "3gpp_ts24501.hpp"
#include "3gpp_29.503.h"
#include "3gpp_29.531.h"
#include "amf.hpp"
#include "amf_statistics.hpp"
#include "bstrlib.h"
...
...
@@ -217,6 +219,19 @@ class amf_n1 {
void
implicit_deregistration_timer_timeout
(
timer_id_t
timer_id
,
uint64_t
amf_ue_ngap_id
);
bool
reroute_registration_request
(
std
::
shared_ptr
<
nas_context
>&
nc
);
bool
get_slice_selection_subscription_data
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
nssai_t
&
nssai
)
const
;
bool
check_requested_nssai
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
const
nssai_t
&
nssai
)
const
;
bool
get_network_slice_selection
(
const
std
::
string
&
nf_instance_id
,
slice_info_fo_registration_t
&
slice_info
,
authorized_network_slice_info_t
&
authorized_network_slice_info
)
const
;
void
send_n1_message_notity
(
const
std
::
shared_ptr
<
nas_context
>&
nc
,
const
std
::
string
&
target_amf
)
const
;
private:
void
ue_initiate_de_registration_handle
(
uint32_t
ran_ue_ngap_id
,
long
amf_ue_ngap_id
,
bstring
nas
);
...
...
src/common/3gpp_23.003.h
View file @
eaac1b10
...
...
@@ -122,17 +122,19 @@ typedef struct amf_set_id_s /*5G ADD it*/
uint16_t
amf_set_id
:
10
;
}
amf_set_id_t
;
typedef
struct
allowed_nssai
/*5G ADD it*/
/*
typedef struct allowed_nssai
{
uint8_t sST;
uint32_t sD : 24;
} allowed_nssai;
typedef
struct
allowed_nssai_s
/*5G ADD it*/
typedef struct allowed_nssai_s
{
allowed_nssai* s_nssai;
uint32_t count;
} allowed_nssai_t;
*/
typedef
struct
guami_5g_s
{
plmn_t
plmn
;
...
...
src/common/3gpp_29.503.h
0 → 100644
View file @
eaac1b10
/*
* 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
*/
/*! \file 3gpp_29.503.h
\brief
\author Tien Thinh NGUYEN
\company Eurecom
\email: tien-thinh.nguyen@eurecom.fr
*/
#ifndef FILE_3GPP_29_503_SEEN
#define FILE_3GPP_29_503_SEEN
#include <stdint.h>
#include <string>
#include <vector>
#include "3gpp_23.003.h"
typedef
struct
nssai_s
{
std
::
vector
<
snssai_t
>
default_single_nssais
;
std
::
vector
<
snssai_t
>
single_nssais
;
}
nssai_t
;
#endif
src/common/3gpp_29.531.h
0 → 100644
View file @
eaac1b10
/*
* 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
*/
/*! \file 3gpp_29.531.h
\brief
\author Tien Thinh NGUYEN
\company Eurecom
\email: tien-thinh.nguyen@eurecom.fr
*/
#ifndef FILE_3GPP_29_531_SEEN
#define FILE_3GPP_29_531_SEEN
#include <stdint.h>
#include <string>
#include <vector>
#include "3gpp_23.003.h"
typedef
struct
subscribed_snssai_s
{
snssai_t
subscribed_snssai
;
}
subscribed_snssai_t
;
typedef
struct
nsi_information_s
{
std
::
string
nrf_id
;
// TODO: nsiId
// TODO: nrfNfMgtUri
// TODO: nrfAccessTokenUri
}
nsi_information_t
;
typedef
struct
allowed_snssai_s
{
snssai_t
allowed_snssai
;
std
::
vector
<
nsi_information_t
>
nsi_information_list
;
snssai_t
mapped_home_snssai
;
}
allowed_snssai_t
;
typedef
struct
allowed_nssai_s
{
std
::
vector
<
allowed_snssai_t
>
allowed_snssai_list
;
std
::
string
access_type
;
}
allowed_nssai_t
;
typedef
struct
mapping_of_snssai_s
{
snssai_t
serving_snssai
;
snssai_t
home_snssai
;
}
mapping_of_snssai_t
;
typedef
struct
slice_info_fo_registration_s
{
std
::
vector
<
subscribed_snssai_t
>
subscribed_nssai
;
std
::
vector
<
allowed_nssai_t
>
allowed_nssai_current_access
;
// allowed_nssai_other_access
std
::
vector
<
snssai_t
>
sNssai_for_mapping
;
std
::
vector
<
snssai_t
>
requested_nssai
;
bool
default_configured_snssai_ind
;
std
::
vector
<
mapping_of_snssai_t
>
mapping_of_nssai
;
bool
request_mapping
;
}
slice_info_fo_registration_t
;
typedef
struct
configured_snssai_s
{
snssai_t
configured_snssai
;
snssai_t
mapped_home_snssai
;
}
configured_snssai_t
;
typedef
struct
authorized_network_slice_info_s
{
std
::
vector
<
allowed_nssai_t
>
allowed_nssai_list
;
std
::
vector
<
configured_snssai_t
>
configured_nssai
;
std
::
string
target_amf_set
;
std
::
vector
<
std
::
string
>
candidate_amf_list
;
std
::
vector
<
snssai_t
>
rejected_nssai_in_plmn
;
std
::
vector
<
snssai_t
>
rejected_nssai_in_ta
;
nsi_information_t
nsi_information
;
// SupportedFeatures
std
::
string
nrf_amf_set
;
std
::
string
nrf_amf_set_nf_mgt_uri
;
std
::
string
nrf_amf_set_access_token_uri
;
}
authorized_network_slice_info_t
;
#endif
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