gtp_node is added
This commit is contained in:
parent
4baf7ece46
commit
5a818eb8cd
|
@ -3,8 +3,8 @@
|
||||||
pkglib_LTLIBRARIES = libgtp.la
|
pkglib_LTLIBRARIES = libgtp.la
|
||||||
|
|
||||||
libgtp_la_SOURCES = \
|
libgtp_la_SOURCES = \
|
||||||
gtp_message.h gtp_types.h gtp_conv.h gtp_path.h gtp_xact.h \
|
gtp_message.h gtp_types.h gtp_conv.h gtp_node.h gtp_path.h gtp_xact.h \
|
||||||
gtp_message.c gtp_types.c gtp_conv.c gtp_path.c gtp_xact.c
|
gtp_message.c gtp_types.c gtp_conv.c gtp_node.c gtp_path.c gtp_xact.c
|
||||||
|
|
||||||
libgtp_la_DEPENDENCIES = \
|
libgtp_la_DEPENDENCIES = \
|
||||||
$(top_srcdir)/lib/core/src/libcore.la \
|
$(top_srcdir)/lib/core/src/libcore.la \
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#define TRACE_MODULE _gtp_node
|
||||||
|
|
||||||
|
#include "gtp_node.h"
|
|
@ -0,0 +1,31 @@
|
||||||
|
#ifndef __GTP_NODE_H__
|
||||||
|
#define __GTP_NODE_H__
|
||||||
|
|
||||||
|
#include "core_list.h"
|
||||||
|
#include "core_network.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
typedef list_t gnode_list_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This structure represents the commonalities of GTP node such as MME, SGW,
|
||||||
|
* PGW gateway. Some of members may not be used by the specific type of node */
|
||||||
|
typedef struct _gtp_node_t {
|
||||||
|
lnode_t node; /**< A node of list_t */
|
||||||
|
c_sockaddr_t *addr; /**< Socket Address */
|
||||||
|
|
||||||
|
c_sockaddr_t old_addr; /**< Will be removed */
|
||||||
|
sock_id sock; /**< Socket Descriptor */
|
||||||
|
|
||||||
|
list_t local_list;
|
||||||
|
list_t remote_list;
|
||||||
|
} gtp_node_t;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* __GTP_NODE_H__ */
|
|
@ -1,11 +1,56 @@
|
||||||
#define TRACE_MODULE _gtp_path
|
#define TRACE_MODULE _gtp_path
|
||||||
|
|
||||||
#include "core_debug.h"
|
#include "core_debug.h"
|
||||||
#include "core_pkbuf.h"
|
#include "core_pkbuf.h"
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "gtp_message.h"
|
#include "gtp_message.h"
|
||||||
|
#include "gtp_node.h"
|
||||||
|
|
||||||
#include "gtp_path.h"
|
#include "gtp_path.h"
|
||||||
|
|
||||||
|
status_t gtp_server(sock_id *new, c_sockaddr_t *sa, sock_handler handler)
|
||||||
|
{
|
||||||
|
status_t rv;
|
||||||
|
char buf[CORE_ADDRSTRLEN];
|
||||||
|
|
||||||
|
while(sa)
|
||||||
|
{
|
||||||
|
rv = udp_socket(new, sa->c_sa_family);
|
||||||
|
d_assert(rv == CORE_OK, return CORE_ERROR,);
|
||||||
|
|
||||||
|
d_assert(sock_setsockopt(*new, SOCK_O_REUSEADDR, 1) == CORE_OK,
|
||||||
|
return CORE_ERROR,
|
||||||
|
"setsockopt(%s:%d) failed(%d:%s)",
|
||||||
|
CORE_ADDR(sa, buf), CORE_PORT(sa), errno, strerror(errno));
|
||||||
|
|
||||||
|
if (sock_bind(*new, sa) == CORE_OK)
|
||||||
|
{
|
||||||
|
d_trace(1, "udp bind %s:%d\n", CORE_ADDR(sa, buf), CORE_PORT(sa));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
rv = sock_delete(*new);
|
||||||
|
d_assert(rv == CORE_OK, return CORE_ERROR,);
|
||||||
|
|
||||||
|
sa = sa->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sa == NULL)
|
||||||
|
{
|
||||||
|
d_error("udp bind(%s:%d) failed(%d:%s)",
|
||||||
|
CORE_ADDR(sa, buf), CORE_PORT(sa), errno, strerror(errno));
|
||||||
|
return CORE_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
rv = sock_register(*new, handler, NULL);
|
||||||
|
d_assert(rv == CORE_OK, return CORE_ERROR,);
|
||||||
|
|
||||||
|
d_trace(1, "gtp_server [%s]:%d\n", CORE_ADDR(sa, buf), CORE_PORT(sa));
|
||||||
|
|
||||||
|
return CORE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
status_t gtp_listen(sock_id *sock,
|
status_t gtp_listen(sock_id *sock,
|
||||||
sock_handler handler, c_uint32_t ipv4, c_uint16_t port, void *data)
|
sock_handler handler, c_uint32_t ipv4, c_uint16_t port, void *data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,24 +3,15 @@
|
||||||
|
|
||||||
#include "core_pkbuf.h"
|
#include "core_pkbuf.h"
|
||||||
#include "core_network.h"
|
#include "core_network.h"
|
||||||
#include "core_list.h"
|
|
||||||
|
typedef struct _gtp_node_t gtp_node_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/**
|
CORE_DECLARE(status_t) gtp_server(sock_id *new,
|
||||||
* This structure represents the commonalities of GTP node such as MME, SGW,
|
c_sockaddr_t *sa, sock_handler handler);
|
||||||
* PGW gateway. Some of members may not be used by the specific type of node */
|
|
||||||
typedef struct _gtp_node_t {
|
|
||||||
lnode_t node; /**< A node of list_t */
|
|
||||||
|
|
||||||
c_sockaddr_t old_addr; /**< Will be removed */
|
|
||||||
sock_id sock; /**< Socket Descriptor */
|
|
||||||
|
|
||||||
list_t local_list;
|
|
||||||
list_t remote_list;
|
|
||||||
} gtp_node_t;
|
|
||||||
|
|
||||||
CORE_DECLARE(status_t) gtp_listen(sock_id *sock,
|
CORE_DECLARE(status_t) gtp_listen(sock_id *sock,
|
||||||
sock_handler handler, c_uint32_t addr, c_uint16_t port, void *data);
|
sock_handler handler, c_uint32_t addr, c_uint16_t port, void *data);
|
||||||
|
|
|
@ -4,8 +4,11 @@
|
||||||
#include "core_event.h"
|
#include "core_event.h"
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "gtp_xact.h"
|
|
||||||
#include "gtp_message.h"
|
#include "gtp_message.h"
|
||||||
|
#include "gtp_node.h"
|
||||||
|
#include "gtp_path.h"
|
||||||
|
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#define SIZE_OF_GTP_XACT_POOL 64
|
#define SIZE_OF_GTP_XACT_POOL 64
|
||||||
#define GTP_MIN_XACT_ID 1
|
#define GTP_MIN_XACT_ID 1
|
||||||
|
|
|
@ -6,13 +6,14 @@
|
||||||
#include "core_index.h"
|
#include "core_index.h"
|
||||||
#include "core_timer.h"
|
#include "core_timer.h"
|
||||||
|
|
||||||
#include "gtp_path.h"
|
|
||||||
#include "gtp_message.h"
|
#include "gtp_message.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
typedef struct _gtp_node_t gtp_node_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transaction context
|
* Transaction context
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "nas_path.h"
|
#include "nas_path.h"
|
||||||
#include "s1ap_path.h"
|
#include "s1ap_path.h"
|
||||||
#include "mme_gtp_path.h"
|
#include "mme_gtp_path.h"
|
||||||
|
#include "mme_sm.h"
|
||||||
|
|
||||||
void emm_state_initial(fsm_t *s, event_t *e)
|
void emm_state_initial(fsm_t *s, event_t *e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "nas_security.h"
|
#include "nas_security.h"
|
||||||
#include "esm_build.h"
|
#include "esm_build.h"
|
||||||
|
#include "mme_sm.h"
|
||||||
|
|
||||||
status_t esm_build_pdn_connectivity_reject(
|
status_t esm_build_pdn_connectivity_reject(
|
||||||
pkbuf_t **pkbuf, mme_sess_t *sess, nas_esm_cause_t esm_cause)
|
pkbuf_t **pkbuf, mme_sess_t *sess, nas_esm_cause_t esm_cause)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "nas_message.h"
|
#include "nas_message.h"
|
||||||
|
|
||||||
#include "mme_event.h"
|
#include "mme_event.h"
|
||||||
|
#include "mme_sm.h"
|
||||||
#include "mme_fd_path.h"
|
#include "mme_fd_path.h"
|
||||||
#include "emm_handler.h"
|
#include "emm_handler.h"
|
||||||
#include "esm_build.h"
|
#include "esm_build.h"
|
||||||
|
|
|
@ -3,13 +3,16 @@
|
||||||
#include "core_debug.h"
|
#include "core_debug.h"
|
||||||
#include "core_pool.h"
|
#include "core_pool.h"
|
||||||
#include "core_lib.h"
|
#include "core_lib.h"
|
||||||
|
#include "core_msgq.h"
|
||||||
|
#include "core_fsm.h"
|
||||||
|
|
||||||
#include <mongoc.h>
|
#include <mongoc.h>
|
||||||
#include <yaml.h>
|
#include <yaml.h>
|
||||||
#include "yaml_helper.h"
|
#include "yaml_helper.h"
|
||||||
|
|
||||||
#include "gtp_path.h"
|
|
||||||
#include "s1ap_message.h"
|
#include "s1ap_message.h"
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
#include "gtp_node.h"
|
||||||
#include "fd_lib.h"
|
#include "fd_lib.h"
|
||||||
|
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
|
@ -17,12 +20,14 @@
|
||||||
#include "mme_context.h"
|
#include "mme_context.h"
|
||||||
#include "mme_event.h"
|
#include "mme_event.h"
|
||||||
#include "s1ap_path.h"
|
#include "s1ap_path.h"
|
||||||
|
#include "mme_sm.h"
|
||||||
|
|
||||||
#define MAX_CELL_PER_ENB 8
|
#define MAX_CELL_PER_ENB 8
|
||||||
|
|
||||||
static mme_context_t self;
|
static mme_context_t self;
|
||||||
|
|
||||||
pool_declare(mme_s1ap_pool, mme_s1ap_t, MAX_NUM_OF_S1AP_SERVER);
|
pool_declare(mme_s1ap_pool, mme_s1ap_t, MAX_NUM_OF_S1AP_SERVER);
|
||||||
|
pool_declare(mme_gtpc_pool, mme_gtpc_t, MAX_NUM_OF_GTP_SERVER);
|
||||||
pool_declare(mme_sgw_pool, mme_sgw_t, MAX_NUM_OF_GTP_CLIENT);
|
pool_declare(mme_sgw_pool, mme_sgw_t, MAX_NUM_OF_GTP_CLIENT);
|
||||||
|
|
||||||
index_declare(mme_enb_pool, mme_enb_t, MAX_NUM_OF_ENB);
|
index_declare(mme_enb_pool, mme_enb_t, MAX_NUM_OF_ENB);
|
||||||
|
@ -43,6 +48,8 @@ status_t mme_context_init()
|
||||||
|
|
||||||
pool_init(&mme_s1ap_pool, MAX_NUM_OF_S1AP_SERVER);
|
pool_init(&mme_s1ap_pool, MAX_NUM_OF_S1AP_SERVER);
|
||||||
list_init(&self.s1ap_list);
|
list_init(&self.s1ap_list);
|
||||||
|
pool_init(&mme_gtpc_pool, MAX_NUM_OF_GTP_SERVER);
|
||||||
|
list_init(&self.gtpc_list);
|
||||||
pool_init(&mme_sgw_pool, MAX_NUM_OF_GTP_CLIENT);
|
pool_init(&mme_sgw_pool, MAX_NUM_OF_GTP_CLIENT);
|
||||||
list_init(&self.sgw_list);
|
list_init(&self.sgw_list);
|
||||||
|
|
||||||
|
@ -73,6 +80,7 @@ status_t mme_context_final()
|
||||||
"MME context already has been finalized");
|
"MME context already has been finalized");
|
||||||
|
|
||||||
mme_s1ap_remove_all();
|
mme_s1ap_remove_all();
|
||||||
|
mme_gtpc_remove_all();
|
||||||
|
|
||||||
mme_sgw_remove_all();
|
mme_sgw_remove_all();
|
||||||
mme_enb_remove_all();
|
mme_enb_remove_all();
|
||||||
|
@ -102,6 +110,7 @@ status_t mme_context_final()
|
||||||
pool_final(&mme_sgw_pool);
|
pool_final(&mme_sgw_pool);
|
||||||
|
|
||||||
pool_final(&mme_s1ap_pool);
|
pool_final(&mme_s1ap_pool);
|
||||||
|
pool_final(&mme_gtpc_pool);
|
||||||
|
|
||||||
context_initialized = 0;
|
context_initialized = 0;
|
||||||
|
|
||||||
|
@ -1099,6 +1108,59 @@ mme_s1ap_t* mme_s1ap_next(mme_s1ap_t *s1ap)
|
||||||
return list_next(s1ap);
|
return list_next(s1ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mme_gtpc_t* mme_gtpc_add(c_sockaddr_t *addr)
|
||||||
|
{
|
||||||
|
mme_gtpc_t *gtpc = NULL;
|
||||||
|
|
||||||
|
pool_alloc_node(&mme_gtpc_pool, >pc);
|
||||||
|
d_assert(gtpc, return NULL, "Null param");
|
||||||
|
memset(gtpc, 0, sizeof(mme_gtpc_t));
|
||||||
|
|
||||||
|
gtpc->addr = addr;
|
||||||
|
|
||||||
|
list_append(&self.gtpc_list, gtpc);
|
||||||
|
|
||||||
|
return gtpc;
|
||||||
|
}
|
||||||
|
|
||||||
|
status_t mme_gtpc_remove(mme_gtpc_t *gtpc)
|
||||||
|
{
|
||||||
|
d_assert(gtpc, return CORE_ERROR, "Null param");
|
||||||
|
|
||||||
|
list_remove(&self.gtpc_list, gtpc);
|
||||||
|
|
||||||
|
pool_free_node(&mme_gtpc_pool, gtpc);
|
||||||
|
|
||||||
|
return CORE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
status_t mme_gtpc_remove_all()
|
||||||
|
{
|
||||||
|
mme_gtpc_t *gtpc = NULL, *next_gtpc = NULL;
|
||||||
|
|
||||||
|
gtpc = mme_gtpc_first();
|
||||||
|
while (gtpc)
|
||||||
|
{
|
||||||
|
next_gtpc = mme_gtpc_next(gtpc);
|
||||||
|
|
||||||
|
mme_gtpc_remove(gtpc);
|
||||||
|
|
||||||
|
gtpc = next_gtpc;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CORE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
mme_gtpc_t* mme_gtpc_first()
|
||||||
|
{
|
||||||
|
return list_first(&self.gtpc_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
mme_gtpc_t* mme_gtpc_next(mme_gtpc_t *gtpc)
|
||||||
|
{
|
||||||
|
return list_next(gtpc);
|
||||||
|
}
|
||||||
|
|
||||||
mme_sgw_t* mme_sgw_add()
|
mme_sgw_t* mme_sgw_add()
|
||||||
{
|
{
|
||||||
mme_sgw_t *sgw = NULL;
|
mme_sgw_t *sgw = NULL;
|
||||||
|
|
|
@ -6,15 +6,17 @@
|
||||||
#include "core_errno.h"
|
#include "core_errno.h"
|
||||||
#include "core_sha2.h"
|
#include "core_sha2.h"
|
||||||
#include "core_hash.h"
|
#include "core_hash.h"
|
||||||
|
#include "core_network.h"
|
||||||
|
#include "core_tlv_msg.h"
|
||||||
|
#include "core_fsm.h"
|
||||||
|
#include "core_msgq.h"
|
||||||
|
#include "core_timer.h"
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "s1ap_message.h"
|
#include "s1ap_message.h"
|
||||||
#include "nas_message.h"
|
#include "nas_message.h"
|
||||||
#include "gtp_xact.h"
|
|
||||||
#include "s6a_message.h"
|
#include "s6a_message.h"
|
||||||
|
|
||||||
#include "mme_sm.h"
|
|
||||||
|
|
||||||
/* S1AP */
|
/* S1AP */
|
||||||
#include "S1ap-Cause.h"
|
#include "S1ap-Cause.h"
|
||||||
|
|
||||||
|
@ -36,6 +38,10 @@ extern "C" {
|
||||||
typedef struct _enb_ue_t enb_ue_t;
|
typedef struct _enb_ue_t enb_ue_t;
|
||||||
typedef struct _mme_ue_t mme_ue_t;
|
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 gtp_node_t mme_gtpc_t;
|
||||||
typedef gtp_node_t mme_sgw_t;
|
typedef gtp_node_t mme_sgw_t;
|
||||||
|
|
||||||
typedef struct _served_gummei {
|
typedef struct _served_gummei {
|
||||||
|
@ -51,8 +57,9 @@ typedef struct _served_gummei {
|
||||||
typedef struct _mme_context_t {
|
typedef struct _mme_context_t {
|
||||||
const char *fd_conf_path; /* MME freeDiameter conf path */
|
const char *fd_conf_path; /* MME freeDiameter conf path */
|
||||||
|
|
||||||
list_t s1ap_list; /* MME S1AP Socket List */
|
list_t s1ap_list; /* MME S1AP Server List */
|
||||||
list_t sgw_list; /* SGW GTP Node List */
|
list_t gtpc_list; /* MME GTPC Server List */
|
||||||
|
list_t sgw_list; /* SGW GTPC Client List */
|
||||||
|
|
||||||
c_uint32_t gtpc_addr; /* MME GTPC local address */
|
c_uint32_t gtpc_addr; /* MME GTPC local address */
|
||||||
c_uint16_t gtpc_port; /* MME GTPC local port */
|
c_uint16_t gtpc_port; /* MME GTPC local port */
|
||||||
|
@ -452,6 +459,12 @@ CORE_DECLARE(status_t) mme_s1ap_remove_all(void);
|
||||||
CORE_DECLARE(mme_s1ap_t*) mme_s1ap_first(void);
|
CORE_DECLARE(mme_s1ap_t*) mme_s1ap_first(void);
|
||||||
CORE_DECLARE(mme_s1ap_t*) mme_s1ap_next(mme_s1ap_t *s1ap);
|
CORE_DECLARE(mme_s1ap_t*) mme_s1ap_next(mme_s1ap_t *s1ap);
|
||||||
|
|
||||||
|
CORE_DECLARE(mme_gtpc_t*) mme_gtpc_add(c_sockaddr_t *addr);
|
||||||
|
CORE_DECLARE(status_t) mme_gtpc_remove(mme_gtpc_t *gtpc);
|
||||||
|
CORE_DECLARE(status_t) mme_gtpc_remove_all(void);
|
||||||
|
CORE_DECLARE(mme_gtpc_t*) mme_gtpc_first(void);
|
||||||
|
CORE_DECLARE(mme_gtpc_t*) mme_gtpc_next(mme_gtpc_t *gtpc);
|
||||||
|
|
||||||
CORE_DECLARE(mme_sgw_t*) mme_sgw_add(void);
|
CORE_DECLARE(mme_sgw_t*) mme_sgw_add(void);
|
||||||
CORE_DECLARE(status_t) mme_sgw_remove(mme_sgw_t *sgw);
|
CORE_DECLARE(status_t) mme_sgw_remove(mme_sgw_t *sgw);
|
||||||
CORE_DECLARE(status_t) mme_sgw_remove_all(void);
|
CORE_DECLARE(status_t) mme_sgw_remove_all(void);
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include "core_debug.h"
|
#include "core_debug.h"
|
||||||
#include "core_pkbuf.h"
|
#include "core_pkbuf.h"
|
||||||
|
|
||||||
|
#include "gtp_node.h"
|
||||||
|
#include "gtp_path.h"
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "mme_event.h"
|
#include "mme_event.h"
|
||||||
#include "mme_gtp_path.h"
|
#include "mme_gtp_path.h"
|
||||||
#include "mme_s11_build.h"
|
#include "mme_s11_build.h"
|
||||||
|
|
|
@ -2,12 +2,18 @@
|
||||||
|
|
||||||
#include "core_debug.h"
|
#include "core_debug.h"
|
||||||
#include "core_thread.h"
|
#include "core_thread.h"
|
||||||
|
#include "core_msgq.h"
|
||||||
|
#include "core_fsm.h"
|
||||||
|
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "mme_event.h"
|
#include "mme_event.h"
|
||||||
|
|
||||||
#include "mme_fd_path.h"
|
#include "mme_fd_path.h"
|
||||||
#include "s1ap_path.h"
|
#include "s1ap_path.h"
|
||||||
|
|
||||||
|
#include "mme_sm.h"
|
||||||
|
|
||||||
static thread_id sm_thread;
|
static thread_id sm_thread;
|
||||||
static void *THREAD_FUNC sm_main(thread_id id, void *data);
|
static void *THREAD_FUNC sm_main(thread_id id, void *data);
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
#include "gtp_types.h"
|
#include "gtp_types.h"
|
||||||
#include "gtp_conv.h"
|
#include "gtp_conv.h"
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "mme_event.h"
|
#include "mme_event.h"
|
||||||
|
#include "mme_sm.h"
|
||||||
#include "mme_context.h"
|
#include "mme_context.h"
|
||||||
|
|
||||||
#include "s1ap_path.h"
|
#include "s1ap_path.h"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "nas_path.h"
|
#include "nas_path.h"
|
||||||
#include "s1ap_path.h"
|
#include "s1ap_path.h"
|
||||||
|
|
||||||
|
#include "mme_sm.h"
|
||||||
#include "mme_s6a_handler.h"
|
#include "mme_s6a_handler.h"
|
||||||
|
|
||||||
void mme_s6a_handle_aia(mme_ue_t *mme_ue, s6a_aia_message_t *aia_message)
|
void mme_s6a_handle_aia(mme_ue_t *mme_ue, s6a_aia_message_t *aia_message)
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
|
|
||||||
#include "s1ap_message.h"
|
#include "s1ap_message.h"
|
||||||
#include "nas_message.h"
|
#include "nas_message.h"
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "mme_event.h"
|
#include "mme_event.h"
|
||||||
|
#include "mme_sm.h"
|
||||||
|
|
||||||
#include "s1ap_handler.h"
|
#include "s1ap_handler.h"
|
||||||
#include "s1ap_path.h"
|
#include "s1ap_path.h"
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "emm_build.h"
|
#include "emm_build.h"
|
||||||
#include "nas_path.h"
|
#include "nas_path.h"
|
||||||
#include "mme_event.h"
|
#include "mme_event.h"
|
||||||
|
#include "mme_sm.h"
|
||||||
|
|
||||||
status_t nas_send_to_enb(mme_ue_t *mme_ue, pkbuf_t *pkbuf)
|
status_t nas_send_to_enb(mme_ue_t *mme_ue, pkbuf_t *pkbuf)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#include "s1ap_build.h"
|
#include "s1ap_build.h"
|
||||||
#include "s1ap_handler.h"
|
#include "s1ap_handler.h"
|
||||||
|
|
||||||
|
#include "mme_sm.h"
|
||||||
|
|
||||||
void s1ap_handle_s1_setup_request(mme_enb_t *enb, s1ap_message_t *message)
|
void s1ap_handle_s1_setup_request(mme_enb_t *enb, s1ap_message_t *message)
|
||||||
{
|
{
|
||||||
char buf[CORE_ADDRSTRLEN];
|
char buf[CORE_ADDRSTRLEN];
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
#include "nas_message.h"
|
#include "nas_message.h"
|
||||||
#include "gtp_message.h"
|
#include "gtp_message.h"
|
||||||
|
|
||||||
#include "mme_event.h"
|
|
||||||
|
|
||||||
#include "s1ap_build.h"
|
#include "s1ap_build.h"
|
||||||
#include "s1ap_handler.h"
|
#include "s1ap_handler.h"
|
||||||
|
|
||||||
|
#include "mme_event.h"
|
||||||
|
#include "mme_sm.h"
|
||||||
|
|
||||||
void s1ap_state_initial(fsm_t *s, event_t *e)
|
void s1ap_state_initial(fsm_t *s, event_t *e)
|
||||||
{
|
{
|
||||||
d_assert(s, return, "Null param");
|
d_assert(s, return, "Null param");
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
#include <yaml.h>
|
#include <yaml.h>
|
||||||
#include "yaml_helper.h"
|
#include "yaml_helper.h"
|
||||||
|
|
||||||
|
#include "gtp_node.h"
|
||||||
|
#include "gtp_path.h"
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "fd_lib.h"
|
#include "fd_lib.h"
|
||||||
#include "gtp_path.h"
|
|
||||||
|
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "pgw_context.h"
|
#include "pgw_context.h"
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
#define __PGW_CONTEXT_H__
|
#define __PGW_CONTEXT_H__
|
||||||
|
|
||||||
#include "core_list.h"
|
#include "core_list.h"
|
||||||
|
#include "core_index.h"
|
||||||
#include "core_errno.h"
|
#include "core_errno.h"
|
||||||
#include "core_hash.h"
|
#include "core_hash.h"
|
||||||
|
#include "core_network.h"
|
||||||
|
#include "core_msgq.h"
|
||||||
|
#include "core_timer.h"
|
||||||
|
|
||||||
#include "gtp_types.h"
|
#include "gtp_types.h"
|
||||||
#include "gtp_xact.h"
|
#include "gtp_message.h"
|
||||||
|
|
||||||
#include "pgw_sm.h"
|
|
||||||
|
|
||||||
#define MAX_NUM_OF_UE_NETWORK 16
|
#define MAX_NUM_OF_UE_NETWORK 16
|
||||||
|
|
||||||
|
@ -16,6 +18,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
typedef struct _gtp_node_t gtp_node_t;
|
||||||
typedef gtp_node_t pgw_sgw_t;
|
typedef gtp_node_t pgw_sgw_t;
|
||||||
|
|
||||||
typedef struct _pgw_context_t {
|
typedef struct _pgw_context_t {
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
#include "core_pool.h"
|
#include "core_pool.h"
|
||||||
#include "core_lib.h"
|
#include "core_lib.h"
|
||||||
|
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "fd_lib.h"
|
#include "fd_lib.h"
|
||||||
#include "gx_dict.h"
|
#include "gx_dict.h"
|
||||||
#include "gx_message.h"
|
#include "gx_message.h"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
typedef struct _gtp_xact_t gtp_xact_t;
|
||||||
|
|
||||||
CORE_DECLARE(int) pgw_fd_init(void);
|
CORE_DECLARE(int) pgw_fd_init(void);
|
||||||
CORE_DECLARE(void) pgw_fd_final(void);
|
CORE_DECLARE(void) pgw_fd_final(void);
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "core_pkbuf.h"
|
#include "core_pkbuf.h"
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
#include "gtp_node.h"
|
||||||
#include "gtp_path.h"
|
#include "gtp_path.h"
|
||||||
|
|
||||||
#include "pgw_context.h"
|
#include "pgw_context.h"
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
#include "core_debug.h"
|
#include "core_debug.h"
|
||||||
#include "core_thread.h"
|
#include "core_thread.h"
|
||||||
|
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "pgw_context.h"
|
#include "pgw_context.h"
|
||||||
#include "pgw_event.h"
|
#include "pgw_event.h"
|
||||||
|
#include "pgw_sm.h"
|
||||||
|
|
||||||
#include "pgw_fd_path.h"
|
#include "pgw_fd_path.h"
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "gtp_types.h"
|
#include "gtp_types.h"
|
||||||
|
#include "gtp_node.h"
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "sgw_context.h"
|
#include "sgw_context.h"
|
||||||
|
|
|
@ -2,21 +2,23 @@
|
||||||
#define __SGW_CONTEXT_H__
|
#define __SGW_CONTEXT_H__
|
||||||
|
|
||||||
#include "core_list.h"
|
#include "core_list.h"
|
||||||
|
#include "core_index.h"
|
||||||
#include "core_errno.h"
|
#include "core_errno.h"
|
||||||
#include "core_event.h"
|
#include "core_event.h"
|
||||||
#include "core_hash.h"
|
#include "core_hash.h"
|
||||||
|
#include "core_network.h"
|
||||||
|
|
||||||
#include "gtp_xact.h"
|
|
||||||
#include "gtp_types.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
#include "gtp_types.h"
|
||||||
#include "sgw_sm.h"
|
#include "gtp_message.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
typedef struct _sgw_tunnel_t sgw_tunnel_t;
|
typedef struct _sgw_tunnel_t sgw_tunnel_t;
|
||||||
|
|
||||||
|
typedef struct _gtp_node_t gtp_node_t;
|
||||||
typedef gtp_node_t sgw_mme_t;
|
typedef gtp_node_t sgw_mme_t;
|
||||||
typedef gtp_node_t sgw_pgw_t;
|
typedef gtp_node_t sgw_pgw_t;
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "gtp_types.h"
|
#include "gtp_types.h"
|
||||||
|
#include "gtp_node.h"
|
||||||
#include "gtp_path.h"
|
#include "gtp_path.h"
|
||||||
|
|
||||||
#include "sgw_context.h"
|
#include "sgw_context.h"
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
#include "core_debug.h"
|
#include "core_debug.h"
|
||||||
#include "core_thread.h"
|
#include "core_thread.h"
|
||||||
|
|
||||||
|
#include "gtp_xact.h"
|
||||||
|
|
||||||
#include "sgw_context.h"
|
#include "sgw_context.h"
|
||||||
|
#include "sgw_sm.h"
|
||||||
#include "sgw_event.h"
|
#include "sgw_event.h"
|
||||||
|
|
||||||
static thread_id sgw_thread;
|
static thread_id sgw_thread;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "gtp_types.h"
|
#include "gtp_types.h"
|
||||||
#include "gtp_conv.h"
|
#include "gtp_conv.h"
|
||||||
|
#include "gtp_node.h"
|
||||||
|
|
||||||
#include "sgw_event.h"
|
#include "sgw_event.h"
|
||||||
#include "sgw_context.h"
|
#include "sgw_context.h"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "sgw_context.h"
|
#include "sgw_context.h"
|
||||||
#include "sgw_event.h"
|
#include "sgw_event.h"
|
||||||
|
#include "sgw_sm.h"
|
||||||
#include "sgw_gtp_path.h"
|
#include "sgw_gtp_path.h"
|
||||||
#include "sgw_s11_handler.h"
|
#include "sgw_s11_handler.h"
|
||||||
#include "sgw_s5c_handler.h"
|
#include "sgw_s5c_handler.h"
|
||||||
|
|
|
@ -4,11 +4,16 @@
|
||||||
#include "core_pkbuf.h"
|
#include "core_pkbuf.h"
|
||||||
#include "core_lib.h"
|
#include "core_lib.h"
|
||||||
|
|
||||||
#include "mme_context.h"
|
|
||||||
#include "s1ap_build.h"
|
#include "s1ap_build.h"
|
||||||
#include "s1ap_conv.h"
|
#include "s1ap_conv.h"
|
||||||
#include "s1ap_path.h"
|
#include "s1ap_path.h"
|
||||||
|
|
||||||
|
#include "gtp_message.h"
|
||||||
|
#include "gtp_node.h"
|
||||||
|
#include "gtp_path.h"
|
||||||
|
|
||||||
|
#include "mme_context.h"
|
||||||
|
|
||||||
extern int test_only_control_plane;
|
extern int test_only_control_plane;
|
||||||
|
|
||||||
status_t tests1ap_enb_connect(sock_id *new)
|
status_t tests1ap_enb_connect(sock_id *new)
|
||||||
|
|
Loading…
Reference in New Issue