forked from acouzens/open5gs
freeDiameter Config Re-factoring!
For P-CSCF simulation, it is not good if freeDiameter configuartion is needed. As such, we merged this configuration is in the nextepc configuration.
This commit is contained in:
parent
65e1a8dbac
commit
add2145851
|
@ -4,7 +4,7 @@ pkglib_LTLIBRARIES = libfd.la
|
|||
|
||||
libfd_la_SOURCES = \
|
||||
fd_message.h fd_logger.h fd_lib.h \
|
||||
libapp_sip.c fd_message.c fd_logger.c fd_init.c \
|
||||
libapp_sip.c fd_message.c fd_logger.c fd_config.c fd_init.c \
|
||||
\
|
||||
s6a/s6a_dict.h s6a/s6a_message.h \
|
||||
s6a/dict_init.c \
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
static void fd_gnutls_log_func(int level, const char *str);
|
||||
static void fd_log_func(int printlevel, const char *format, va_list ap);
|
||||
|
||||
int fd_init(int mode, const char *conffile)
|
||||
int fd_init(int mode, const char *conffile, fd_config_t *fd_config)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -33,7 +33,14 @@ int fd_init(int mode, const char *conffile)
|
|||
}
|
||||
|
||||
/* Parse the configuration file */
|
||||
CHECK_FCT_DO( fd_core_parseconf(conffile), goto error );
|
||||
if (conffile)
|
||||
{
|
||||
CHECK_FCT_DO( fd_core_parseconf(conffile), goto error );
|
||||
}
|
||||
else
|
||||
{
|
||||
CHECK_FCT_DO( fd_config_init(fd_config), goto error );
|
||||
}
|
||||
|
||||
/* Initialize FD Message */
|
||||
CHECK_FCT( fd_message_init() );
|
||||
|
|
|
@ -13,9 +13,49 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
CORE_DECLARE(int) fd_init(int mode, const char *conffile);
|
||||
/* This is default diameter configuration if there is no config file
|
||||
* The Configuration : No TLS, Only TCP */
|
||||
typedef struct _fd_config_t {
|
||||
/* Diameter Identity of the local peer (FQDN -- ASCII) */
|
||||
const char *cnf_diamid;
|
||||
/* Diameter realm of the local peer, default to realm part of cnf_diamid */
|
||||
const char *cnf_diamrlm;
|
||||
/* IP address of the local peer */
|
||||
const char *cnf_addr;
|
||||
|
||||
/* the local port for legacy Diameter (default: 3868) in host byte order */
|
||||
c_uint16_t cnf_port;
|
||||
/* the local port for Diameter/TLS (default: 5658) in host byte order */
|
||||
c_uint16_t cnf_port_tls;
|
||||
|
||||
struct {
|
||||
unsigned no_sctp: 1; /* disable the use of SCTP */
|
||||
} cnf_flags;
|
||||
|
||||
#define MAX_NUM_OF_FD_EXTENSION 32
|
||||
struct {
|
||||
const char *module;
|
||||
const char *conf;
|
||||
} ext[MAX_NUM_OF_FD_EXTENSION];
|
||||
int num_of_ext;
|
||||
|
||||
#define MAX_NUM_OF_FD_CONN 16
|
||||
/* (supposedly) UTF-8, \0 terminated.
|
||||
* The Diameter Identity of the remote peer. */
|
||||
struct {
|
||||
const char *identity;
|
||||
const char *addr; /* IP address of the remote peer */
|
||||
c_uint16_t port; /* port to connect to. 0: default. */
|
||||
} conn[MAX_NUM_OF_FD_CONN];
|
||||
int num_of_conn;
|
||||
} fd_config_t;
|
||||
|
||||
CORE_DECLARE(int) fd_init(
|
||||
int mode, const char *conffile, fd_config_t *fd_config);
|
||||
CORE_DECLARE(void) fd_final(void);
|
||||
|
||||
CORE_DECLARE(int) fd_config_init(fd_config_t *fd_config);
|
||||
|
||||
int fd_avp_search_avp ( struct avp * groupedavp,
|
||||
struct dict_object * what, struct avp ** avp );
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include "hss_context.h"
|
||||
|
||||
static hss_context_t self;
|
||||
static fd_config_t g_fd_conf;
|
||||
|
||||
static int context_initialized = 0;
|
||||
|
||||
hss_context_t* hss_self()
|
||||
|
@ -26,8 +28,12 @@ status_t hss_context_init(void)
|
|||
d_assert(context_initialized == 0, return CORE_ERROR,
|
||||
"HSS context already has been context_initialized");
|
||||
|
||||
/* Initial FreeDiameter Config */
|
||||
memset(&g_fd_conf, 0, sizeof(fd_config_t));
|
||||
|
||||
/* Initialize HSS context */
|
||||
memset(&self, 0, sizeof(hss_context_t));
|
||||
self.fd_config = &g_fd_conf;
|
||||
|
||||
if (mutex_create(&self.db_lock, MUTEX_DEFAULT) != CORE_OK)
|
||||
{
|
||||
|
|
|
@ -25,11 +25,13 @@ typedef struct _hss_db_auth_info_t {
|
|||
c_uint64_t sqn;
|
||||
} hss_db_auth_info_t;
|
||||
|
||||
typedef struct _fd_config_t fd_config_t;
|
||||
typedef struct _hss_context_t {
|
||||
const char *fd_conf_path; /* HSS freeDiameter conf path */
|
||||
const char *fd_conf_path; /* HSS freeDiameter conf path */
|
||||
fd_config_t *fd_config; /* HSS freeDiameter config */
|
||||
|
||||
void *subscriberCollection;
|
||||
mutex_id db_lock;
|
||||
void *subscriberCollection;
|
||||
mutex_id db_lock;
|
||||
} hss_context_t;
|
||||
|
||||
CORE_DECLARE(status_t) hss_context_init(void);
|
||||
|
|
|
@ -554,7 +554,8 @@ int hss_fd_init(void)
|
|||
{
|
||||
struct disp_when data;
|
||||
|
||||
CHECK_FCT( fd_init(FD_MODE_SERVER, hss_self()->fd_conf_path) );
|
||||
CHECK_FCT( fd_init(FD_MODE_SERVER,
|
||||
hss_self()->fd_conf_path, hss_self()->fd_config) );
|
||||
|
||||
/* Install objects definitions for this application */
|
||||
CHECK_FCT( s6a_dict_init() );
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#define MAX_CELL_PER_ENB 8
|
||||
|
||||
static mme_context_t self;
|
||||
static fd_config_t g_fd_conf;
|
||||
|
||||
index_declare(mme_enb_pool, mme_enb_t, MAX_NUM_OF_ENB);
|
||||
index_declare(mme_ue_pool, mme_ue_t, MAX_POOL_OF_UE);
|
||||
|
@ -41,8 +42,12 @@ status_t mme_context_init()
|
|||
d_assert(context_initialized == 0, return CORE_ERROR,
|
||||
"MME context already has been context_initialized");
|
||||
|
||||
/* Initial FreeDiameter Config */
|
||||
memset(&g_fd_conf, 0, sizeof(fd_config_t));
|
||||
|
||||
/* Initialize MME context */
|
||||
memset(&self, 0, sizeof(mme_context_t));
|
||||
self.fd_config = &g_fd_conf;
|
||||
|
||||
list_init(&self.s1ap_list);
|
||||
list_init(&self.s1ap_list6);
|
||||
|
@ -129,89 +134,83 @@ static status_t mme_context_prepare()
|
|||
|
||||
self.s1ap_port = S1AP_SCTP_PORT;
|
||||
self.gtpc_port = GTPV2_C_UDP_PORT;
|
||||
self.fd_config->cnf_port = DIAMETER_PORT;
|
||||
self.fd_config->cnf_port_tls = DIAMETER_SECURE_PORT;
|
||||
|
||||
return CORE_OK;
|
||||
}
|
||||
|
||||
static status_t mme_context_validation()
|
||||
{
|
||||
if (self.fd_conf_path == NULL)
|
||||
if (self.fd_conf_path == NULL &&
|
||||
(self.fd_config->cnf_diamid == NULL ||
|
||||
self.fd_config->cnf_diamrlm == NULL ||
|
||||
self.fd_config->cnf_addr == NULL))
|
||||
{
|
||||
d_error("No mme.freeDiameter in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.freeDiameter in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
if (list_first(&self.s1ap_list) == NULL &&
|
||||
list_first(&self.s1ap_list6) == NULL)
|
||||
{
|
||||
d_error("No mme.s1ap in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.s1ap in '%s'", context_self()->config.path);
|
||||
return CORE_EAGAIN;
|
||||
}
|
||||
|
||||
if (list_first(&self.gtpc_list) == NULL &&
|
||||
list_first(&self.gtpc_list6) == NULL)
|
||||
{
|
||||
d_error("No mme.gtpc in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.gtpc in '%s'", context_self()->config.path);
|
||||
return CORE_EAGAIN;
|
||||
}
|
||||
|
||||
if (list_first(&self.sgw_list) == NULL)
|
||||
{
|
||||
d_error("No sgw.gtpc in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No sgw.gtpc in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
if (list_first(&self.pgw_list) == NULL)
|
||||
{
|
||||
d_error("No pgw.gtpc in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No pgw.gtpc in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
if (self.max_num_of_served_gummei == 0)
|
||||
{
|
||||
d_error("No mme.gummei in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.gummei in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
if (self.served_gummei[0].num_of_plmn_id == 0)
|
||||
{
|
||||
d_error("No mme.gummei.plmn_id in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.gummei.plmn_id in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
if (self.served_gummei[0].num_of_mme_gid == 0)
|
||||
{
|
||||
d_error("No mme.gummei.mme_gid in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.gummei.mme_gid in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
if (self.served_gummei[0].num_of_mme_code == 0)
|
||||
{
|
||||
d_error("No mme.gummei.mme_code in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.gummei.mme_code in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
if (self.num_of_served_tai == 0)
|
||||
{
|
||||
d_error("No mme.tai in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.tai in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
if (self.served_tai[0].list0.tai[0].num == 0 &&
|
||||
self.served_tai[0].list2.num == 0)
|
||||
{
|
||||
d_error("No mme.tai.plmn_id|tac in '%s'",
|
||||
context_self()->config.path);
|
||||
d_error("No mme.tai.plmn_id|tac in '%s'", context_self()->config.path);
|
||||
return CORE_ERROR;
|
||||
}
|
||||
|
||||
|
@ -262,6 +261,181 @@ status_t mme_context_parse_config()
|
|||
{
|
||||
self.fd_conf_path = yaml_iter_value(&mme_iter);
|
||||
}
|
||||
else if (!strcmp(mme_key, "fd"))
|
||||
{
|
||||
yaml_iter_t fd_iter;
|
||||
yaml_iter_recurse(&mme_iter, &fd_iter);
|
||||
|
||||
while(yaml_iter_next(&fd_iter))
|
||||
{
|
||||
const char *fd_key = yaml_iter_key(&fd_iter);
|
||||
d_assert(fd_key, return CORE_ERROR,);
|
||||
if (!strcmp(fd_key, "identity"))
|
||||
{
|
||||
self.fd_config->cnf_diamid =
|
||||
yaml_iter_value(&fd_iter);
|
||||
}
|
||||
else if (!strcmp(fd_key, "realm"))
|
||||
{
|
||||
self.fd_config->cnf_diamrlm =
|
||||
yaml_iter_value(&fd_iter);
|
||||
}
|
||||
else if (!strcmp(fd_key, "port"))
|
||||
{
|
||||
const char *v = yaml_iter_value(&fd_iter);
|
||||
if (v) self.fd_config->cnf_port = atoi(v);
|
||||
}
|
||||
else if (!strcmp(fd_key, "sec_port"))
|
||||
{
|
||||
const char *v = yaml_iter_value(&fd_iter);
|
||||
if (v) self.fd_config->cnf_port_tls = atoi(v);
|
||||
}
|
||||
else if (!strcmp(fd_key, "no_sctp"))
|
||||
{
|
||||
self.fd_config->cnf_flags.no_sctp =
|
||||
yaml_iter_bool(&fd_iter);
|
||||
}
|
||||
else if (!strcmp(fd_key, "listen_on"))
|
||||
{
|
||||
self.fd_config->cnf_addr =
|
||||
yaml_iter_value(&fd_iter);
|
||||
}
|
||||
else if (!strcmp(fd_key, "load_extension"))
|
||||
{
|
||||
yaml_iter_t ext_array, ext_iter;
|
||||
yaml_iter_recurse(&fd_iter, &ext_array);
|
||||
do
|
||||
{
|
||||
const char *module = NULL;
|
||||
const char *conf = NULL;
|
||||
|
||||
if (yaml_iter_type(&ext_array) ==
|
||||
YAML_MAPPING_NODE)
|
||||
{
|
||||
memcpy(&ext_iter, &ext_array,
|
||||
sizeof(yaml_iter_t));
|
||||
}
|
||||
else if (yaml_iter_type(&ext_array) ==
|
||||
YAML_SEQUENCE_NODE)
|
||||
{
|
||||
if (!yaml_iter_next(&ext_array))
|
||||
break;
|
||||
yaml_iter_recurse(&ext_array, &ext_iter);
|
||||
}
|
||||
else if (yaml_iter_type(&ext_array) ==
|
||||
YAML_SCALAR_NODE)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
d_assert(0, return CORE_ERROR,);
|
||||
|
||||
while(yaml_iter_next(&ext_iter))
|
||||
{
|
||||
const char *ext_key =
|
||||
yaml_iter_key(&ext_iter);
|
||||
d_assert(ext_key,
|
||||
return CORE_ERROR,);
|
||||
if (!strcmp(ext_key, "module"))
|
||||
{
|
||||
module = yaml_iter_value(&ext_iter);
|
||||
}
|
||||
else if (!strcmp(ext_key, "conf"))
|
||||
{
|
||||
conf = yaml_iter_value(&ext_iter);
|
||||
}
|
||||
else
|
||||
d_warn("unknown key `%s`", ext_key);
|
||||
}
|
||||
|
||||
if (module)
|
||||
{
|
||||
self.fd_config->
|
||||
ext[self.fd_config->num_of_ext].
|
||||
module = module;
|
||||
self.fd_config->
|
||||
ext[self.fd_config->num_of_ext].
|
||||
conf = conf;
|
||||
self.fd_config->num_of_ext++;
|
||||
}
|
||||
} while(yaml_iter_type(&ext_array) ==
|
||||
YAML_SEQUENCE_NODE);
|
||||
}
|
||||
else if (!strcmp(fd_key, "connect"))
|
||||
{
|
||||
yaml_iter_t conn_array, conn_iter;
|
||||
yaml_iter_recurse(&fd_iter, &conn_array);
|
||||
do
|
||||
{
|
||||
const char *identity = NULL;
|
||||
const char *addr = NULL;
|
||||
c_uint16_t port = 0;
|
||||
|
||||
if (yaml_iter_type(&conn_array) ==
|
||||
YAML_MAPPING_NODE)
|
||||
{
|
||||
memcpy(&conn_iter, &conn_array,
|
||||
sizeof(yaml_iter_t));
|
||||
}
|
||||
else if (yaml_iter_type(&conn_array) ==
|
||||
YAML_SEQUENCE_NODE)
|
||||
{
|
||||
if (!yaml_iter_next(&conn_array))
|
||||
break;
|
||||
yaml_iter_recurse(&conn_array, &conn_iter);
|
||||
}
|
||||
else if (yaml_iter_type(&conn_array) ==
|
||||
YAML_SCALAR_NODE)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
d_assert(0, return CORE_ERROR,);
|
||||
|
||||
while(yaml_iter_next(&conn_iter))
|
||||
{
|
||||
const char *conn_key =
|
||||
yaml_iter_key(&conn_iter);
|
||||
d_assert(conn_key,
|
||||
return CORE_ERROR,);
|
||||
if (!strcmp(conn_key, "identity"))
|
||||
{
|
||||
identity = yaml_iter_value(&conn_iter);
|
||||
}
|
||||
else if (!strcmp(conn_key, "addr"))
|
||||
{
|
||||
addr = yaml_iter_value(&conn_iter);
|
||||
}
|
||||
else if (!strcmp(conn_key, "port"))
|
||||
{
|
||||
const char *v =
|
||||
yaml_iter_value(&conn_iter);
|
||||
if (v) port = atoi(v);
|
||||
}
|
||||
else
|
||||
d_warn("unknown key `%s`", conn_key);
|
||||
}
|
||||
|
||||
if (identity && addr)
|
||||
{
|
||||
self.fd_config->
|
||||
conn[self.fd_config->num_of_conn].
|
||||
identity = identity;
|
||||
self.fd_config->
|
||||
conn[self.fd_config->num_of_conn].
|
||||
addr = addr;
|
||||
self.fd_config->
|
||||
conn[self.fd_config->num_of_conn].
|
||||
port = port;
|
||||
self.fd_config->num_of_conn++;
|
||||
}
|
||||
} while(yaml_iter_type(&conn_array) ==
|
||||
YAML_SEQUENCE_NODE);
|
||||
}
|
||||
else
|
||||
d_warn("unknown key `%s`", fd_key);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(mme_key, "relative_capacity"))
|
||||
{
|
||||
const char *v = yaml_iter_value(&mme_iter);
|
||||
|
|
|
@ -40,6 +40,8 @@ typedef struct _mme_ue_t mme_ue_t;
|
|||
typedef struct _gtp_node_t gtp_node_t;
|
||||
typedef struct _gtp_xact_t gtp_xact_t;
|
||||
|
||||
typedef struct _fd_config_t fd_config_t;
|
||||
|
||||
typedef struct _served_gummei {
|
||||
c_uint32_t num_of_plmn_id;
|
||||
plmn_id_t plmn_id[MAX_PLMN_ID];
|
||||
|
@ -52,6 +54,7 @@ typedef struct _served_gummei {
|
|||
|
||||
typedef struct _mme_context_t {
|
||||
const char *fd_conf_path; /* MME freeDiameter conf path */
|
||||
fd_config_t *fd_config; /* MME freeDiameter config */
|
||||
|
||||
c_uint16_t s1ap_port; /* Default S1AP Port */
|
||||
c_uint16_t gtpc_port; /* Default GTPC Port */
|
||||
|
|
|
@ -918,7 +918,8 @@ int mme_fd_init(void)
|
|||
{
|
||||
pool_init(&mme_s6a_sess_pool, MAX_NUM_SESSION_STATE);
|
||||
|
||||
CHECK_FCT( fd_init(FD_MODE_CLIENT, mme_self()->fd_conf_path) );
|
||||
CHECK_FCT( fd_init(FD_MODE_CLIENT,
|
||||
mme_self()->fd_conf_path, mme_self()->fd_config) );
|
||||
|
||||
/* Install objects definitions for this application */
|
||||
CHECK_FCT( s6a_dict_init() );
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include "pcrf_context.h"
|
||||
|
||||
static pcrf_context_t self;
|
||||
static fd_config_t g_fd_conf;
|
||||
|
||||
static int context_initialized = 0;
|
||||
|
||||
pcrf_context_t* pcrf_self()
|
||||
|
@ -26,8 +28,12 @@ status_t pcrf_context_init(void)
|
|||
d_assert(context_initialized == 0, return CORE_ERROR,
|
||||
"PCRF context already has been context_initialized");
|
||||
|
||||
/* Initial FreeDiameter Config */
|
||||
memset(&g_fd_conf, 0, sizeof(fd_config_t));
|
||||
|
||||
/* Initialize PCRF context */
|
||||
memset(&self, 0, sizeof(pcrf_context_t));
|
||||
self.fd_config = &g_fd_conf;
|
||||
|
||||
if (mutex_create(&self.db_lock, MUTEX_DEFAULT) != CORE_OK)
|
||||
{
|
||||
|
|
|
@ -11,11 +11,13 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
typedef struct _fd_config_t fd_config_t;
|
||||
typedef struct _pcrf_context_t {
|
||||
const char *fd_conf_path; /* PCRF freeDiameter conf path */
|
||||
const char *fd_conf_path; /* PCRF freeDiameter conf path */
|
||||
fd_config_t *fd_config; /* PCRF freeDiameter config */
|
||||
|
||||
void *subscriberCollection;
|
||||
mutex_id db_lock;
|
||||
void *subscriberCollection;
|
||||
mutex_id db_lock;
|
||||
} pcrf_context_t;
|
||||
|
||||
CORE_DECLARE(status_t) pcrf_context_init(void);
|
||||
|
|
|
@ -442,8 +442,8 @@ int pcrf_fd_init(void)
|
|||
{
|
||||
struct disp_when data;
|
||||
|
||||
CHECK_FCT(
|
||||
fd_init(FD_MODE_CLIENT|FD_MODE_SERVER, pcrf_self()->fd_conf_path) );
|
||||
CHECK_FCT( fd_init(FD_MODE_CLIENT|FD_MODE_SERVER,
|
||||
pcrf_self()->fd_conf_path, pcrf_self()->fd_config) );
|
||||
|
||||
/* GX Interface */
|
||||
CHECK_FCT( gx_dict_init() );
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "pgw_context.h"
|
||||
|
||||
static pgw_context_t self;
|
||||
static fd_config_t g_fd_conf;
|
||||
|
||||
pool_declare(pgw_dev_pool, pgw_dev_t, MAX_NUM_OF_DEV);
|
||||
pool_declare(pgw_subnet_pool, pgw_subnet_t, MAX_NUM_OF_SUBNET);
|
||||
|
@ -37,7 +38,12 @@ status_t pgw_context_init()
|
|||
d_assert(context_initiaized == 0, return CORE_ERROR,
|
||||
"PGW context already has been initialized");
|
||||
|
||||
/* Initial FreeDiameter Config */
|
||||
memset(&g_fd_conf, 0, sizeof(fd_config_t));
|
||||
|
||||
/* Initialize PGW context */
|
||||
memset(&self, 0, sizeof(pgw_context_t));
|
||||
self.fd_config = &g_fd_conf;
|
||||
|
||||
list_init(&self.gtpc_list);
|
||||
list_init(&self.gtpc_list6);
|
||||
|
|
|
@ -20,8 +20,12 @@ extern "C" {
|
|||
#define MAX_NUM_OF_SUBNET 16
|
||||
|
||||
typedef struct _gtp_node_t gtp_node_t;
|
||||
typedef struct _fd_config_t fd_config_t;
|
||||
|
||||
typedef struct _pgw_context_t {
|
||||
const char* fd_conf_path; /* PGW freeDiameter conf path */
|
||||
fd_config_t *fd_config; /* PGW freeDiameter config */
|
||||
|
||||
c_uint32_t gtpc_port; /* Default: PGW GTP-C local port */
|
||||
c_uint32_t gtpu_port; /* Default: PGW GTP-U local port */
|
||||
const char *tun_ifname; /* Default:: pgwtun */
|
||||
|
@ -39,8 +43,6 @@ typedef struct _pgw_context_t {
|
|||
list_t dev_list; /* PGW Tun Device List */
|
||||
list_t subnet_list; /* PGW UE Subnet List */
|
||||
|
||||
const char* fd_conf_path; /* PGW freeDiameter conf path */
|
||||
|
||||
msgq_id queue_id; /* Qsesssess for processing PGW control plane */
|
||||
tm_service_t tm_service; /* Timer Service */
|
||||
|
||||
|
|
|
@ -772,8 +772,8 @@ int pgw_fd_init(void)
|
|||
{
|
||||
pool_init(&pgw_gx_sess_pool, MAX_NUM_SESSION_STATE);
|
||||
|
||||
CHECK_FCT(
|
||||
fd_init(FD_MODE_CLIENT|FD_MODE_SERVER, pgw_self()->fd_conf_path) );
|
||||
CHECK_FCT( fd_init(FD_MODE_CLIENT|FD_MODE_SERVER,
|
||||
pgw_self()->fd_conf_path, pgw_self()->fd_config) );
|
||||
|
||||
/* Install objects definitions for this application */
|
||||
CHECK_FCT( gx_dict_init() );
|
||||
|
|
|
@ -32,6 +32,29 @@ parameter:
|
|||
|
||||
mme:
|
||||
freeDiameter: mme.conf
|
||||
fd:
|
||||
identity: mme.localdomain
|
||||
realm: localdomain
|
||||
no_sctp: true
|
||||
# port: 3868
|
||||
# sec_port: 5868
|
||||
listen_on: 127.0.0.3
|
||||
load_extension:
|
||||
- module: dbg_msg_dumps.so
|
||||
conf: 0x8888
|
||||
- module: dict_rfc5777.so
|
||||
- module: dict_rfc5777.so
|
||||
- module: dict_mip6i.so
|
||||
- module: dict_nasreq.so
|
||||
- module: dict_nas_mipv6.so
|
||||
- module: dict_dcca.so
|
||||
- module: dict_dcca_3gpp.so
|
||||
- module: dict_s6a.so
|
||||
connect:
|
||||
- identity: hss.localdomain
|
||||
addr: 127.0.0.4
|
||||
# port: 3868
|
||||
|
||||
|
||||
#
|
||||
# <S1AP Server>>
|
||||
|
|
Loading…
Reference in New Issue