nrf.h 2.71 KB
Newer Older
1
2
3
4
5
/*
 * 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
6
7
8
 * 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
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 *
 *      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
 */

#ifndef FILE_NRF_SEEN
#define FILE_NRF_SEEN

#define HEART_BEAT_TIMER 10

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
27
#define _unused(x) ((void) (x))
28

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
29
typedef enum nf_type_s {
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  NF_TYPE_NRF     = 0,
  NF_TYPE_AMF     = 1,
  NF_TYPE_SMF     = 2,
  NF_TYPE_AUSF    = 3,
  NF_TYPE_NEF     = 4,
  NF_TYPE_PCF     = 5,
  NF_TYPE_SMSF    = 6,
  NF_TYPE_NSSF    = 7,
  NF_TYPE_UDR     = 8,
  NF_TYPE_LMF     = 9,
  NF_TYPE_GMLC    = 10,
  NF_TYPE_5G_EIR  = 11,
  NF_TYPE_SEPP    = 12,
  NF_TYPE_UPF     = 13,
  NF_TYPE_N3IWF   = 14,
  NF_TYPE_AF      = 15,
  NF_TYPE_UDSF    = 16,
  NF_TYPE_BSF     = 17,
  NF_TYPE_CHF     = 18,
  NF_TYPE_NWDAF   = 19,
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
50
51
52
  NF_TYPE_UNKNOWN = 20
} nf_type_t;

53
54
55
56
static const std::vector<std::string> nf_type_e2str = {
    "NRF",   "AMF", "SMF",  "AUSF", "NEF",    "PCF",   "SMSF",
    "NSSF",  "UDR", "LMF",  "GMLC", "5G_EIR", "SEPP",  "UPF",
    "N3IWF", "AF",  "UDSF", "BSF",  "CHF",    "NWDAF", "UNKNOWN"};
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
57

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
58
typedef enum patch_op_type_s {
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
59
60
  PATCH_OP_ADD     = 0,
  PATCH_OP_REMOVE  = 1,
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
61
  PATCH_OP_REPLACE = 2,
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
62
63
64
  PATCH_OP_MOVE    = 3,
  PATCH_OP_COPY    = 4,
  PATCH_OP_TEST    = 5,
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
65
66
67
68
  PATCH_OP_UNKNOWN = 6

} patch_op_type_t;

69
70
static const std::vector<std::string> patch_op_type_e2str = {
    "ADD", "REMOVE", "REPLACE", "MOVE", "COPY", "TEST", "UNKNOWN"};
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
71

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
72
73
// Event Subscription IDs)
typedef uint32_t evsub_id_t;
74
75
#define EVSUB_ID_FMT "0x%" PRIx32
#define EVSUB_ID_SCAN_FMT SCNx32
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
76
77
#define INVALID_EVSUB_ID ((evsub_id_t) 0x00000000)
#define UNASSIGNED_EVSUB_ID ((evsub_id_t) 0x00000000)
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
78

79
#define NNRF_NFM_BASE "/nnrf-nfm/"
Rohan's avatar
Rohan committed
80
#define NNRF_DISC_BASE "/nnrf-disc/"
81
#define NNRF_NFM_NF_INSTANCE "/nf-instances/"
Rohan's avatar
Rohan committed
82
#define NNRF_NFM_STATUS_SUBSCRIBE_URL "/subscriptions"
83

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
84
85
#define NF_CURL_TIMEOUT_MS 1000L

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
86
#define MAX_WAIT_MSECS 20000  // 1 second
87

88
#endif