rrc_gNB_NGAP.h 2.67 KB
Newer Older
Xue Song's avatar
Xue Song committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * 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
 */

22 23 24 25 26 27 28 29 30
/*! \file rrc_gNB_NGAP.h
 * \brief rrc NGAP procedures for 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) 
 */

Xue Song's avatar
Xue Song committed
31 32 33 34 35 36 37 38 39
#ifndef RRC_GNB_NGAP_H_
#define RRC_GNB_NGAP_H_

#include "rrc_gNB_UE_context.h"
#include "nr_rrc_defs.h"
#include "nr_rrc_extern.h"

#include "NR_RRCSetupComplete-IEs.h"
#include "NR_RegisteredAMF.h"
40
#include "NR_UL-DCCH-Message.h"
Xue Song's avatar
Xue Song committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

typedef struct rrc_ue_ngap_ids_s {
  /* Tree related data */
  RB_ENTRY(rrc_ue_ngap_ids_s) entries;

  // keys
  uint16_t ue_initial_id;
  uint32_t gNB_ue_ngap_id;

  // value
  rnti_t   ue_rnti;
} rrc_ue_ngap_ids_t;

void
rrc_gNB_send_NGAP_NAS_FIRST_REQ(
    const protocol_ctxt_t     *const ctxt_pP,
    rrc_gNB_ue_context_t      *ue_context_pP,
    NR_RRCSetupComplete_IEs_t *rrcSetupComplete
);

61 62 63 64 65 66 67
int
rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(
    MessageDef *msg_p,
    const char *msg_name,
    instance_t instance
);

68 69 70 71 72 73 74 75 76 77
void
rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(
    const protocol_ctxt_t *const ctxt_pP,
    rrc_gNB_ue_context_t          *const ue_context_pP
);

int
rrc_gNB_process_security(
  const protocol_ctxt_t *const ctxt_pP,
  rrc_gNB_ue_context_t *const ue_context_pP,
78
  ngap_security_capabilities_t *security_capabilities_pP
79 80
);

Xue Song's avatar
Xue Song committed
81 82 83 84 85 86 87 88
int
rrc_gNB_process_NGAP_DOWNLINK_NAS(
  MessageDef *msg_p,
  const char *msg_name,
  instance_t  instance,
  mui_t      *rrc_gNB_mui
);

89 90 91 92 93 94 95
void
rrc_gNB_send_NGAP_UPLINK_NAS(
  const protocol_ctxt_t    *const ctxt_pP,
  rrc_gNB_ue_context_t     *const ue_context_pP,
  NR_UL_DCCH_Message_t     *const ul_dcch_msg
);

Xue Song's avatar
Xue Song committed
96
#endif