diff options
author | Diadlo <polsha3@gmail.com> | 2017-03-02 23:15:51 +0300 |
---|---|---|
committer | Diadlo <polsha3@gmail.com> | 2017-08-24 20:09:08 +0300 |
commit | 66b8a7685e8fdecd6104f01f840f5d792ce1e041 (patch) | |
tree | 7c65281aefeb21c55ba422ff7d9587675eeb7070 /auto_tests/TCP_test.c | |
parent | 8f19c926c0d5231ede61a831050664103e54000e (diff) |
AF_INET -> TOX_AF_INET
Diffstat (limited to 'auto_tests/TCP_test.c')
-rw-r--r-- | auto_tests/TCP_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c index f8412832..fbbb08cd 100644 --- a/auto_tests/TCP_test.c +++ b/auto_tests/TCP_test.c | |||
@@ -34,7 +34,7 @@ START_TEST(test_basic) | |||
34 | 34 | ||
35 | Socket sock = net_socket(TOX_AF_INET6, TOX_SOCK_STREAM, TOX_PROTO_TCP); | 35 | Socket sock = net_socket(TOX_AF_INET6, TOX_SOCK_STREAM, TOX_PROTO_TCP); |
36 | IP_Port ip_port_loopback; | 36 | IP_Port ip_port_loopback; |
37 | ip_port_loopback.ip.family = AF_INET6; | 37 | ip_port_loopback.ip.family = TOX_AF_INET6; |
38 | ip_port_loopback.ip.ip6.uint64[0] = 0; | 38 | ip_port_loopback.ip.ip6.uint64[0] = 0; |
39 | ip_port_loopback.ip.ip6.uint64[1] = 0; | 39 | ip_port_loopback.ip.ip6.uint64[1] = 0; |
40 | ip_port_loopback.ip.ip6.uint8[15] = 1; // ::1 | 40 | ip_port_loopback.ip.ip6.uint8[15] = 1; // ::1 |
@@ -135,7 +135,7 @@ static struct sec_TCP_con *new_TCP_con(TCP_Server *tcp_s) | |||
135 | Socket sock = net_socket(TOX_AF_INET6, TOX_SOCK_STREAM, TOX_PROTO_TCP); | 135 | Socket sock = net_socket(TOX_AF_INET6, TOX_SOCK_STREAM, TOX_PROTO_TCP); |
136 | 136 | ||
137 | IP_Port ip_port_loopback; | 137 | IP_Port ip_port_loopback; |
138 | ip_port_loopback.ip.family = AF_INET6; | 138 | ip_port_loopback.ip.family = TOX_AF_INET6; |
139 | ip_port_loopback.ip.ip6.uint64[0] = 0; | 139 | ip_port_loopback.ip.ip6.uint64[0] = 0; |
140 | ip_port_loopback.ip.ip6.uint64[1] = 0; | 140 | ip_port_loopback.ip.ip6.uint64[1] = 0; |
141 | ip_port_loopback.ip.ip6.uint8[15] = 1; // ::1 | 141 | ip_port_loopback.ip.ip6.uint8[15] = 1; // ::1 |
@@ -405,7 +405,7 @@ START_TEST(test_client) | |||
405 | IP_Port ip_port_tcp_s; | 405 | IP_Port ip_port_tcp_s; |
406 | 406 | ||
407 | ip_port_tcp_s.port = net_htons(ports[rand() % NUM_PORTS]); | 407 | ip_port_tcp_s.port = net_htons(ports[rand() % NUM_PORTS]); |
408 | ip_port_tcp_s.ip.family = AF_INET6; | 408 | ip_port_tcp_s.ip.family = TOX_AF_INET6; |
409 | get_ip6(&ip_port_tcp_s.ip.ip6, &in6addr_loopback); | 409 | get_ip6(&ip_port_tcp_s.ip.ip6, &in6addr_loopback); |
410 | TCP_Client_Connection *conn = new_TCP_connection(ip_port_tcp_s, self_public_key, f_public_key, f_secret_key, 0); | 410 | TCP_Client_Connection *conn = new_TCP_connection(ip_port_tcp_s, self_public_key, f_public_key, f_secret_key, 0); |
411 | c_sleep(50); | 411 | c_sleep(50); |
@@ -503,7 +503,7 @@ START_TEST(test_client_invalid) | |||
503 | IP_Port ip_port_tcp_s; | 503 | IP_Port ip_port_tcp_s; |
504 | 504 | ||
505 | ip_port_tcp_s.port = net_htons(ports[rand() % NUM_PORTS]); | 505 | ip_port_tcp_s.port = net_htons(ports[rand() % NUM_PORTS]); |
506 | ip_port_tcp_s.ip.family = AF_INET6; | 506 | ip_port_tcp_s.ip.family = TOX_AF_INET6; |
507 | get_ip6(&ip_port_tcp_s.ip.ip6, &in6addr_loopback); | 507 | get_ip6(&ip_port_tcp_s.ip.ip6, &in6addr_loopback); |
508 | TCP_Client_Connection *conn = new_TCP_connection(ip_port_tcp_s, self_public_key, f_public_key, f_secret_key, 0); | 508 | TCP_Client_Connection *conn = new_TCP_connection(ip_port_tcp_s, self_public_key, f_public_key, f_secret_key, 0); |
509 | c_sleep(50); | 509 | c_sleep(50); |
@@ -572,7 +572,7 @@ START_TEST(test_tcp_connection) | |||
572 | IP_Port ip_port_tcp_s; | 572 | IP_Port ip_port_tcp_s; |
573 | 573 | ||
574 | ip_port_tcp_s.port = net_htons(ports[rand() % NUM_PORTS]); | 574 | ip_port_tcp_s.port = net_htons(ports[rand() % NUM_PORTS]); |
575 | ip_port_tcp_s.ip.family = AF_INET6; | 575 | ip_port_tcp_s.ip.family = TOX_AF_INET6; |
576 | get_ip6(&ip_port_tcp_s.ip.ip6, &in6addr_loopback); | 576 | get_ip6(&ip_port_tcp_s.ip.ip6, &in6addr_loopback); |
577 | 577 | ||
578 | int connection = new_tcp_connection_to(tc_1, tcp_connections_public_key(tc_2), 123); | 578 | int connection = new_tcp_connection_to(tc_1, tcp_connections_public_key(tc_2), 123); |
@@ -681,7 +681,7 @@ START_TEST(test_tcp_connection2) | |||
681 | IP_Port ip_port_tcp_s; | 681 | IP_Port ip_port_tcp_s; |
682 | 682 | ||
683 | ip_port_tcp_s.port = net_htons(ports[rand() % NUM_PORTS]); | 683 | ip_port_tcp_s.port = net_htons(ports[rand() % NUM_PORTS]); |
684 | ip_port_tcp_s.ip.family = AF_INET6; | 684 | ip_port_tcp_s.ip.family = TOX_AF_INET6; |
685 | get_ip6(&ip_port_tcp_s.ip.ip6, &in6addr_loopback); | 685 | get_ip6(&ip_port_tcp_s.ip.ip6, &in6addr_loopback); |
686 | 686 | ||
687 | int connection = new_tcp_connection_to(tc_1, tcp_connections_public_key(tc_2), 123); | 687 | int connection = new_tcp_connection_to(tc_1, tcp_connections_public_key(tc_2), 123); |