remove hard-corded code
This commit is contained in:
parent
7b046c75b2
commit
2223dfef0e
|
@ -91,7 +91,7 @@ status_t s1ap_open(void)
|
||||||
local_addr.sin_family = AF_INET;
|
local_addr.sin_family = AF_INET;
|
||||||
local_addr.sin_len = sizeof(struct sockaddr_in);
|
local_addr.sin_len = sizeof(struct sockaddr_in);
|
||||||
local_addr.sin_port = htons(mme_self()->s1ap_port);
|
local_addr.sin_port = htons(mme_self()->s1ap_port);
|
||||||
local_addr.sin_addr.s_addr = 0;
|
local_addr.sin_addr.s_addr = mme_self()->s1ap_addr;
|
||||||
|
|
||||||
if (usrsctp_bind(psock, (struct sockaddr *)&local_addr,
|
if (usrsctp_bind(psock, (struct sockaddr *)&local_addr,
|
||||||
sizeof(struct sockaddr_in)) == -1)
|
sizeof(struct sockaddr_in)) == -1)
|
||||||
|
|
|
@ -295,7 +295,7 @@ static void attach_test1(abts_case *tc, void *data)
|
||||||
core_sleep(time_from_msec(300));
|
core_sleep(time_from_msec(300));
|
||||||
|
|
||||||
/* Send GTP-U ICMP Packet */
|
/* Send GTP-U ICMP Packet */
|
||||||
rv = testgtpu_enb_send(gtpu, inet_addr("45.45.0.2"), mme_self()->s1ap_addr);
|
rv = testgtpu_enb_send(gtpu, inet_addr("45.45.0.2"), mme_self()->gtpc_addr);
|
||||||
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
|
|
||||||
/* Receive GTP-U ICMP Packet */
|
/* Receive GTP-U ICMP Packet */
|
||||||
|
|
|
@ -19,7 +19,7 @@ net_sock_t *testgtpu_enb_connect(void)
|
||||||
if (!mme) return NULL;
|
if (!mme) return NULL;
|
||||||
|
|
||||||
rc = net_listen_ext(&sock, SOCK_DGRAM, IPPROTO_UDP,
|
rc = net_listen_ext(&sock, SOCK_DGRAM, IPPROTO_UDP,
|
||||||
0, mme->s1ap_addr, GTPV1_U_UDP_PORT);
|
0, mme->gtpc_addr, GTPV1_U_UDP_PORT);
|
||||||
if (rc != 0) return NULL;
|
if (rc != 0) return NULL;
|
||||||
|
|
||||||
return sock;
|
return sock;
|
||||||
|
|
|
@ -48,7 +48,7 @@ net_sock_t *tests1ap_enb_connect(void)
|
||||||
remote_addr.sin_family = AF_INET;
|
remote_addr.sin_family = AF_INET;
|
||||||
remote_addr.sin_len = sizeof(struct sockaddr_in);
|
remote_addr.sin_len = sizeof(struct sockaddr_in);
|
||||||
remote_addr.sin_port = htons(mme_self()->s1ap_port);
|
remote_addr.sin_port = htons(mme_self()->s1ap_port);
|
||||||
remote_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
|
remote_addr.sin_addr.s_addr = mme_self()->s1ap_addr;
|
||||||
if (usrsctp_connect(psock, (struct sockaddr *)&remote_addr,
|
if (usrsctp_connect(psock, (struct sockaddr *)&remote_addr,
|
||||||
sizeof(struct sockaddr_in)) == -1)
|
sizeof(struct sockaddr_in)) == -1)
|
||||||
{
|
{
|
||||||
|
@ -67,7 +67,7 @@ status_t tests1ap_enb_close(net_sock_t *sock)
|
||||||
|
|
||||||
int tests1ap_enb_send(net_sock_t *sock, pkbuf_t *sendbuf)
|
int tests1ap_enb_send(net_sock_t *sock, pkbuf_t *sendbuf)
|
||||||
{
|
{
|
||||||
return s1ap_sendto(sock, sendbuf, inet_addr("127.0.0.1"),
|
return s1ap_sendto(sock, sendbuf, mme_self()->s1ap_addr,
|
||||||
mme_self()->s1ap_port);
|
mme_self()->s1ap_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue