remove 127.0.0.1

Now, we'll use 10.1.35.x network for loopback test
This commit is contained in:
Sukchan Lee 2017-04-18 21:27:07 +09:00
parent e186436098
commit 05f74087e0
6 changed files with 17 additions and 53 deletions

7
scripts/mac_netconfig.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
ifconfig en0 alias 10.1.35.215 netmask 255.255.255.255
ifconfig en0 alias 10.1.35.216 netmask 255.255.255.255
ifconfig en0 alias 10.1.35.217 netmask 255.255.255.255
ifconfig en0 alias 10.1.35.219 netmask 255.255.255.255

View File

@ -31,19 +31,11 @@ static int context_initialized = 0;
/* FIXME : Global IP information and port. /* FIXME : Global IP information and port.
* This should be read from configuration file or arguments * This should be read from configuration file or arguments
*/ */
#if 0
static char g_mme_ip_addr[20] = "127.0.0.1";
static unsigned int g_mme_gtp_c_port = GTPV2_C_UDP_PORT;
static char g_sgw_s11_ip_addr[20] = "127.0.0.1";
static unsigned int g_sgw_s11_port = GTPV2_C_UDP_PORT + 1;
#else
static char g_mme_ip_addr[20] = "10.1.35.215"; static char g_mme_ip_addr[20] = "10.1.35.215";
static unsigned int g_mme_gtp_c_port = GTPV2_C_UDP_PORT; static unsigned int g_mme_gtp_c_port = GTPV2_C_UDP_PORT;
static char g_sgw_s11_ip_addr[20] = "10.1.35.216"; static char g_sgw_s11_ip_addr[20] = "10.1.35.216";
static unsigned int g_sgw_s11_port = GTPV2_C_UDP_PORT; static unsigned int g_sgw_s11_port = GTPV2_C_UDP_PORT;
#endif
status_t mme_context_init() status_t mme_context_init()
{ {

View File

@ -23,16 +23,6 @@ static int context_initiaized = 0;
*/ */
/* loop back */ /* loop back */
#if 0
static char g_sgw_s5c_ip_addr[20] = "127.0.0.1";
static unsigned int g_sgw_s5c_port = GTPV2_C_UDP_PORT + 2;
static char g_pgw_s5c_ip_addr[20] = "127.0.0.1";
static unsigned int g_pgw_s5c_port = GTPV2_C_UDP_PORT + 3;
static char g_pgw_ip_addr[20] = "127.0.0.1";
static unsigned int g_pgw_s5u_port = GTPV1_U_UDP_PORT + 2;
#else
static char g_sgw_s5c_ip_addr[20] = "10.1.35.217"; static char g_sgw_s5c_ip_addr[20] = "10.1.35.217";
static unsigned int g_sgw_s5c_port = GTPV2_C_UDP_PORT; static unsigned int g_sgw_s5c_port = GTPV2_C_UDP_PORT;
@ -40,7 +30,7 @@ static char g_pgw_ip_addr[20] = "10.1.35.219";
static unsigned int g_pgw_s5c_port = GTPV2_C_UDP_PORT; static unsigned int g_pgw_s5c_port = GTPV2_C_UDP_PORT;
static unsigned int g_pgw_s5u_port = GTPV1_U_UDP_PORT; static unsigned int g_pgw_s5u_port = GTPV1_U_UDP_PORT;
#endif
status_t pgw_context_init() status_t pgw_context_init()
{ {
d_assert(context_initiaized == 0, return CORE_ERROR, d_assert(context_initiaized == 0, return CORE_ERROR,

View File

@ -19,26 +19,6 @@ static int context_initialized = 0;
/* FIXME : Global IP information and port. /* FIXME : Global IP information and port.
* This should be read from configuration file or arguments * This should be read from configuration file or arguments
*/ */
#if 0
static char g_mme_ip_addr[20] = "127.0.0.1";
static unsigned int g_mme_gtp_c_port = GTPV2_C_UDP_PORT;
static char g_sgw_s11_ip_addr[20] = "127.0.0.1";
static unsigned int g_sgw_s11_port = GTPV2_C_UDP_PORT + 1;
static char g_sgw_s5c_ip_addr[20] = "127.0.0.1";
static unsigned int g_sgw_s5c_port = GTPV2_C_UDP_PORT + 2;
static char g_pgw_ip_addr[20] = "127.0.0.1";
static unsigned int g_pgw_s5c_port = GTPV2_C_UDP_PORT + 3;
static char g_sgw_s1u_ip_addr[20] = "127.0.0.1";
static unsigned int g_sgw_s1u_port = GTPV1_U_UDP_PORT;
static char g_sgw_s5u_ip_addr[20] = "127.0.0.1";
static unsigned int g_sgw_s5u_port = GTPV1_U_UDP_PORT + 1;
#else
static char g_mme_ip_addr[20] = "10.1.35.215"; static char g_mme_ip_addr[20] = "10.1.35.215";
static unsigned int g_mme_gtp_c_port = GTPV2_C_UDP_PORT; static unsigned int g_mme_gtp_c_port = GTPV2_C_UDP_PORT;
@ -56,7 +36,7 @@ static unsigned int g_sgw_s1u_port = GTPV1_U_UDP_PORT;
static char g_sgw_s5u_ip_addr[20] = "10.1.35.217"; /* same as g_sgw_s5c_ip_addr */ static char g_sgw_s5u_ip_addr[20] = "10.1.35.217"; /* same as g_sgw_s5c_ip_addr */
static unsigned int g_sgw_s5u_port = GTPV1_U_UDP_PORT; static unsigned int g_sgw_s5u_port = GTPV1_U_UDP_PORT;
#endif
status_t sgw_context_init() status_t sgw_context_init()
{ {
d_assert(context_initialized == 0, return CORE_ERROR, d_assert(context_initialized == 0, return CORE_ERROR,

View File

@ -34,14 +34,14 @@ static void nas_sm_test1(abts_case *tc, void *data)
"000b402000000300 000005c00100009d 000800020001001a 000a092779012320" "000b402000000300 000005c00100009d 000800020001001a 000a092779012320"
"010221d9"; "010221d9";
char *_initial_context_setup_request = char *_initial_context_setup_request =
"00090080d6000006 00000005c0010000 9d00080002000100 42000a1806400000" "00090080e4000006 00000005c0010000 9d00080002000100 42000a1806400000"
"6006400000001800 8084000034007f45 4009200000000000 0000000f807f0000" "6006400000001800 809200003400808c 4540092000000000 000000000f800a01"
"0100000001682733 2c24090207420249 064000f1105ba000 4c5221c10509ffff" "23d8000000017527 daddd87002074202 49064000f1105ba0 004c5221c10509ff"
"ffff0908696e7465 726e657405012d2d 2d715e0600000000 0404272980c22304" "ffffff0908696e74 65726e657405012d 2d2d715e06000000 000404272980c223"
"0300000480211002 0000108106080808 0883060404040400 0d0408080808000d" "0403000004802110 0200001081060808 0808830604040404 000d040808080800"
"0404040404531217 2c5949640125006b 00051c000c000000 4900203311c603c6" "0d0404040404500b f600f11000020104 0001fb5312172c59 49640125006b0005"
"a6d67f695e5ac02b b75b381b693c3893 a6d932fd91823544 e3e79b0000000000" "1c000c0000004900 203311c603c6a6d6 7f695e5ac02bb75b 381b693c3893a6d9"
"0000000000000000 00"; "32fd91823544e3e7 9b";
char *_emm_information = char *_emm_information =
"000b402a00000300 000005c00100009d 000800020001001a 001413279fcc7266" "000b402a00000300 000005c00100009d 000800020001001a 001413279fcc7266"
"0307614771304112 527563490100"; "0307614771304112 527563490100";
@ -127,13 +127,10 @@ static void nas_sm_test1(abts_case *tc, void *data)
recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); recvbuf = pkbuf_alloc(0, MAX_SDU_LEN);
rc = tests1ap_enb_read(sock, recvbuf); rc = tests1ap_enb_read(sock, recvbuf);
recvbuf->len = 233; recvbuf->len = 233;
#if 0
d_print_hex(recvbuf->payload, recvbuf->len);
ABTS_TRUE(tc, memcmp(recvbuf->payload, ABTS_TRUE(tc, memcmp(recvbuf->payload,
CORE_HEX(_initial_context_setup_request, CORE_HEX(_initial_context_setup_request,
strlen(_initial_context_setup_request), tmp), strlen(_initial_context_setup_request), tmp),
recvbuf->len) == 0); recvbuf->len) == 0);
#endif
pkbuf_free(recvbuf); pkbuf_free(recvbuf);
/* Send UE Capability Info Indication */ /* Send UE Capability Info Indication */
@ -297,9 +294,7 @@ abts_suite *test_nas_sm(abts_suite *suite)
suite = ADD_SUITE(suite) suite = ADD_SUITE(suite)
abts_run_test(suite, nas_sm_test1, NULL); abts_run_test(suite, nas_sm_test1, NULL);
#if 0
abts_run_test(suite, nas_sm_test2, NULL); abts_run_test(suite, nas_sm_test2, NULL);
#endif
return suite; return suite;
} }