name changes

This commit is contained in:
Sukchan Lee 2017-11-25 23:28:34 +09:00
parent 7d7e9f154b
commit 92fc35861f
17 changed files with 110 additions and 111 deletions

View File

@ -14,16 +14,16 @@ extern "C" {
#define SCTP_S1AP_PPID 18
#define SCTP_X2AP_PPID 27
#define MAX_NUM_OF_S1AP_SERVER 4
#define MAX_NUM_OF_GTP_SERVER 4
#define MAX_NUM_OF_GTP_CLIENT 16
#define MAX_NUM_OF_ENB 128
#define MAX_NUM_OF_UE 128
#define MAX_NUM_OF_SESS 4
#define MAX_NUM_OF_BEARER 4
#define MAX_NUM_OF_TUNNEL 3 /* Num of Tunnel per Bearer */
#define MAX_NUM_OF_PF 16 /* Num of Packet Filter per Bearer */
#define MAX_NUM_OF_GTP_NODE 8
#define MAX_NUM_OF_SERVER 8
#define MAX_NUM_OF_CLINET 8
#define MAX_POOL_OF_UE (MAX_NUM_OF_ENB * MAX_NUM_OF_UE)
#define MAX_POOL_OF_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS)

View File

@ -171,8 +171,8 @@ CORE_DECLARE(status_t) core_getaddrinfo(c_sockaddr_t **sa,
CORE_DECLARE(status_t) core_freeaddrinfo(c_sockaddr_t *sa);
#define CORE_ADDRSTRLEN INET6_ADDRSTRLEN
#define CORE_NTOP(__aDDR, __bUF) \
core_inet_ntop((c_sockaddr_t *)__aDDR, buf, CORE_ADDRSTRLEN)
#define CORE_ADDR(__aDDR, __bUF) \
core_inet_ntop(__aDDR, buf, CORE_ADDRSTRLEN)
#define CORE_PORT(__aDDR) \
ntohs((__aDDR)->c_sa_port)
CORE_DECLARE(const char *)core_inet_ntop(c_sockaddr_t *sockaddr,

View File

@ -105,13 +105,13 @@ status_t sock_bind(sock_id id, c_sockaddr_t *sa)
if (bind(sock->fd, &sa->sa, addrlen) != 0)
{
d_error("socket bind(%s:%d) failed(%d:%s)",
CORE_NTOP(sa, buf), CORE_PORT(sa), errno, strerror(errno));
CORE_ADDR(sa, buf), CORE_PORT(sa), errno, strerror(errno));
return CORE_ERROR;
}
memcpy(&sock->local_addr, sa, sizeof(sock->local_addr));
d_trace(1, "socket bind %s:%d\n", CORE_NTOP(sa, buf), CORE_PORT(sa));
d_trace(1, "socket bind %s:%d\n", CORE_ADDR(sa, buf), CORE_PORT(sa));
return CORE_OK;
}
@ -131,13 +131,13 @@ status_t sock_connect(sock_id id, c_sockaddr_t *sa)
if (connect(sock->fd, &sa->sa, addrlen) != 0)
{
d_error("socket connect(%s:%d) failed(%d:%s)",
CORE_NTOP(sa, buf), CORE_PORT(sa), errno, strerror(errno));
CORE_ADDR(sa, buf), CORE_PORT(sa), errno, strerror(errno));
return CORE_ERROR;
}
memcpy(&sock->remote_addr, sa, sizeof(sock->remote_addr));
d_trace(1, "socket connect %s:%d\n", CORE_NTOP(sa, buf), CORE_PORT(sa));
d_trace(1, "socket connect %s:%d\n", CORE_ADDR(sa, buf), CORE_PORT(sa));
return CORE_OK;
}
@ -512,7 +512,7 @@ status_t core_getaddrinfo(c_sockaddr_t **sa,
new_sa = core_calloc(1, sizeof(c_sockaddr_t));
memcpy(&new_sa->sa, ai->ai_addr, ai->ai_addrlen);
new_sa->c_sa_port = htons(port);
d_trace(3, "addr:%s, port:%d\n", CORE_NTOP(new_sa, buf), port);
d_trace(3, "addr:%s, port:%d\n", CORE_ADDR(new_sa, buf), port);
if (!prev_sa)
*sa = new_sa;

View File

@ -24,11 +24,11 @@ status_t tcp_server(sock_id *new,
d_assert(sock_setsockopt(*new, SOCK_O_REUSEADDR, 1) == CORE_OK,
return CORE_ERROR,
"setsockopt(%s:%d) failed(%d:%s)",
CORE_NTOP(sa, buf), port, errno, strerror(errno));
CORE_ADDR(sa, buf), port, errno, strerror(errno));
if (sock_bind(*new, sa) == CORE_OK)
{
d_trace(1, "tcp bind %s:%d\n", CORE_NTOP(sa, buf), port);
d_trace(1, "tcp bind %s:%d\n", CORE_ADDR(sa, buf), port);
break;
}
@ -74,7 +74,7 @@ status_t tcp_client(sock_id *new,
if (sock_connect(*new, sa) == CORE_OK)
{
d_trace(1, "tcp connect %s:%d\n", CORE_NTOP(sa, buf), port);
d_trace(1, "tcp connect %s:%d\n", CORE_ADDR(sa, buf), port);
break;
}

View File

@ -33,11 +33,11 @@ status_t udp_server(sock_id *new,
d_assert(sock_setsockopt(*new, SOCK_O_REUSEADDR, 1) == CORE_OK,
return CORE_ERROR,
"setsockopt(%s:%d) failed(%d:%s)",
CORE_NTOP(sa, buf), port, errno, strerror(errno));
CORE_ADDR(sa, buf), port, errno, strerror(errno));
if (sock_bind(*new, sa) == CORE_OK)
{
d_trace(1, "udp bind %s:%d\n", CORE_NTOP(sa, buf), port);
d_trace(1, "udp bind %s:%d\n", CORE_ADDR(sa, buf), port);
break;
}
@ -80,7 +80,7 @@ status_t udp_client(sock_id *new,
if (sock_connect(*new, sa) == CORE_OK)
{
d_trace(1, "udp connect %s:%d\n", CORE_NTOP(sa, buf), port);
d_trace(1, "udp connect %s:%d\n", CORE_ADDR(sa, buf), port);
break;
}
@ -119,7 +119,7 @@ status_t udp_connect(sock_id id, const char *hostname, c_uint16_t port)
{
if (sock_connect(id, sa) == CORE_OK)
{
d_trace(1, "udp connect %s:%d\n", CORE_NTOP(sa, buf), port);
d_trace(1, "udp connect %s:%d\n", CORE_ADDR(sa, buf), port);
break;
}

View File

@ -133,7 +133,7 @@ static void sock_test3(abts_case *tc, void *data)
size = core_recvfrom(udp, str, STRLEN, 0, &sa);
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_NTOP(&sa, buf));
ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(&sa, buf));
thread_join(&rv, test3_thread);
ABTS_INT_EQUAL(tc, strlen(DATASTR), rv);
@ -185,7 +185,7 @@ static void sock_test4(abts_case *tc, void *data)
size = core_recvfrom(udp, str, STRLEN, 0, &sa);
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_NTOP(&sa, buf));
ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(&sa, buf));
size = core_sendto(udp, DATASTR, strlen(DATASTR), 0, &sa);
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
@ -246,7 +246,7 @@ static void sock_test5(abts_case *tc, void *data)
size = core_recvfrom(udp, str, STRLEN, 0, &sa);
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
ABTS_STR_EQUAL(tc, "::1", CORE_NTOP(&sa, buf));
ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(&sa, buf));
size = core_send(udp, DATASTR, strlen(DATASTR), 0);
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
@ -278,11 +278,11 @@ static void sock_test7(abts_case *tc, void *data)
rv = core_inet_pton(AF_INET, "127.0.0.1", &sa);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_NTOP(&sa, buf));
ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(&sa, buf));
rv = core_inet_pton(AF_INET6, "::1", &sa);
ABTS_INT_EQUAL(tc, CORE_OK, rv);
ABTS_STR_EQUAL(tc, "::1", CORE_NTOP(&sa, buf));
ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(&sa, buf));
}

View File

@ -27,7 +27,7 @@ status_t gtp_listen(sock_id *sock,
rv = sock_register(*sock, handler, NULL);
d_assert(rv == CORE_OK, return CORE_ERROR,);
d_trace(1, "gtp_listen() %s:%d\n", CORE_NTOP(&addr, buf), CORE_PORT(&addr));
d_trace(1, "gtp_listen() %s:%d\n", CORE_ADDR(&addr, buf), CORE_PORT(&addr));
return CORE_OK;
}
@ -133,7 +133,7 @@ status_t gtp_send(gtp_node_t *gnode, pkbuf_t *pkbuf)
sent = core_sendto(sock, pkbuf->payload, pkbuf->len, 0, &gnode->addr);
d_trace(50, "Sent %d->%d bytes to [%s:%d]\n", pkbuf->len, sent,
CORE_NTOP(&gnode->addr, buf), CORE_PORT(&gnode->addr));
CORE_ADDR(&gnode->addr, buf), CORE_PORT(&gnode->addr));
d_trace_hex(50, pkbuf->payload, pkbuf->len);
if (sent < 0 || sent != pkbuf->len)
{

View File

@ -116,7 +116,7 @@ gtp_xact_t *gtp_xact_local_create(
d_trace(3, "[%d] %s Create peer %s:%d\n",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
CORE_NTOP(&gnode->addr, buf), CORE_PORT(&gnode->addr));
CORE_ADDR(&gnode->addr, buf), CORE_PORT(&gnode->addr));
return xact;
}
@ -159,7 +159,7 @@ gtp_xact_t *gtp_xact_remote_create(gtp_node_t *gnode, c_uint32_t sqn)
d_trace(3, "[%d] %s Create peer %s:%d\n",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
CORE_NTOP(&gnode->addr, buf), CORE_PORT(&gnode->addr));
CORE_ADDR(&gnode->addr, buf), CORE_PORT(&gnode->addr));
return xact;
}
@ -198,7 +198,7 @@ status_t gtp_xact_update_tx(gtp_xact_t *xact,
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
hdesc->type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
stage = gtp_xact_get_stage(hdesc->type, xact->xid);
@ -212,7 +212,7 @@ status_t gtp_xact_update_tx(gtp_xact_t *xact,
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, hdesc->type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
break;
@ -225,7 +225,7 @@ status_t gtp_xact_update_tx(gtp_xact_t *xact,
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, hdesc->type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
break;
@ -247,7 +247,7 @@ status_t gtp_xact_update_tx(gtp_xact_t *xact,
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, hdesc->type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
break;
@ -291,7 +291,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
stage = gtp_xact_get_stage(type, xact->xid);
@ -313,7 +313,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
pkbuf = xact->seq[2].pkbuf;
@ -328,7 +328,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
rv = gtp_send(xact->gnode, pkbuf);
d_assert(rv == CORE_OK, return CORE_ERROR,
@ -342,7 +342,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
}
@ -354,7 +354,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
if (xact->tm_holding)
@ -368,7 +368,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
break;
@ -392,7 +392,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
pkbuf = xact->seq[1].pkbuf;
@ -407,7 +407,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
rv = gtp_send(xact->gnode, pkbuf);
d_assert(rv == CORE_OK, return CORE_ERROR,
@ -421,7 +421,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->org == GTP_LOCAL_ORIGINATOR ?
"LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
}
@ -433,7 +433,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
if (xact->tm_holding)
@ -450,7 +450,7 @@ status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
/* continue */
@ -491,7 +491,7 @@ status_t gtp_xact_commit(gtp_xact_t *xact)
d_trace(3, "[%d] %s Commit peer %s:%d\n",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
type = xact->seq[xact->step-1].type;
@ -508,7 +508,7 @@ status_t gtp_xact_commit(gtp_xact_t *xact)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
if (xact->tm_response)
@ -526,7 +526,7 @@ status_t gtp_xact_commit(gtp_xact_t *xact)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
if (xact->step == 2)
@ -554,7 +554,7 @@ status_t gtp_xact_commit(gtp_xact_t *xact)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
if (xact->tm_response)
@ -569,7 +569,7 @@ status_t gtp_xact_commit(gtp_xact_t *xact)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
if (xact->step == 3)
@ -613,7 +613,7 @@ status_t gtp_xact_timeout(index_t index, c_uintptr_t event)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, xact->seq[xact->step-1].type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
if (--xact->response_rcount > 0)
@ -636,7 +636,7 @@ status_t gtp_xact_timeout(index_t index, c_uintptr_t event)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, xact->seq[xact->step-1].type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
gtp_xact_delete(xact);
}
@ -648,7 +648,7 @@ status_t gtp_xact_timeout(index_t index, c_uintptr_t event)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, xact->seq[xact->step-1].type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
if (--xact->holding_rcount > 0)
@ -663,7 +663,7 @@ status_t gtp_xact_timeout(index_t index, c_uintptr_t event)
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
xact->step, xact->seq[xact->step-1].type,
CORE_NTOP(&xact->gnode->addr, buf),
CORE_ADDR(&xact->gnode->addr, buf),
CORE_PORT(&xact->gnode->addr));
gtp_xact_delete(xact);
}
@ -694,7 +694,7 @@ status_t gtp_xact_receive(
d_trace(3, "[%d] %s Receive peer %s:%d\n",
new->xid,
new->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
CORE_NTOP(&gnode->addr, buf), CORE_PORT(&gnode->addr));
CORE_ADDR(&gnode->addr, buf), CORE_PORT(&gnode->addr));
rv = gtp_xact_update_rx(new, h->type);
if (rv != CORE_OK)
@ -801,7 +801,7 @@ gtp_xact_t *gtp_xact_find_by_xid(
d_trace(3, "[%d] %s Find peer %s:%d\n",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
CORE_NTOP(&gnode->addr, buf), CORE_PORT(&gnode->addr));
CORE_ADDR(&gnode->addr, buf), CORE_PORT(&gnode->addr));
}
return xact;
@ -841,7 +841,7 @@ static status_t gtp_xact_delete(gtp_xact_t *xact)
d_trace(3, "[%d] %s Delete peer %s:%d\n",
xact->xid,
xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE",
CORE_NTOP(&xact->gnode->addr, buf), CORE_PORT(&xact->gnode->addr));
CORE_ADDR(&xact->gnode->addr, buf), CORE_PORT(&xact->gnode->addr));
if (xact->seq[0].pkbuf)
pkbuf_free(xact->seq[0].pkbuf);

View File

@ -19,11 +19,10 @@
static mme_context_t self;
pool_declare(mme_s1ap_pool, mme_s1ap_t, MAX_NUM_OF_SERVER);
pool_declare(mme_s1ap_pool, mme_s1ap_t, MAX_NUM_OF_S1AP_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_CLINET);
index_declare(mme_enb_pool, mme_enb_t, MAX_NUM_OF_ENB);
index_declare(mme_ue_pool, mme_ue_t, MAX_POOL_OF_UE);
index_declare(enb_ue_pool, enb_ue_t, MAX_POOL_OF_UE);
index_declare(mme_sess_pool, mme_sess_t, MAX_POOL_OF_SESS);
@ -39,9 +38,9 @@ status_t mme_context_init()
/* Initialize MME context */
memset(&self, 0, sizeof(mme_context_t));
pool_init(&mme_s1ap_pool, MAX_NUM_OF_SERVER);
pool_init(&mme_s1ap_pool, MAX_NUM_OF_S1AP_SERVER);
list_init(&self.s1ap_list);
pool_init(&mme_sgw_pool, MAX_NUM_OF_CLINET);
pool_init(&mme_sgw_pool, MAX_NUM_OF_GTP_CLIENT);
list_init(&self.sgw_list);
index_init(&mme_enb_pool, MAX_NUM_OF_ENB);
@ -285,7 +284,7 @@ status_t mme_context_parse_config()
d_assert(s1ap_index_key, return CORE_ERROR,);
if (BSON_ITER_HOLDS_ARRAY(&mme_iter))
s1ap_index = atoi(s1ap_index_key);
d_assert(s1ap_index < MAX_NUM_OF_SERVER,
d_assert(s1ap_index < MAX_NUM_OF_S1AP_SERVER,
return CORE_ERROR,
"GTP NODE Overflow : %d", s1ap_index);
@ -831,7 +830,7 @@ status_t mme_context_parse_config()
d_assert(network_index_key, return CORE_ERROR,);
if (BSON_ITER_HOLDS_ARRAY(&sgw_iter))
network_index = atoi(network_index_key);
d_assert(network_index < MAX_NUM_OF_CLINET,
d_assert(network_index < MAX_NUM_OF_GTP_CLIENT,
return CORE_ERROR,
"GTP NODE Overflow : %d", network_index);

View File

@ -86,7 +86,7 @@ void mme_state_operational(fsm_t *s, event_t *e)
mme_enb_t *enb = NULL;
d_trace(1, "eNB-S1 accepted[%s] in master_sm module\n",
CORE_NTOP(addr, buf));
CORE_ADDR(addr, buf));
enb = mme_enb_find_by_addr(addr);
if (!enb)
@ -102,7 +102,7 @@ void mme_state_operational(fsm_t *s, event_t *e)
else
{
d_warn("eNB context duplicated with IP-address [%s]!!!",
CORE_NTOP(addr, buf));
CORE_ADDR(addr, buf));
sock_delete(sock);
d_warn("S1 Socket Closed");
}

View File

@ -143,7 +143,7 @@ status_t s1ap_build_downlink_nas_transport(
d_trace(3, "[S1AP] downlinkNASTransport : "
"UE[eNB-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
CORE_ADDR(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
return CORE_OK;
}
@ -302,7 +302,7 @@ status_t s1ap_build_initial_context_setup_request(
d_trace(3, "[S1AP] Initial Context Setup Request : "
"UE[eNB-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
CORE_ADDR(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
if (emmbuf && emmbuf->len)
{
@ -402,7 +402,7 @@ status_t s1ap_build_e_rab_setup_request(
d_trace(3, "[S1AP] E-RAB Setup Request : "
"UE[eNB-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
CORE_ADDR(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
pkbuf_free(esmbuf);
@ -470,7 +470,7 @@ status_t s1ap_build_e_rab_release_command(pkbuf_t **s1apbuf,
d_trace(3, "[S1AP] E-RAB Release Command : "
"UE[eNB-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
CORE_ADDR(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
pkbuf_free(esmbuf);
@ -526,7 +526,7 @@ status_t s1ap_build_ue_context_release_commmand(
d_trace(3, "[S1AP] UE Context Release Command : "
"UE[mME-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
enb_ue->mme_ue_s1ap_id,
CORE_NTOP(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
CORE_ADDR(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
return CORE_OK;
}
@ -633,7 +633,7 @@ status_t s1ap_build_path_switch_ack(pkbuf_t **s1apbuf, mme_ue_t *mme_ue)
d_trace(3, "[S1AP] Path Switch Ack : "
"UE[mME-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
enb_ue->mme_ue_s1ap_id,
CORE_NTOP(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
CORE_ADDR(enb_ue->enb->addr, buf), enb_ue->enb->enb_id);
return CORE_OK;
}
@ -772,7 +772,7 @@ status_t s1ap_build_handover_command(pkbuf_t **s1apbuf, enb_ue_t *source_ue)
d_trace(3, "[S1AP] Handover Command : ",
"UE[mME-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
source_ue->mme_ue_s1ap_id,
CORE_NTOP(&source_ue->enb->addr, buf), source_ue->enb->enb_id);
CORE_ADDR(source_ue->enb->addr, buf), source_ue->enb->enb_id);
return CORE_OK;
}
@ -804,7 +804,7 @@ status_t s1ap_build_handover_preparation_failure(
d_trace(3, "[S1AP] Handover Preparation Failure : ",
"UE[mME-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
source_ue->mme_ue_s1ap_id,
CORE_NTOP(&source_ue->enb->addr, buf), source_ue->enb->enb_id);
CORE_ADDR(source_ue->enb->addr, buf), source_ue->enb->enb_id);
return CORE_OK;
}
@ -946,7 +946,7 @@ status_t s1ap_build_handover_request(
d_trace(3, "[S1AP] Handover Request : ",
"UE[mME-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
target_ue->mme_ue_s1ap_id,
CORE_NTOP(target_ue->enb->addr, buf), target_ue->enb->enb_id);
CORE_ADDR(target_ue->enb->addr, buf), target_ue->enb->enb_id);
return CORE_OK;
}
@ -978,7 +978,7 @@ status_t s1ap_build_handover_cancel_ack(pkbuf_t **s1apbuf, enb_ue_t *source_ue)
d_trace(3, "[S1AP] Handover Cancel Ack : ",
"UE[mME-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
source_ue->mme_ue_s1ap_id,
CORE_NTOP(&source_ue->enb->addr, buf), source_ue->enb->enb_id);
CORE_ADDR(source_ue->enb->addr, buf), source_ue->enb->enb_id);
return CORE_OK;
}
@ -1030,7 +1030,7 @@ status_t s1ap_build_mme_status_transfer(pkbuf_t **s1apbuf,
d_trace(3, "[S1AP] MME Status Transfer : ",
"UE[mME-UE-S1AP-ID(%d)] <-- eNB[%s:%d]\n",
target_ue->mme_ue_s1ap_id,
CORE_NTOP(target_ue->enb->addr, buf), target_ue->enb->enb_id);
CORE_ADDR(target_ue->enb->addr, buf), target_ue->enb->enb_id);
return CORE_OK;
}

View File

@ -66,7 +66,7 @@ void s1ap_handle_s1_setup_request(mme_enb_t *enb, s1ap_message_t *message)
d_assert(enb->sock, return,);
d_trace(3, "[S1AP] S1SetupRequest : eNB[%s:%d] --> MME\n",
CORE_NTOP(enb->addr, buf), enb_id);
CORE_ADDR(enb->addr, buf), enb_id);
d_assert(mme_enb_set_enb_id(enb, enb_id) == CORE_OK,
return, "hash add error");
@ -77,7 +77,7 @@ void s1ap_handle_s1_setup_request(mme_enb_t *enb, s1ap_message_t *message)
d_assert(enb->sock, return,);
d_trace(3, "[S1AP] S1SetupResponse: eNB[%s:%d] <-- MME\n",
CORE_NTOP(enb->addr, buf), enb_id);
CORE_ADDR(enb->addr, buf), enb_id);
}
void s1ap_handle_initial_ue_message(mme_enb_t *enb, s1ap_message_t *message)
@ -166,7 +166,7 @@ void s1ap_handle_initial_ue_message(mme_enb_t *enb, s1ap_message_t *message)
d_trace(3, "[S1AP] InitialUEMessage : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
d_assert(s1ap_send_to_nas(enb_ue, &ies->nas_pdu) == CORE_OK,,
"s1ap_send_to_nas failed");
@ -189,7 +189,7 @@ void s1ap_handle_uplink_nas_transport(
d_trace(3, "[S1AP] uplinkNASTransport : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
d_assert(s1ap_send_to_nas(enb_ue, &ies->nas_pdu) == CORE_OK,,
"s1ap_send_to_nas failed");
@ -242,7 +242,7 @@ void s1ap_handle_ue_capability_info_indication(
d_trace(3, "[S1AP] UE Capability Info Indication : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
}
void s1ap_handle_initial_context_setup_response(
@ -267,7 +267,7 @@ void s1ap_handle_initial_context_setup_response(
d_trace(3, "[S1AP] Initial Context Setup Response : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
for (i = 0; i < ies->e_RABSetupListCtxtSURes.
s1ap_E_RABSetupItemCtxtSURes.count; i++)
@ -327,7 +327,7 @@ void s1ap_handle_e_rab_setup_response(
d_trace(3, "[S1AP] E-RAB Setup Response : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
for (i = 0; i < ies->e_RABSetupListBearerSURes.
s1ap_E_RABSetupItemBearerSURes.count; i++)
@ -388,7 +388,7 @@ void s1ap_handle_ue_context_release_request(
d_trace(3, "[S1AP] UE Context Release Request : "
"UE[mME-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
enb_ue->mme_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
switch(ies->cause.present)
{
@ -466,7 +466,7 @@ void s1ap_handle_ue_context_release_complete(
d_trace(3, "[S1AP] UE Context Release Complete : "
"UE[mME-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
enb_ue->mme_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
enb_ue_remove(enb_ue);
@ -593,7 +593,7 @@ void s1ap_handle_path_switch_request(
{
d_error("Cannot find UE from sourceMME-UE-S1AP-ID[%d] and eNB[%s:%d]",
ies->sourceMME_UE_S1AP_ID,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
cause.present = S1ap_Cause_PR_radioNetwork;
cause.choice.radioNetwork =
@ -675,7 +675,7 @@ void s1ap_handle_path_switch_request(
d_trace(3, "[S1AP] PathSwitchRequest : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
enb_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
}
void s1ap_handle_handover_required(mme_enb_t *enb, s1ap_message_t *message)
@ -697,7 +697,7 @@ void s1ap_handle_handover_required(mme_enb_t *enb, s1ap_message_t *message)
d_assert(source_ue, return,
"Cannot find UE for eNB-UE-S1AP-ID[%d] and eNB[%s:%d]",
ies->eNB_UE_S1AP_ID,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
d_assert(source_ue->mme_ue_s1ap_id == ies->mme_ue_s1ap_id, return,
"Conflict MME-UE-S1AP-ID : %d != %d\n",
source_ue->mme_ue_s1ap_id, ies->mme_ue_s1ap_id);
@ -726,7 +726,7 @@ void s1ap_handle_handover_required(mme_enb_t *enb, s1ap_message_t *message)
d_trace(3, "[S1AP] Handover Required : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
source_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
}
void s1ap_handle_handover_request_ack(mme_enb_t *enb, s1ap_message_t *message)
@ -750,7 +750,7 @@ void s1ap_handle_handover_request_ack(mme_enb_t *enb, s1ap_message_t *message)
d_assert(target_ue, return,
"Cannot find UE for MME-UE-S1AP-ID[%d] and eNB[%s:%d]",
ies->mme_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
target_ue->enb_ue_s1ap_id = ies->eNB_UE_S1AP_ID;
@ -819,7 +819,7 @@ void s1ap_handle_handover_request_ack(mme_enb_t *enb, s1ap_message_t *message)
d_trace(3, "[S1AP] Handover Request Ack : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
target_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
}
void s1ap_handle_handover_failure(mme_enb_t *enb, s1ap_message_t *message)
@ -841,7 +841,7 @@ void s1ap_handle_handover_failure(mme_enb_t *enb, s1ap_message_t *message)
d_assert(target_ue, return,
"Cannot find UE for MME-UE-S1AP-ID[%d] and eNB[%s:%d]",
ies->mme_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
source_ue = target_ue->source_ue;
d_assert(source_ue, return,);
@ -857,7 +857,7 @@ void s1ap_handle_handover_failure(mme_enb_t *enb, s1ap_message_t *message)
d_trace(3, "[S1AP] Handover Failure : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
target_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
}
void s1ap_handle_handover_cancel(mme_enb_t *enb, s1ap_message_t *message)
@ -880,7 +880,7 @@ void s1ap_handle_handover_cancel(mme_enb_t *enb, s1ap_message_t *message)
d_assert(source_ue, return,
"Cannot find UE for eNB-UE-S1AP-ID[%d] and eNB[%s:%d]",
ies->eNB_UE_S1AP_ID,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
d_assert(source_ue->mme_ue_s1ap_id == ies->mme_ue_s1ap_id, return,
"Conflict MME-UE-S1AP-ID : %d != %d\n",
source_ue->mme_ue_s1ap_id, ies->mme_ue_s1ap_id);
@ -900,7 +900,7 @@ void s1ap_handle_handover_cancel(mme_enb_t *enb, s1ap_message_t *message)
d_trace(3, "[S1AP] Handover Cancel : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n",
source_ue->enb_ue_s1ap_id,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
}
void s1ap_handle_enb_status_transfer(mme_enb_t *enb, s1ap_message_t *message)
@ -921,7 +921,7 @@ void s1ap_handle_enb_status_transfer(mme_enb_t *enb, s1ap_message_t *message)
d_assert(source_ue, return,
"Cannot find UE for eNB-UE-S1AP-ID[%d] and eNB[%s:%d]",
ies->eNB_UE_S1AP_ID,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
d_assert(source_ue->mme_ue_s1ap_id == ies->mme_ue_s1ap_id, return,
"Conflict MME-UE-S1AP-ID : %d != %d\n",
source_ue->mme_ue_s1ap_id, ies->mme_ue_s1ap_id);
@ -974,7 +974,7 @@ void s1ap_handle_handover_notification(mme_enb_t *enb, s1ap_message_t *message)
d_assert(target_ue, return,
"Cannot find UE for eNB-UE-S1AP-ID[%d] and eNB[%s:%d]",
ies->eNB_UE_S1AP_ID,
CORE_NTOP(enb->addr, buf), enb->enb_id);
CORE_ADDR(enb->addr, buf), enb->enb_id);
d_assert(target_ue->mme_ue_s1ap_id == ies->mme_ue_s1ap_id, return,
"Conflict MME-UE-S1AP-ID : %d != %d\n",
target_ue->mme_ue_s1ap_id, ies->mme_ue_s1ap_id);

View File

@ -35,7 +35,7 @@ status_t s1ap_server(sock_id *new,
addr = sock_local_addr_get(*new);
d_assert(addr, return CORE_ERROR,);
d_trace(1, "s1ap_server [%s]:%d\n", CORE_NTOP(addr, buf), CORE_PORT(addr));
d_trace(1, "s1ap_server [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr));
return CORE_OK;
}
@ -106,7 +106,7 @@ static int s1ap_accept_handler(sock_id id, void *data)
memcpy(addr, sock_remote_addr_get(new), sizeof(c_sockaddr_t));
d_trace(1, "eNB-S1 accepted[%s]:%d in s1_path module\n",
CORE_NTOP(addr, buf), CORE_PORT(addr));
CORE_ADDR(addr, buf), CORE_PORT(addr));
event_set(&e, MME_EVT_S1AP_LO_ACCEPT);
event_set_param1(&e, (c_uintptr_t)new);

View File

@ -84,7 +84,7 @@ status_t s1ap_server(sock_id *new,
if (s1ap_usrsctp_bind(*new, sa) == CORE_OK)
{
d_trace(1, "s1ap_server [%s]:%d\n", CORE_NTOP(sa, buf), port);
d_trace(1, "s1ap_server [%s]:%d\n", CORE_ADDR(sa, buf), port);
break;
}
@ -126,7 +126,7 @@ status_t s1ap_client(sock_id *new,
if (s1ap_usrsctp_connect(*new, sa) == CORE_OK)
{
d_trace(1, "s1ap_client [%s]:%d\n", CORE_NTOP(sa, buf), port);
d_trace(1, "s1ap_client [%s]:%d\n", CORE_ADDR(sa, buf), port);
break;
}
@ -278,11 +278,11 @@ static status_t s1ap_usrsctp_bind(sock_id id, c_sockaddr_t *sa)
if (usrsctp_bind(sock, &sa->sa, addrlen) != 0)
{
d_error("usrsctp_bind [%s]:%d failed",
CORE_NTOP(sa, buf), CORE_PORT(sa));
CORE_ADDR(sa, buf), CORE_PORT(sa));
return CORE_ERROR;
}
d_trace(3, "usrsctp_bind [%s]:%d\n", CORE_NTOP(sa, buf), CORE_PORT(sa));
d_trace(3, "usrsctp_bind [%s]:%d\n", CORE_ADDR(sa, buf), CORE_PORT(sa));
return CORE_OK;
}
@ -301,11 +301,11 @@ static status_t s1ap_usrsctp_connect(sock_id id, c_sockaddr_t *sa)
if (usrsctp_connect(sock, &sa->sa, addrlen) != 0)
{
d_error("usrsctp_connect [%s]:%d", CORE_NTOP(sa, buf), CORE_PORT(sa));
d_error("usrsctp_connect [%s]:%d", CORE_ADDR(sa, buf), CORE_PORT(sa));
return CORE_ERROR;
}
d_trace(3, "usrsctp_connect [%s]:%d\n", CORE_NTOP(sa, buf), CORE_PORT(sa));
d_trace(3, "usrsctp_connect [%s]:%d\n", CORE_ADDR(sa, buf), CORE_PORT(sa));
return CORE_OK;
}

View File

@ -13,7 +13,7 @@
static pgw_context_t self;
pool_declare(pgw_sgw_pool, pgw_sgw_t, MAX_NUM_OF_GTP_NODE);
pool_declare(pgw_sgw_pool, pgw_sgw_t, MAX_NUM_OF_GTP_CLIENT);
index_declare(pgw_sess_pool, pgw_sess_t, MAX_POOL_OF_SESS);
index_declare(pgw_bearer_pool, pgw_bearer_t, MAX_POOL_OF_BEARER);
@ -30,7 +30,7 @@ status_t pgw_context_init()
memset(&self, 0, sizeof(pgw_context_t));
pool_init(&pgw_sgw_pool, MAX_NUM_OF_GTP_NODE);
pool_init(&pgw_sgw_pool, MAX_NUM_OF_GTP_CLIENT);
list_init(&self.sgw_list);
index_init(&pgw_sess_pool, MAX_POOL_OF_SESS);
@ -251,7 +251,7 @@ status_t pgw_context_parse_config()
d_assert(ue_network_index_key, return CORE_ERROR,);
if (BSON_ITER_HOLDS_ARRAY(&pgw_iter))
ue_network_index = atoi(ue_network_index_key);
d_assert(ue_network_index < MAX_NUM_OF_GTP_NODE,
d_assert(ue_network_index < MAX_NUM_OF_GTP_CLIENT,
return CORE_ERROR,
"GTP NODE Overflow : %d", ue_network_index);

View File

@ -67,7 +67,7 @@ static int _gtpv1_tun_recv_cb(sock_id sock, void *data)
gnode.sock = pgw_self()->gtpu_sock;
d_trace(50, "Send S5U PDU (teid = 0x%x)to SGW(%s)\n",
bearer->sgw_s5u_teid,
CORE_NTOP(&gnode.addr, buf));
CORE_ADDR(&gnode.addr, buf));
rv = gtp_send(&gnode, recvbuf);
}

View File

@ -12,8 +12,8 @@
#include "context.h"
#include "sgw_context.h"
pool_declare(sgw_mme_pool, sgw_mme_t, MAX_NUM_OF_GTP_NODE);
pool_declare(sgw_pgw_pool, sgw_pgw_t, MAX_NUM_OF_GTP_NODE);
pool_declare(sgw_mme_pool, sgw_mme_t, MAX_NUM_OF_GTP_CLIENT);
pool_declare(sgw_pgw_pool, sgw_pgw_t, MAX_NUM_OF_GTP_CLIENT);
static sgw_context_t self;
@ -31,9 +31,9 @@ status_t sgw_context_init()
memset(&self, 0, sizeof(sgw_context_t));
pool_init(&sgw_mme_pool, MAX_NUM_OF_GTP_NODE);
pool_init(&sgw_mme_pool, MAX_NUM_OF_GTP_CLIENT);
list_init(&self.mme_list);
pool_init(&sgw_pgw_pool, MAX_NUM_OF_GTP_NODE);
pool_init(&sgw_pgw_pool, MAX_NUM_OF_GTP_CLIENT);
list_init(&self.pgw_list);
index_init(&sgw_ue_pool, MAX_POOL_OF_UE);