forked from acouzens/open5gs
Change SCTP interface
This commit is contained in:
parent
335e8513e9
commit
241efaf581
|
@ -37,7 +37,7 @@ void ogs_sctp_set_num_ostreams(int sctp_streams)
|
|||
sctp_num_ostreams = sctp_streams;
|
||||
}
|
||||
|
||||
ogs_sock_t *ogs_sctp_socket(int family, int type)
|
||||
ogs_sock_t *ogs_sctp_socket(int family, int type, ogs_socknode_t *node)
|
||||
{
|
||||
ogs_sock_t *new = NULL;
|
||||
int rv;
|
||||
|
@ -75,16 +75,19 @@ ogs_sock_t *ogs_sctp_socket(int family, int type)
|
|||
return new;
|
||||
}
|
||||
|
||||
ogs_sock_t *ogs_sctp_server(int type, ogs_sockaddr_t *sa_list)
|
||||
ogs_sock_t *ogs_sctp_server(int type, ogs_socknode_t *node)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *new;
|
||||
ogs_sockaddr_t *addr;
|
||||
char buf[OGS_ADDRSTRLEN];
|
||||
|
||||
addr = sa_list;
|
||||
ogs_assert(node);
|
||||
ogs_assert(node->addr);
|
||||
|
||||
addr = node->addr;
|
||||
while (addr) {
|
||||
new = ogs_sctp_socket(addr->ogs_sa_family, type);
|
||||
new = ogs_sctp_socket(addr->ogs_sa_family, type, node);
|
||||
if (new) {
|
||||
rv = ogs_listen_reusable(new->fd);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
|
@ -104,25 +107,30 @@ ogs_sock_t *ogs_sctp_server(int type, ogs_sockaddr_t *sa_list)
|
|||
if (addr == NULL) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
||||
"sctp_server() [%s]:%d failed",
|
||||
OGS_ADDR(sa_list, buf), OGS_PORT(sa_list));
|
||||
OGS_ADDR(node->addr, buf), OGS_PORT(node->addr));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rv = ogs_sock_listen(new);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
|
||||
node->sock = new;
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
ogs_sock_t *ogs_sctp_client(int type, ogs_sockaddr_t *sa_list)
|
||||
ogs_sock_t *ogs_sctp_client(int type, ogs_socknode_t *node)
|
||||
{
|
||||
ogs_sock_t *new = NULL;
|
||||
ogs_sockaddr_t *addr;
|
||||
char buf[OGS_ADDRSTRLEN];
|
||||
|
||||
addr = sa_list;
|
||||
ogs_assert(node);
|
||||
ogs_assert(node->addr);
|
||||
|
||||
addr = node->addr;
|
||||
while (addr) {
|
||||
new = ogs_sctp_socket(addr->ogs_sa_family, type);
|
||||
new = ogs_sctp_socket(addr->ogs_sa_family, type, node);
|
||||
if (new) {
|
||||
if (ogs_sock_connect(new, addr) == OGS_OK) {
|
||||
ogs_debug("sctp_client() [%s]:%d",
|
||||
|
@ -139,10 +147,12 @@ ogs_sock_t *ogs_sctp_client(int type, ogs_sockaddr_t *sa_list)
|
|||
if (addr == NULL) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
||||
"sctp_client() [%s]:%d failed",
|
||||
OGS_ADDR(sa_list, buf), OGS_PORT(sa_list));
|
||||
OGS_ADDR(node->addr, buf), OGS_PORT(node->addr));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
node->sock = new;
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,9 +39,9 @@ typedef struct ogs_sctp_info_s {
|
|||
|
||||
void ogs_sctp_set_num_ostreams(int sctp_streams);
|
||||
|
||||
ogs_sock_t *ogs_sctp_socket(int family, int type);
|
||||
ogs_sock_t *ogs_sctp_server(int type, ogs_sockaddr_t *sa_list);
|
||||
ogs_sock_t *ogs_sctp_client(int type, ogs_sockaddr_t *sa_list);
|
||||
ogs_sock_t *ogs_sctp_socket(int family, int type, ogs_socknode_t *node);
|
||||
ogs_sock_t *ogs_sctp_server(int type, ogs_socknode_t *node);
|
||||
ogs_sock_t *ogs_sctp_client(int type, ogs_socknode_t *node);
|
||||
int ogs_sctp_connect(ogs_sock_t *sock, ogs_sockaddr_t *sa_list);
|
||||
int ogs_sctp_sendmsg(ogs_sock_t *sock, const void *msg, size_t len,
|
||||
ogs_sockaddr_t *to, uint32_t ppid, uint16_t stream_no);
|
||||
|
|
|
@ -23,7 +23,7 @@ void s1ap_server(ogs_socknode_t *snode, int type)
|
|||
|
||||
ogs_assert(snode);
|
||||
|
||||
snode->sock = ogs_sctp_server(type, snode->addr);
|
||||
ogs_sctp_server(type, snode);
|
||||
ogs_assert(snode->sock);
|
||||
|
||||
snode->poll = ogs_pollset_add(mme_self()->pollset,
|
||||
|
|
|
@ -39,42 +39,38 @@ int testpacket_final()
|
|||
return OGS_OK;
|
||||
}
|
||||
|
||||
ogs_sock_t *testenb_s1ap_client(const char *ipstr)
|
||||
ogs_socknode_t *testenb_s1ap_client(const char *ipstr)
|
||||
{
|
||||
int rv;
|
||||
ogs_sockaddr_t *addr = NULL;
|
||||
ogs_sock_t *sock = NULL;
|
||||
ogs_socknode_t *node = NULL;
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_UNSPEC, ipstr, S1AP_SCTP_PORT, 0);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
node = ogs_socknode_new(AF_UNSPEC, ipstr, S1AP_SCTP_PORT, 0);
|
||||
ogs_assert(node);
|
||||
|
||||
sock = ogs_sctp_client(SOCK_STREAM, addr);
|
||||
ogs_assert(sock);
|
||||
ogs_sctp_client(SOCK_STREAM, node);
|
||||
ogs_assert(node->sock);
|
||||
|
||||
ogs_freeaddrinfo(addr);
|
||||
|
||||
return sock;
|
||||
return node;
|
||||
}
|
||||
|
||||
ogs_pkbuf_t *testenb_s1ap_read(ogs_sock_t *sock)
|
||||
ogs_pkbuf_t *testenb_s1ap_read(ogs_socknode_t *node)
|
||||
{
|
||||
ogs_pkbuf_t *recvbuf = NULL;
|
||||
recvbuf = ogs_pkbuf_alloc(NULL, MAX_SDU_LEN);
|
||||
ogs_pkbuf_put(recvbuf, MAX_SDU_LEN);
|
||||
ogs_assert(OGS_OK == s1ap_recv(sock, recvbuf));
|
||||
ogs_assert(OGS_OK == s1ap_recv(node->sock, recvbuf));
|
||||
|
||||
return recvbuf;
|
||||
}
|
||||
|
||||
int testenb_s1ap_send(ogs_sock_t *sock, ogs_pkbuf_t *sendbuf)
|
||||
int testenb_s1ap_send(ogs_socknode_t *node, ogs_pkbuf_t *sendbuf)
|
||||
{
|
||||
return s1ap_send(sock, sendbuf, NULL, 0);
|
||||
return s1ap_send(node->sock, sendbuf, NULL, 0);
|
||||
}
|
||||
|
||||
int testenb_s1ap_close(ogs_sock_t *sock)
|
||||
void testenb_s1ap_close(ogs_socknode_t *node)
|
||||
{
|
||||
s1ap_closesocket(sock);
|
||||
return OGS_OK;
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
ogs_socknode_t *testenb_gtpu_server(const char *ipstr)
|
||||
|
|
|
@ -10,10 +10,10 @@ extern "C" {
|
|||
int testpacket_init();
|
||||
int testpacket_final();
|
||||
|
||||
ogs_sock_t *testenb_s1ap_client(const char *ipstr);
|
||||
ogs_pkbuf_t *testenb_s1ap_read(ogs_sock_t *sock);
|
||||
int testenb_s1ap_send(ogs_sock_t *sock, ogs_pkbuf_t *sendbuf);
|
||||
int testenb_s1ap_close(ogs_sock_t *sock);
|
||||
ogs_socknode_t *testenb_s1ap_client(const char *ipstr);
|
||||
ogs_pkbuf_t *testenb_s1ap_read(ogs_socknode_t *node);
|
||||
int testenb_s1ap_send(ogs_socknode_t *node, ogs_pkbuf_t *sendbuf);
|
||||
void testenb_s1ap_close(ogs_socknode_t *node);
|
||||
|
||||
ogs_socknode_t *testenb_gtpu_server(const char *ipstr);
|
||||
ogs_pkbuf_t *testenb_gtpu_read(ogs_socknode_t *node);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
static void attach_test1(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_socknode_t *gtpu;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
|
@ -98,8 +98,8 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
ogs_msleep(300);
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* eNB connects to SGW */
|
||||
gtpu = testenb_gtpu_server("127.0.0.5");
|
||||
|
@ -109,11 +109,11 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -149,11 +149,11 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
mme_self()->mme_ue_s1ap_id = 16777372;
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_authentication_request, strlen(_authentication_request), tmp),
|
||||
|
@ -163,11 +163,11 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_security_mode_command, strlen(_security_mode_command), tmp),
|
||||
|
@ -177,11 +177,11 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_esm_information_request, strlen(_security_mode_command), tmp),
|
||||
|
@ -191,13 +191,13 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
/*
|
||||
* We cannot check it since SGW S1U ADDR is changed
|
||||
|
@ -214,7 +214,7 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -223,17 +223,17 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
16777373, 1, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
OGS_HEX(_emm_information, strlen(_emm_information), tmp);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data, tmp, 28) == 0);
|
||||
|
@ -244,7 +244,7 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send Initial Context Setup Failure */
|
||||
rv = tests1ap_build_initial_context_setup_failure(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
#endif
|
||||
ogs_msleep(300);
|
||||
|
@ -303,11 +303,11 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
snow_3g_f9(mme_ue->knas_int, 7, 0, 0,
|
||||
sendbuf->data + 24, (109 << 3), sendbuf->data+20);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -315,11 +315,11 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send UE Context Release Request */
|
||||
rv = tests1ap_build_ue_context_release_request(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Error Indicaation */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -327,18 +327,18 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send UE Context Release Request */
|
||||
rv = tests1ap_build_ue_context_release_request(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+3);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -347,13 +347,13 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -361,29 +361,29 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
* Activate Default EPS Bearer Context Accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Detach Request */
|
||||
rv = tests1ap_build_detach_request(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/*****************************************************************
|
||||
|
@ -393,11 +393,11 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex+2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Identity Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -413,30 +413,29 @@ static void attach_test1(abts_case *tc, void *data)
|
|||
/* Send Identity Response */
|
||||
rv = tests1ap_build_identity_response(&sendbuf, msgindex+2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Attach Reject */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive UE Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
/* eNB disonncect from SGW */
|
||||
testenb_gtpu_close(gtpu);
|
||||
|
@ -458,8 +457,7 @@ out:
|
|||
ogs_msleep(300);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
/* eNB disonncect from SGW */
|
||||
testenb_gtpu_close(gtpu);
|
||||
|
@ -473,7 +471,7 @@ out:
|
|||
static void attach_test2(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
s1ap_message_t message;
|
||||
|
@ -570,18 +568,18 @@ static void attach_test2(abts_case *tc, void *data)
|
|||
ogs_msleep(300);
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* Send S1-Setup Reqeust */
|
||||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x002343d, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -634,53 +632,53 @@ static void attach_test2(abts_case *tc, void *data)
|
|||
mme_self()->mme_ue_s1ap_id = 0;
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -689,17 +687,17 @@ static void attach_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
1, 31, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -710,24 +708,24 @@ static void attach_test2(abts_case *tc, void *data)
|
|||
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -735,11 +733,11 @@ static void attach_test2(abts_case *tc, void *data)
|
|||
* Activate Default EPS Bearer Context Accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -748,45 +746,45 @@ static void attach_test2(abts_case *tc, void *data)
|
|||
* Send Initial-UE Message + Attach Request + PDN Connectivity */
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex+2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Authentication Failure */
|
||||
rv = tests1ap_build_authentication_failure(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Authentication Failure */
|
||||
rv = tests1ap_build_authentication_failure(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Reject */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -806,8 +804,7 @@ static void attach_test2(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
ogs_msleep(300);
|
||||
}
|
||||
|
@ -817,7 +814,7 @@ static void attach_test2(abts_case *tc, void *data)
|
|||
static void attach_test3(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
s1ap_message_t message;
|
||||
|
@ -906,18 +903,18 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
ogs_msleep(300);
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* Send S1-Setup Reqeust */
|
||||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -954,11 +951,11 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
mme_self()->mme_ue_s1ap_id = 33554631;
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_authentication_request, strlen(_authentication_request), tmp),
|
||||
|
@ -968,11 +965,11 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_security_mode_command, strlen(_security_mode_command), tmp),
|
||||
|
@ -982,11 +979,11 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_esm_information_request, strlen(_security_mode_command), tmp),
|
||||
|
@ -996,20 +993,20 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -1018,17 +1015,17 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
33554632, 2, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
OGS_HEX(_emm_information, strlen(_emm_information), tmp);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data, tmp, 28) == 0);
|
||||
|
@ -1045,11 +1042,11 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
/* Send UE Context Release Request */
|
||||
rv = tests1ap_build_ue_context_release_request(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_ue_context_release_command,
|
||||
|
@ -1060,7 +1057,7 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Service Request */
|
||||
|
@ -1068,18 +1065,18 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
|
||||
rv = tests1ap_build_service_request(&sendbuf, 0x000400, 4, 0xd4b8, m_tmsi);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -1088,7 +1085,7 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
33554633, 4, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -1097,11 +1094,11 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_tau_request(&sendbuf, 0,
|
||||
0, 0x003600, 1, m_tmsi, 7, 0xe73ce7c, mme_ue->knas_int);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive TAU Accept */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -1109,7 +1106,7 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
33554634, 54, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -1118,23 +1115,23 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_tau_request(&sendbuf, 0,
|
||||
0, 0x002600, 0, m_tmsi, 8, 0x972dc6f8, mme_ue->knas_int);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive TAU Accept */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -1148,8 +1145,7 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
ogs_msleep(300);
|
||||
}
|
||||
|
@ -1161,7 +1157,7 @@ static void attach_test3(abts_case *tc, void *data)
|
|||
static void attach_test4(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_socknode_t *gtpu;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
|
@ -1219,8 +1215,8 @@ static void attach_test4(abts_case *tc, void *data)
|
|||
ogs_msleep(300);
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* eNB connects to SGW */
|
||||
gtpu = testenb_gtpu_server("127.0.0.5");
|
||||
|
@ -1230,11 +1226,11 @@ static void attach_test4(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -1270,33 +1266,33 @@ static void attach_test4(abts_case *tc, void *data)
|
|||
mme_self()->mme_ue_s1ap_id = 0;
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -1314,18 +1310,18 @@ static void attach_test4(abts_case *tc, void *data)
|
|||
/* Send EMM Status */
|
||||
rv = tests1ap_build_emm_status(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -1339,8 +1335,7 @@ static void attach_test4(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
/* eNB disonncect from SGW */
|
||||
testenb_gtpu_close(gtpu);
|
||||
|
@ -1351,7 +1346,7 @@ static void attach_test4(abts_case *tc, void *data)
|
|||
static void attach_test5(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
s1ap_message_t message;
|
||||
|
@ -1409,18 +1404,18 @@ static void attach_test5(abts_case *tc, void *data)
|
|||
ogs_msleep(300);
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* Send S1-Setup Reqeust */
|
||||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x787b0, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -1452,23 +1447,23 @@ static void attach_test5(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_service_request(&sendbuf,
|
||||
0x40072c, 17, 0x9551, 0x12345678);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Service reject */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive Initial Context Setup Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -1476,53 +1471,53 @@ static void attach_test5(abts_case *tc, void *data)
|
|||
* Send Initial-UE Message + Attach Request + PDN Connectivity */
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -1531,17 +1526,17 @@ static void attach_test5(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
2, 1837, 5, 0x1000908, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -1637,11 +1632,11 @@ static void attach_test5(abts_case *tc, void *data)
|
|||
}
|
||||
#endif
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1 Reset Acknowledge */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -1649,23 +1644,23 @@ static void attach_test5(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_service_request(&sendbuf,
|
||||
0x40072e, 4, 0xda67, m_tmsi);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Service Reject */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -1680,8 +1675,7 @@ static void attach_test5(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
ogs_msleep(300);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
static void handover_test1(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock1, *sock2;
|
||||
ogs_socknode_t *s1ap1, *s1ap2;
|
||||
ogs_socknode_t *gtpu1, *gtpu2;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
|
@ -104,11 +104,11 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
mme_self()->mme_ue_s1ap_id = 16777689;
|
||||
|
||||
/* Two eNB connects to MME */
|
||||
sock1 = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock1);
|
||||
s1ap1 = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap1);
|
||||
|
||||
sock2 = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock2);
|
||||
s1ap2 = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap2);
|
||||
|
||||
/* eNB connects to SGW */
|
||||
gtpu1 = testenb_gtpu_server("127.0.0.5");
|
||||
|
@ -121,10 +121,10 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -132,10 +132,10 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f65, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -164,53 +164,53 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
* Send Initial-UE Message + Attach Request + PDN Connectivity */
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -219,23 +219,23 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
16777690, 1, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -243,7 +243,7 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_e_rab_setup_response(&sendbuf,
|
||||
33554492, 1, 6, 2, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -251,7 +251,7 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
/* Send Activate dedicated EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -260,11 +260,11 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_path_switch_request(&sendbuf,
|
||||
1, 16777690, 1, 2, 5, 1, "127.0.0.5", "127.0.0.4");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Path Switch Ack */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data + 26,
|
||||
OGS_HEX(_nh1, strlen(_nh1), tmp), 33) == 0);
|
||||
|
@ -284,7 +284,7 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_path_switch_request(&sendbuf, 0, 16777690, 2, 2, 5, 1,
|
||||
"127.0.0.5", "127.0.0.4");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive End Mark */
|
||||
|
@ -298,7 +298,7 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive Path Switch Ack */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data + 26,
|
||||
OGS_HEX(_nh2, strlen(_nh2), tmp), 33) == 0);
|
||||
|
@ -318,11 +318,8 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
testenb_gtpu_close(gtpu1);
|
||||
|
||||
/* Two eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
rv = testenb_s1ap_close(sock1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap1);
|
||||
testenb_s1ap_close(s1ap2);
|
||||
|
||||
ogs_msleep(300);
|
||||
}
|
||||
|
@ -330,7 +327,7 @@ static void handover_test1(abts_case *tc, void *data)
|
|||
static void handover_test2(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock1, *sock2;
|
||||
ogs_socknode_t *s1ap1, *s1ap2;
|
||||
ogs_socknode_t *gtpu1, *gtpu2;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
|
@ -419,11 +416,11 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
mme_self()->mme_ue_s1ap_id = 33554627;
|
||||
|
||||
/* Two eNB connects to MME */
|
||||
sock1 = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock1);
|
||||
s1ap1 = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap1);
|
||||
|
||||
sock2 = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock2);
|
||||
s1ap2 = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap2);
|
||||
|
||||
/* eNB connects to SGW */
|
||||
gtpu1 = testenb_gtpu_server("127.0.0.5");
|
||||
|
@ -436,10 +433,10 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x001f2, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -447,10 +444,10 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x00043, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -479,64 +476,64 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
* Send Initial-UE Message + Attach Request + PDN Connectivity */
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Identity Request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Identity Response */
|
||||
rv = tests1ap_build_identity_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -545,17 +542,17 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
33554628, 12, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -568,7 +565,7 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -576,7 +573,7 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_e_rab_setup_response(&sendbuf,
|
||||
33554628, 12, 6, 2, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -584,7 +581,7 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
/* Send Activate dedicated EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -592,33 +589,33 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
/* Send ENB configuration transfer */
|
||||
rv = tests1ap_build_enb_configuration_transfer(&sendbuf, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive MME configuration transfer */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ENB configuration transfer */
|
||||
rv = tests1ap_build_enb_configuration_transfer(&sendbuf, 1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive MME configuration transfer */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Handover Required */
|
||||
rv = tests1ap_build_handover_required(&sendbuf, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Handover Request */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -626,7 +623,7 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
/* Send Handover Failure */
|
||||
rv = tests1ap_build_handover_failure(&sendbuf, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
#endif
|
||||
|
||||
|
@ -634,29 +631,29 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_handover_request_ack(&sendbuf,
|
||||
1, 33554629, 8, 2, 5, 1, "127.0.0.5", "127.0.0.4");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Handover Command */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send eNB Status Transfer */
|
||||
rv = tests1ap_build_enb_status_transfer(&sendbuf, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive MME Status Transfer */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Handover Notify */
|
||||
rv = tests1ap_build_handover_notify(&sendbuf, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive End Mark */
|
||||
|
@ -673,23 +670,23 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_tau_request(&sendbuf, 1,
|
||||
0x000300, 0x000800, 0, m_tmsi, 4, 0, mme_ue->knas_int);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Tracking Area Update Accept */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex-1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -697,11 +694,11 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
/* Send Handover Required */
|
||||
rv = tests1ap_build_handover_required(&sendbuf, 1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Handover Request */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -709,29 +706,29 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_handover_request_ack(&sendbuf,
|
||||
0, 33554630, 13, 2, 5, 1, "127.0.0.5", "127.0.0.4");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Handover Command */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send eNB Status Transfer */
|
||||
rv = tests1ap_build_enb_status_transfer(&sendbuf, 1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive MME Status Transfer */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Handover Notify */
|
||||
rv = tests1ap_build_handover_notify(&sendbuf, 1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive End Mark */
|
||||
|
@ -745,14 +742,14 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -760,11 +757,11 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
/* Send Handover Required */
|
||||
rv = tests1ap_build_handover_required(&sendbuf, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Handover Request */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -772,34 +769,34 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_handover_request_ack(&sendbuf,
|
||||
0, 33554631, 9, 2, 5, 1, "127.0.0.5", "127.0.0.4");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Handover Command */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Handover Cancel */
|
||||
rv = tests1ap_build_handover_cancel(&sendbuf, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock1, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap1, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Recv Handover Cancel Ack */
|
||||
recvbuf = testenb_s1ap_read(sock1);
|
||||
recvbuf = testenb_s1ap_read(s1ap1);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Recv UE Context Relase Command */
|
||||
recvbuf = testenb_s1ap_read(sock2);
|
||||
recvbuf = testenb_s1ap_read(s1ap2);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock2, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap2, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -814,11 +811,8 @@ static void handover_test2(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* Two eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
rv = testenb_s1ap_close(sock2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap1);
|
||||
testenb_s1ap_close(s1ap2);
|
||||
|
||||
/* eNB disonncect from SGW */
|
||||
testenb_gtpu_close(gtpu1);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
static void s1setup_test1(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock[NUM_OF_TEST_DUPLICATED_ENB];
|
||||
ogs_socknode_t *node[NUM_OF_TEST_DUPLICATED_ENB];
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf = NULL;
|
||||
s1ap_message_t message;
|
||||
|
@ -18,8 +18,8 @@ static void s1setup_test1(abts_case *tc, void *data)
|
|||
|
||||
for (i = 0; i < NUM_OF_TEST_DUPLICATED_ENB; i++)
|
||||
{
|
||||
sock[i] = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock[i]);
|
||||
node[i] = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, node[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_OF_TEST_DUPLICATED_ENB; i++)
|
||||
|
@ -28,10 +28,10 @@ static void s1setup_test1(abts_case *tc, void *data)
|
|||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
rv = testenb_s1ap_send(sock[i], sendbuf);
|
||||
rv = testenb_s1ap_send(node[i], sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
recvbuf = testenb_s1ap_read(sock[i]);
|
||||
recvbuf = testenb_s1ap_read(node[i]);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
|
@ -43,8 +43,7 @@ static void s1setup_test1(abts_case *tc, void *data)
|
|||
|
||||
for (i = 0; i < NUM_OF_TEST_DUPLICATED_ENB; i++)
|
||||
{
|
||||
rv = testenb_s1ap_close(sock[i]);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(node[i]);
|
||||
}
|
||||
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
@ -57,7 +56,7 @@ static void s1setup_test1(abts_case *tc, void *data)
|
|||
static void s1setup_test2(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock[NUM_OF_TEST_ENB];
|
||||
ogs_socknode_t *node[NUM_OF_TEST_ENB];
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
s1ap_message_t message;
|
||||
|
@ -65,8 +64,8 @@ static void s1setup_test2(abts_case *tc, void *data)
|
|||
|
||||
for (i = 0; i < NUM_OF_TEST_ENB; i++)
|
||||
{
|
||||
sock[i] = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock[i]);
|
||||
node[i] = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, node[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_OF_TEST_ENB; i++)
|
||||
|
@ -75,10 +74,10 @@ static void s1setup_test2(abts_case *tc, void *data)
|
|||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64+i, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
rv = testenb_s1ap_send(sock[i], sendbuf);
|
||||
rv = testenb_s1ap_send(node[i], sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
recvbuf = testenb_s1ap_read(sock[i]);
|
||||
recvbuf = testenb_s1ap_read(node[i]);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
|
@ -90,8 +89,7 @@ static void s1setup_test2(abts_case *tc, void *data)
|
|||
|
||||
for (i = 0; i < NUM_OF_TEST_ENB; i++)
|
||||
{
|
||||
rv = testenb_s1ap_close(sock[i]);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(node[i]);
|
||||
}
|
||||
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
static void volte_test1(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
s1ap_message_t message;
|
||||
|
@ -95,18 +95,18 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
"}";
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* Send S1-Setup Reqeust */
|
||||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -138,53 +138,53 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
* Send Initial-UE Message + Attach Request + PDN Connectivity */
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -193,7 +193,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(
|
||||
&sendbuf, 1, 1, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -201,30 +201,30 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send PDN Connectivity Request */
|
||||
rv = tests1ap_build_pdn_connectivity_request(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 6, 2, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -232,19 +232,19 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send Activate default EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_default_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Activate dedicated EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -252,7 +252,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send E-RAB Setup Response */
|
||||
rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 7, 3, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -260,19 +260,19 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send PDN disconnectivity request */
|
||||
rv = tests1ap_build_pdn_disconnectivity_request(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
* Deactivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
rv = tests1ap_build_e_rab_release_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(1000);
|
||||
|
@ -280,7 +280,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Deactivate EPS bearer context accept */
|
||||
rv = tests1ap_build_deactivate_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -288,23 +288,23 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send INVALID PDN Connectivity Request */
|
||||
rv = tests1ap_build_pdn_connectivity_request(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive PDN Connectivity Reject */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -319,8 +319,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
ogs_msleep(300);
|
||||
}
|
||||
|
@ -328,7 +327,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
static void volte_test2(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
s1ap_message_t message;
|
||||
|
@ -411,18 +410,18 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
"}";
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* Send S1-Setup Reqeust */
|
||||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -454,53 +453,53 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
* Send Initial-UE Message + Attach Request + PDN Connectivity */
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -509,7 +508,7 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(
|
||||
&sendbuf, 16777373, 1, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -517,17 +516,17 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
|
@ -535,7 +534,7 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_e_rab_setup_response(
|
||||
&sendbuf, 33554492, 1, 6, 2, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -543,7 +542,7 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
/* Send Activate dedicated EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
#if 0 /* TFT Rule Tester */
|
||||
|
@ -570,8 +569,7 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
ogs_msleep(300);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
static void test1_func(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_socknode_t *gtpu;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
|
@ -95,8 +95,8 @@ static void test1_func(abts_case *tc, void *data)
|
|||
ogs_msleep(300);
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* eNB connects to SGW */
|
||||
gtpu = testenb_gtpu_server("127.0.0.5");
|
||||
|
@ -106,11 +106,11 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 51, 310, 14, 3);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -143,11 +143,11 @@ static void test1_func(abts_case *tc, void *data)
|
|||
mme_self()->mme_ue_s1ap_id = 27263233;
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_authentication_request, strlen(_authentication_request), tmp),
|
||||
|
@ -157,11 +157,11 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_security_mode_command, strlen(_security_mode_command), tmp),
|
||||
|
@ -171,11 +171,11 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data,
|
||||
OGS_HEX(_esm_information_request, strlen(_security_mode_command), tmp),
|
||||
|
@ -185,13 +185,13 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
OGS_HEX(_initial_context_setup_request,
|
||||
strlen(_initial_context_setup_request), tmp);
|
||||
|
@ -203,7 +203,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -212,17 +212,17 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
27263233, 24, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
OGS_HEX(_emm_information, strlen(_emm_information), tmp);
|
||||
ABTS_TRUE(tc, memcmp(recvbuf->data, tmp, 28) == 0);
|
||||
|
@ -250,8 +250,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
/* eNB disonncect from SGW */
|
||||
testenb_gtpu_close(gtpu);
|
||||
|
|
|
@ -33,31 +33,24 @@
|
|||
static void test1_func(abts_case *tc, void *data)
|
||||
{
|
||||
ogs_sock_t *sctp;
|
||||
ogs_sockaddr_t *addr;
|
||||
ogs_socknode_t *node;
|
||||
int rv;
|
||||
|
||||
sctp = ogs_sctp_socket(AF_INET6, SOCK_SEQPACKET);
|
||||
sctp = ogs_sctp_socket(AF_INET6, SOCK_SEQPACKET, NULL);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_INET, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_server(SOCK_STREAM, addr);
|
||||
node = ogs_socknode_new(AF_INET, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_server(SOCK_STREAM, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ogs_socknode_free(node);
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_UNSPEC, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, addr);
|
||||
node = ogs_socknode_new(AF_UNSPEC, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
static ogs_thread_t *test2_thread;
|
||||
|
@ -70,42 +63,37 @@ static void test2_main(void *data)
|
|||
ssize_t size;
|
||||
uint32_t ppid;
|
||||
ogs_sctp_info_t sinfo;
|
||||
ogs_sockaddr_t *addr;
|
||||
ogs_socknode_t *node;
|
||||
ogs_sockaddr_t from;
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_UNSPEC, NULL, PORT, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_client(SOCK_SEQPACKET, addr);
|
||||
node = ogs_socknode_new(AF_UNSPEC, NULL, PORT, 0);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_client(SOCK_SEQPACKET, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
size = ogs_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo);
|
||||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
ABTS_INT_EQUAL(tc, PPID, sinfo.ppid);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
static void test2_func(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sctp, *sctp2;
|
||||
ssize_t size;
|
||||
ogs_sockaddr_t *addr;
|
||||
ogs_socknode_t *node;
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_INET6, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_server(SOCK_STREAM, addr);
|
||||
node = ogs_socknode_new(AF_INET6, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_server(SOCK_STREAM, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
test2_thread = ogs_thread_create(test2_main, tc);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
ABTS_PTR_NOTNULL(tc, test2_thread);
|
||||
|
||||
sctp2 = ogs_sock_accept(sctp);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
ABTS_PTR_NOTNULL(tc, sctp2);
|
||||
|
||||
size = ogs_sctp_sendmsg(sctp2, DATASTR, strlen(DATASTR), NULL, PPID, 0);
|
||||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
|
@ -113,8 +101,7 @@ static void test2_func(abts_case *tc, void *data)
|
|||
ogs_thread_destroy(test2_thread);
|
||||
|
||||
ogs_sock_destroy(sctp2);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
static ogs_thread_t *test3_thread;
|
||||
|
@ -129,7 +116,7 @@ static void test3_main(void *data)
|
|||
ssize_t size;
|
||||
int rc;
|
||||
|
||||
sctp = ogs_sctp_socket(AF_INET, SOCK_SEQPACKET);
|
||||
sctp = ogs_sctp_socket(AF_INET, SOCK_SEQPACKET, NULL);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
|
||||
rv = ogs_getaddrinfo(&to, AF_INET, NULL, PORT, 0);
|
||||
|
@ -150,19 +137,18 @@ static void test3_func(abts_case *tc, void *data)
|
|||
int rv;
|
||||
ssize_t size;
|
||||
ogs_sockaddr_t from, *addr;
|
||||
ogs_socknode_t *node;
|
||||
char str[STRLEN];
|
||||
char buf[OGS_ADDRSTRLEN];
|
||||
ogs_sctp_info_t sinfo;
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_INET, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, addr);
|
||||
node = ogs_socknode_new(AF_INET, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
test3_thread = ogs_thread_create(test3_main, tc);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
ABTS_PTR_NOTNULL(tc, test3_thread);
|
||||
|
||||
size = ogs_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo);
|
||||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
|
@ -170,26 +156,23 @@ static void test3_func(abts_case *tc, void *data)
|
|||
|
||||
ogs_thread_destroy(test3_thread);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
static ogs_thread_t *test4_thread;
|
||||
static void test4_main(void *data)
|
||||
{
|
||||
abts_case *tc = data;
|
||||
int rv;
|
||||
ogs_sock_t *sctp;
|
||||
ogs_sockaddr_t *addr;
|
||||
ogs_socknode_t *node;
|
||||
char str[STRLEN];
|
||||
ssize_t size;
|
||||
ogs_sctp_info_t sinfo;
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_UNSPEC, NULL, PORT, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_client(SOCK_STREAM, addr);
|
||||
node = ogs_socknode_new(AF_UNSPEC, NULL, PORT, 0);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_client(SOCK_STREAM, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
size = ogs_sctp_sendmsg(sctp, DATASTR, strlen(DATASTR), NULL, PPID, 0);
|
||||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
|
@ -198,28 +181,26 @@ static void test4_main(void *data)
|
|||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
ABTS_INT_EQUAL(tc, PPID, sinfo.ppid);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
static void test4_func(abts_case *tc, void *data)
|
||||
{
|
||||
ogs_sock_t *sctp;
|
||||
int rv;
|
||||
ssize_t size;
|
||||
ogs_sockaddr_t from, *addr;
|
||||
ogs_socknode_t *node;
|
||||
char str[STRLEN];
|
||||
ogs_sctp_info_t sinfo;
|
||||
char buf[OGS_ADDRSTRLEN];
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_INET6, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, addr);
|
||||
node = ogs_socknode_new(AF_INET6, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
test4_thread = ogs_thread_create(test4_main, tc);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
ABTS_PTR_NOTNULL(tc, test4_thread);
|
||||
|
||||
size = ogs_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo);
|
||||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
|
@ -230,8 +211,7 @@ static void test4_func(abts_case *tc, void *data)
|
|||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
|
||||
ogs_thread_destroy(test4_thread);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
static ogs_thread_t *test5_thread;
|
||||
|
@ -242,16 +222,15 @@ static void test5_main(void *data)
|
|||
ogs_sock_t *sctp;
|
||||
char str[STRLEN];
|
||||
ogs_sockaddr_t from, *remote_addr, *addr;
|
||||
ogs_socknode_t *node;
|
||||
ogs_sctp_info_t sinfo;
|
||||
ssize_t size;
|
||||
char buf[OGS_ADDRSTRLEN];
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_INET6, NULL, PORT2, AI_PASSIVE);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, addr);
|
||||
node = ogs_socknode_new(AF_INET6, NULL, PORT2, AI_PASSIVE);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_INET6, NULL, PORT, 0);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -271,29 +250,27 @@ static void test5_main(void *data)
|
|||
ABTS_STR_EQUAL(tc, "::1", OGS_ADDR(&from, buf));
|
||||
ABTS_INT_EQUAL(tc, PPID, sinfo.ppid);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
static void test5_func(abts_case *tc, void *data)
|
||||
{
|
||||
ogs_sock_t *sctp;
|
||||
int rv;
|
||||
ssize_t size;
|
||||
ogs_sockaddr_t from, *addr;
|
||||
ogs_sockaddr_t from;
|
||||
ogs_socknode_t *node;
|
||||
socklen_t addrlen;
|
||||
char str[STRLEN];
|
||||
ogs_sctp_info_t sinfo;
|
||||
char buf[OGS_ADDRSTRLEN];
|
||||
|
||||
rv = ogs_getaddrinfo(&addr, AF_INET6, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, addr);
|
||||
node = ogs_socknode_new(AF_INET6, NULL, PORT, AI_PASSIVE);
|
||||
ABTS_PTR_NOTNULL(tc, node);
|
||||
sctp = ogs_sctp_server(SOCK_SEQPACKET, node);
|
||||
ABTS_PTR_NOTNULL(tc, sctp);
|
||||
rv = ogs_freeaddrinfo(addr);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
test5_thread = ogs_thread_create(test5_main, tc);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
ABTS_PTR_NOTNULL(tc, test5_thread);
|
||||
|
||||
size = ogs_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo);
|
||||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
|
@ -305,9 +282,7 @@ static void test5_func(abts_case *tc, void *data)
|
|||
ABTS_INT_EQUAL(tc, strlen(DATASTR), size);
|
||||
|
||||
ogs_thread_destroy(test5_thread);
|
||||
|
||||
ogs_sock_destroy(sctp);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
ogs_socknode_free(node);
|
||||
}
|
||||
|
||||
abts_suite *test_sctp(abts_suite *suite)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
static void volte_test1(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
s1ap_message_t message;
|
||||
|
@ -81,18 +81,18 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
"}";
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* Send S1-Setup Reqeust */
|
||||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -124,53 +124,53 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
* Send Initial-UE Message + Attach Request + PDN Connectivity */
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -179,38 +179,38 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
1, 1, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send PDN Connectivity Request */
|
||||
rv = tests1ap_build_pdn_connectivity_request(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 6, 2, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -218,7 +218,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send Activate default EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_default_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -228,14 +228,14 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 7, 3, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -243,7 +243,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send Activate dedicated EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -253,14 +253,14 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
|
||||
/* Receive E-RAB Modify Request +
|
||||
* Modify EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send E-RAB Modify Response */
|
||||
rv = tests1ap_build_e_rab_modify_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -268,7 +268,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send Modify EPS bearer context accept */
|
||||
rv = tests1ap_build_modify_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -278,14 +278,14 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
|
||||
/* Receive E-RAB Release Command +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
rv = tests1ap_build_e_rab_release_response(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -293,7 +293,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send Deactivate EPS bearer context accept */
|
||||
rv = tests1ap_build_deactivate_bearer_accept(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -301,18 +301,18 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
/* Send Detach Request */
|
||||
rv = tests1ap_build_detach_request(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -327,8 +327,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
ogs_msleep(300);
|
||||
}
|
||||
|
@ -336,7 +335,7 @@ static void volte_test1(abts_case *tc, void *data)
|
|||
static void volte_test2(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_sock_t *sock;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
s1ap_message_t message;
|
||||
|
@ -420,18 +419,18 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
"}";
|
||||
|
||||
/* eNB connects to MME */
|
||||
sock = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, sock);
|
||||
s1ap = testenb_s1ap_client("127.0.0.1");
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* Send S1-Setup Reqeust */
|
||||
rv = tests1ap_build_setup_req(
|
||||
&sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64, 12345, 1, 1, 2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
rv = s1ap_decode_pdu(&message, recvbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
@ -463,53 +462,53 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
* Send Initial-UE Message + Attach Request + PDN Connectivity */
|
||||
rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Authentication Response */
|
||||
rv = tests1ap_build_authentication_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Security mode Complete */
|
||||
rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
rv = tests1ap_build_esm_information_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -518,38 +517,38 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
rv = tests1ap_build_initial_context_setup_response(&sendbuf,
|
||||
1, 1, 5, 1, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
rv = tests1ap_build_attach_complete(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send PDN Connectivity Request */
|
||||
rv = tests1ap_build_pdn_connectivity_request(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 6, 2, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -557,19 +556,19 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
/* Send Activate default EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_default_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Activate dedicated EPS bearer context accept */
|
||||
rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -577,7 +576,7 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
/* Send E-RAB Setup Response */
|
||||
rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 7, 3, "127.0.0.5");
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -587,14 +586,14 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
|
||||
/* Receive downlink NAS transport +
|
||||
* Modify EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send Modify EPS bearer context accept */
|
||||
rv = tests1ap_build_modify_bearer_accept(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -602,19 +601,19 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
/* Send PDN disconnectivity request */
|
||||
rv = tests1ap_build_pdn_disconnectivity_request(&sendbuf, msgindex+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
* Deactivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(sock);
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
rv = tests1ap_build_e_rab_release_response(&sendbuf, msgindex);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -622,7 +621,7 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
/* Send Deactivate EPS bearer context accept */
|
||||
rv = tests1ap_build_deactivate_bearer_accept(&sendbuf, msgindex+2);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(sock, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
@ -637,8 +636,7 @@ static void volte_test2(abts_case *tc, void *data)
|
|||
mongoc_collection_destroy(collection);
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
rv = testenb_s1ap_close(sock);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
ogs_msleep(300);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue