blob: aaed84d5f0c1173d5d27bbe51224d163561255a4 [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301/*
2 * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
3 * Copyright (c) 2017 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef __S1AP_CONFIG_H_
19#define __S1AP_CONFIG_H_
20
21#include <stdbool.h>
22#include "s1ap_structs.h"
23
24#define HSS_HOST_NAME_LEN 256
25#define HSS_REALM_LEN 256
26#define SS_IPC_ENDPT_FILE_LEN 256
27
28/**
29 * @brief: Whether HSS to be contacted is freediameter based real HSS or the
30 * dummy designed for performance testing
31 */
32enum e_HSS_HOST_TYPE {
33 HSS_PERF,
34 HSS_FD,
35};
36
37/**
38 * @brief What type of RPC mechanism to use for communication with dummy HSS
39 */
40enum e_HSS_RPC {
41 HSS_IPC,
42 HSS_RPC,
43};
44
45/**
46 * @brief HSS configuration read from hss json file
47 */
48typedef struct s6a_config {
49 /**Defines whether freediameter based hss to be used or inbuilt hss to be
50 * used.
51 */
52 enum e_HSS_HOST_TYPE hss_type;
53
54 /*Applicable in case of in built HSS. Defines which type of communication
55 * to be used. This is for future provision to support RPC
56 */
57 enum e_HSS_RPC hss_rpc;
58 char *hss_ipc_endpt;
59 char *hss_host_name;
60 char *realm;
61} s6a_config;
62
63/**
64 * @brief Initialize json parser for givn file
65 * @param path to the hss json file
66 */
67void
68init_parser(char *path);
69
70/**
71 * @brief Parser hss json file and store parameters in the structure
72 * @params none
73 * @return int as success/fail
74 */
75int
76parse_s6a_conf();
77
78#endif /*__S1AP_CONFIG_H_*/