open5gs/lib/app/ogs-config.h

100 lines
2.1 KiB
C
Raw Normal View History

/*
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
*
* This file is part of Open5GS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2019-09-13 12:07:47 +00:00
#if !defined(OGS_APP_INSIDE) && !defined(OGS_APP_COMPILATION)
#error "This header cannot be included directly."
#endif
2019-04-27 14:54:30 +00:00
2019-09-13 12:07:47 +00:00
#ifndef OGS_APP_CONFIG_H
#define OGS_APP_CONFIG_H
#include "ogs-app.h"
2019-04-27 14:54:30 +00:00
#ifdef __cplusplus
extern "C" {
2019-09-13 12:07:47 +00:00
#endif
2019-04-27 14:54:30 +00:00
2019-09-13 12:07:47 +00:00
typedef struct ogs_config_s {
const char *file;
2019-04-27 14:54:30 +00:00
void *document;
const char *db_uri;
struct {
const char *file;
const char *level;
const char *domain;
} logger;
struct {
/* Element */
int no_hss;
int no_sgw;
int no_pgw;
int no_pcrf;
/* Network */
int no_ipv4;
int no_ipv6;
int prefer_ipv4;
int multicast;
int no_slaac;
} parameter;
2019-05-31 07:33:09 +00:00
ogs_sockopt_t sockopt;
2019-06-01 12:30:13 +00:00
struct {
int udp_port;
} usrsctp;
2019-05-31 07:33:09 +00:00
struct {
int sgw;
int pgw;
int vlr;
int csmap;
int enb;
int ue;
2020-04-26 19:36:05 +00:00
int smf;
int upf;
} max;
2019-04-27 14:54:30 +00:00
struct {
ogs_pkbuf_config_t defconfig;
int packet;
2019-04-27 14:54:30 +00:00
int ue;
2020-04-26 19:36:05 +00:00
int pfcp;
int sess;
int bearer;
int tunnel;
int pf;
} pool;
2019-09-13 12:07:47 +00:00
} ogs_config_t;
2019-09-13 12:07:47 +00:00
int ogs_config_init(void);
int ogs_config_final(void);
ogs_config_t *ogs_config(void);
2019-04-27 14:54:30 +00:00
2019-09-13 12:07:47 +00:00
int ogs_config_read(void);
int ogs_config_parse(void);
2019-04-27 14:54:30 +00:00
#ifdef __cplusplus
}
2019-09-13 12:07:47 +00:00
#endif
2019-04-27 14:54:30 +00:00
2019-09-13 12:07:47 +00:00
#endif /* OGS_APP_CONFIG_H */