- Extended fix to support multiple UEs instead of single UE - Actions now trigger upon AMF reconnection Per 3GPP TS 123 502 V16.7.0 (2021-01) Section 4.2.6 (AN Release): When NG-AP signalling connection is lost due to (R)AN or AMF failure, AN release is performed locally by AMF or (R)AN without relying on signalling between (R)AN and AMF. This deactivates all UP connections.
84 lines
2.8 KiB
C
84 lines
2.8 KiB
C
/*
|
|
* 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 ngap_gNB_ue_context.h
|
|
* \brief ngap UE context management within gNB
|
|
* \author Yoshio INOUE, Masayuki HARADA
|
|
* \date 2020
|
|
* \version 0.1
|
|
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
#include "ngap_gNB_defs.h"
|
|
#include "tree.h"
|
|
|
|
#ifndef NGAP_GNB_UE_CONTEXT_H_
|
|
#define NGAP_GNB_UE_CONTEXT_H_
|
|
|
|
// Forward declarations
|
|
struct ngap_gNB_amf_data_s;
|
|
struct gNB_amf_desc_s;
|
|
|
|
typedef enum {
|
|
/* UE has not been registered to a AMF or UE association has failed. */
|
|
NGAP_UE_DECONNECTED = 0x0,
|
|
/* UE ngap state is waiting for initial context setup request message. */
|
|
NGAP_UE_WAITING_CSR = 0x1,
|
|
/* UE association is ready and bearers are established. */
|
|
NGAP_UE_CONNECTED = 0x2,
|
|
NGAP_UE_STATE_MAX,
|
|
} ngap_ue_state;
|
|
|
|
typedef struct ngap_gNB_ue_context_s {
|
|
/* Tree related data */
|
|
RB_ENTRY(ngap_gNB_ue_context_s) entries;
|
|
|
|
/* Uniquely identifies the UE between AMF and gNB within the gNB.
|
|
* This id is encoded on 32bits.
|
|
*/
|
|
uint32_t gNB_ue_ngap_id;
|
|
|
|
uint64_t amf_ue_ngap_id;
|
|
|
|
/* Stream used for this particular UE */
|
|
int32_t tx_stream;
|
|
int32_t rx_stream;
|
|
|
|
/* Current UE state. */
|
|
ngap_ue_state ue_state;
|
|
|
|
/* Reference to AMF data this UE is attached to */
|
|
struct ngap_gNB_amf_data_s *amf_ref;
|
|
|
|
/* Reference to gNB data this UE is attached to */
|
|
ngap_gNB_instance_t *gNB_instance;
|
|
} ngap_gNB_ue_context_t;
|
|
|
|
void ngap_store_ue_context(const ngap_gNB_ue_context_t *ue_desc_p);
|
|
void ngap_release_ues_for_amf(ngap_gNB_amf_data_t *amf_desc_p);
|
|
|
|
ngap_gNB_ue_context_t *ngap_get_ue_context(uint32_t gNB_ue_ngap_id);
|
|
ngap_gNB_ue_context_t *ngap_get_ue_context_from_amf_ue_ngap_id(uint32_t amf_ue_ngap_id);
|
|
ngap_gNB_ue_context_t *ngap_detach_ue_context(uint32_t gNB_ue_ngap_id);
|
|
|
|
#endif /* NGAP_GNB_UE_CONTEXT_H_ */
|