Lines Matching refs:c_sock
38 int c_sock = -1, s_sock = -1, new_sock = -1; variable
59 static void test_config_psk(int s_sock, int c_sock) in test_config_psk() argument
81 if (c_sock >= 0) { in test_config_psk()
82 zassert_equal(zsock_setsockopt(c_sock, SOL_TLS, TLS_SEC_TAG_LIST, in test_config_psk()
168 if (c_sock >= 0) { in test_sockets_close()
169 test_close(c_sock); in test_sockets_close()
170 c_sock = -1; in test_sockets_close()
317 prepare_sock_tls_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, in test_prepare_tls_connection()
324 prepare_sock_tls_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, in test_prepare_tls_connection()
332 test_config_psk(s_sock, c_sock); in test_prepare_tls_connection()
340 test_data.sock = c_sock; in test_prepare_tls_connection()
366 prepare_sock_dtls_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, in test_prepare_dtls_connection()
373 prepare_sock_dtls_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, in test_prepare_dtls_connection()
381 test_config_psk(s_sock, c_sock); in test_prepare_dtls_connection()
389 test_data.sock = c_sock; in test_prepare_dtls_connection()
429 test_data.sock = c_sock; in ZTEST()
450 test_data.sock = c_sock; in ZTEST()
485 test_data.sock = c_sock; in ZTEST()
506 test_data.sock = c_sock; in ZTEST()
551 test_data.sock = c_sock; in test_msg_trunc()
620 test_data.sock = c_sock; in test_dtls_sendmsg_no_buf()
656 rv = zsock_sendmsg(c_sock, &msg, 0); in test_dtls_sendmsg_no_buf()
708 test_data.sock = c_sock; in test_dtls_sendmsg()
776 rv = zsock_sendmsg(c_sock, &msg, 0); in test_dtls_sendmsg()
878 prepare_sock_tls_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr, in ZTEST()
880 test_config_psk(-1, c_sock); in ZTEST()
889 zassert_equal(zsock_connect(c_sock, (struct sockaddr *)&s_saddr, in ZTEST()
907 prepare_sock_tls_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr, in ZTEST()
909 test_config_psk(-1, c_sock); in ZTEST()
916 zassert_equal(zsock_connect(c_sock, (struct sockaddr *)&s_saddr, in ZTEST()
996 prepare_sock_tls_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr, in ZTEST()
998 test_config_psk(-1, c_sock); in ZTEST()
1002 zassert_equal(zsock_connect(c_sock, (struct sockaddr *)&s_saddr, in ZTEST()
1008 test_close(c_sock); in ZTEST()
1009 c_sock = -1; in ZTEST()
1023 prepare_sock_tls_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr, in ZTEST()
1025 test_config_psk(-1, c_sock); in ZTEST()
1029 zassert_equal(zsock_connect(c_sock, (struct sockaddr *)&s_saddr, in ZTEST()
1071 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1078 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1079 test_send(c_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL), 0); in ZTEST()
1107 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1139 test_data.sock = c_sock; in ZTEST()
1157 test_close(c_sock); in ZTEST()
1158 c_sock = -1; in ZTEST()
1184 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1193 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), in ZTEST()
1199 test_fcntl(c_sock, F_SETFL, O_NONBLOCK); in ZTEST()
1200 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1212 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1277 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1290 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1322 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1327 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1344 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1348 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1373 ret = zsock_setsockopt(c_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
1378 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1386 test_data.sock = c_sock; in ZTEST()
1416 ret = zsock_setsockopt(c_sock, SOL_SOCKET, SO_SNDTIMEO, &timeo_optval, in ZTEST()
1425 ret = zsock_send(c_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in ZTEST()
1433 ret = zsock_send(c_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in ZTEST()
1446 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1459 test_shutdown(c_sock, ZSOCK_SHUT_RD); in ZTEST()
1462 test_eof(c_sock); in ZTEST()
1494 test_data.sock = c_sock; in ZTEST()
1498 test_eof(c_sock); in ZTEST()
1520 test_data_c.sock = c_sock; in ZTEST()
1531 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1559 ret = zsock_send(c_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in ZTEST()
1594 test_data.sock = c_sock; in ZTEST()
1622 fds[0].fd = c_sock; in ZTEST()
1635 ret = zsock_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
1668 fds[0].fd = c_sock; in ZTEST()
1693 test_close(c_sock); in ZTEST()
1694 c_sock = -1; in ZTEST()
1721 test_close(c_sock); in ZTEST()
1722 c_sock = -1; in ZTEST()
1756 ssl_ctx = ztls_get_mbedtls_ssl_context(c_sock); in ZTEST()
1793 ssl_ctx = ztls_get_mbedtls_ssl_context(c_sock); in ZTEST()