2017-08-17 05:15:08 +00:00
|
|
|
#ifndef __PCRF_CONTEXT_H__
|
|
|
|
#define __PCRF_CONTEXT_H__
|
|
|
|
|
|
|
|
#include "core_errno.h"
|
|
|
|
#include "core_mutex.h"
|
2018-01-08 09:34:51 +00:00
|
|
|
#include "core_hash.h"
|
2017-08-24 08:05:10 +00:00
|
|
|
|
2017-12-07 05:37:58 +00:00
|
|
|
#include "3gpp_types.h"
|
2018-01-04 11:38:22 +00:00
|
|
|
#include "fd/gx/gx_message.h"
|
2017-08-17 05:15:08 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2018-01-05 07:25:02 +00:00
|
|
|
typedef struct _fd_config_t fd_config_t;
|
2017-08-17 05:15:08 +00:00
|
|
|
typedef struct _pcrf_context_t {
|
2018-01-05 07:25:02 +00:00
|
|
|
const char *fd_conf_path; /* PCRF freeDiameter conf path */
|
|
|
|
fd_config_t *fd_config; /* PCRF freeDiameter config */
|
2017-08-17 05:15:08 +00:00
|
|
|
|
2018-01-05 07:25:02 +00:00
|
|
|
void *subscriberCollection;
|
|
|
|
mutex_id db_lock;
|
2018-01-08 09:34:51 +00:00
|
|
|
|
2018-01-08 13:42:44 +00:00
|
|
|
hash_t *ip_hash; /* hash table for Gx Frame IPv4/IPv6 */
|
2018-01-08 09:34:51 +00:00
|
|
|
mutex_id hash_lock;
|
2017-08-17 05:15:08 +00:00
|
|
|
} pcrf_context_t;
|
|
|
|
|
|
|
|
CORE_DECLARE(status_t) pcrf_context_init(void);
|
|
|
|
CORE_DECLARE(status_t) pcrf_context_final(void);
|
|
|
|
CORE_DECLARE(pcrf_context_t*) pcrf_self(void);
|
|
|
|
|
|
|
|
CORE_DECLARE(status_t) pcrf_context_parse_config(void);
|
|
|
|
CORE_DECLARE(status_t) pcrf_context_setup_trace_module(void);
|
|
|
|
|
|
|
|
CORE_DECLARE(status_t) pcrf_db_init(void);
|
|
|
|
CORE_DECLARE(status_t) pcrf_db_final(void);
|
|
|
|
|
2017-08-24 08:05:10 +00:00
|
|
|
CORE_DECLARE(status_t) pcrf_db_pdn_data(
|
2017-08-25 10:40:49 +00:00
|
|
|
c_int8_t *imsi_bcd, c_int8_t *apn, gx_cca_message_t *cca_message);
|
2017-08-24 08:05:10 +00:00
|
|
|
|
2018-01-08 13:42:44 +00:00
|
|
|
CORE_DECLARE(status_t) pcrf_sess_set_ipv4(const void *key, c_int8_t *sid);
|
|
|
|
CORE_DECLARE(status_t) pcrf_sess_set_ipv6(const void *key, c_int8_t *sid);
|
|
|
|
CORE_DECLARE(c_int8_t *) pcrf_sess_find_by_ipv4(const void *key);
|
|
|
|
CORE_DECLARE(c_int8_t *) pcrf_sess_find_by_ipv6(const void *key);
|
|
|
|
|
2017-08-17 05:15:08 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* __PCRF_CONTEXT_H__ */
|