Lines Matching refs:c_sock

233 	int c_sock;  in ZTEST_USER()  local
241 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
247 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER()
248 test_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST_USER()
256 test_close(c_sock); in ZTEST_USER()
268 int c_sock; in ZTEST_USER() local
276 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
282 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER()
283 test_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST_USER()
291 test_close(c_sock); in ZTEST_USER()
360 int c_sock; in test_send_recv_large_common() local
372 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr_in); in test_send_recv_large_common()
378 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr_in6); in test_send_recv_large_common()
396 test_connect(c_sock, s_saddr, addrlen); in test_send_recv_large_common()
398 rv = zsock_setsockopt(c_sock, IPPROTO_TCP, TCP_NODELAY, (char *) &tcp_nodelay, sizeof(int)); in test_send_recv_large_common()
421 int send_bytes = zsock_send(c_sock, buffer, chunk_size, 0); in test_send_recv_large_common()
435 test_close(c_sock); in test_send_recv_large_common()
496 int c_sock; in ZTEST() local
518 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
524 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
525 test_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
541 test_send(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0); in ZTEST()
556 recved = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
570 test_close(c_sock); in ZTEST()
581 int c_sock; in ZTEST_USER() local
589 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
595 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER()
596 test_sendto(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0, in ZTEST_USER()
610 test_close(c_sock); in ZTEST_USER()
617 int c_sock; in ZTEST_USER() local
625 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
632 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER()
633 test_sendto(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0, in ZTEST_USER()
647 test_close(c_sock); in ZTEST_USER()
655 int c_sock; in ZTEST_USER() local
663 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
669 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER()
670 test_sendto(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0, in ZTEST_USER()
680 test_close(c_sock); in ZTEST_USER()
688 int c_sock; in ZTEST_USER() local
696 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
702 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER()
703 test_sendto(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0, in ZTEST_USER()
713 test_close(c_sock); in ZTEST_USER()
720 int c_sock; in ZTEST_USER() local
736 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
742 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER()
743 test_sendto(c_sock, TEST_STR_SMALL, strlen(TEST_STR_SMALL), 0, in ZTEST_USER()
784 test_sendto(c_sock, TEST_STR_LONG, strlen(TEST_STR_LONG), 0, in ZTEST_USER()
818 test_close(c_sock); in ZTEST_USER()
823 void _test_recv_enotconn(int c_sock, int s_sock) in _test_recv_enotconn() argument
831 res = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in _test_recv_enotconn()
843 test_close(c_sock); in _test_recv_enotconn()
853 int c_sock, s_sock; in ZTEST_USER() local
856 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
861 _test_recv_enotconn(c_sock, s_sock); in ZTEST_USER()
869 int c_sock, s_sock; in ZTEST_USER() local
872 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
877 _test_recv_enotconn(c_sock, s_sock); in ZTEST_USER()
884 int c_sock; in ZTEST_USER() local
891 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST_USER()
898 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST_USER()
903 test_shutdown(c_sock, ZSOCK_SHUT_RD); in ZTEST_USER()
906 test_eof(c_sock); in ZTEST_USER()
910 test_close(c_sock); in ZTEST_USER()
935 int c_sock; in ZTEST() local
943 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
950 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
956 shutdown_work_data.fd = c_sock; in ZTEST()
963 test_eof(c_sock); in ZTEST()
967 test_close(c_sock); in ZTEST()
980 int c_sock; in ZTEST() local
985 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
999 zassert_not_equal(zsock_connect(c_sock, (struct sockaddr *)&s_saddr, in ZTEST()
1003 test_close(c_sock); in ZTEST()
1036 int c_sock; in ZTEST() local
1041 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1050 zassert_equal(zsock_connect(c_sock, (struct sockaddr *)&s_saddr, in ZTEST()
1057 test_close(c_sock); in ZTEST()
1084 int c_sock; in ZTEST() local
1090 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1091 test_fcntl(c_sock, F_SETFL, O_NONBLOCK); in ZTEST()
1097 rv = zsock_connect(c_sock, (struct sockaddr *)&s_saddr, in ZTEST()
1103 poll_fds[0].fd = c_sock; in ZTEST()
1111 test_close(c_sock); in ZTEST()
1120 int c_sock; in ZTEST() local
1130 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1132 test_fcntl(c_sock, F_SETFL, O_NONBLOCK); in ZTEST()
1137 zassert_equal(zsock_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)), in ZTEST()
1144 poll_fds[0].fd = c_sock; in ZTEST()
1154 test_close(c_sock); in ZTEST()
1173 int c_sock; in ZTEST() local
1181 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1187 zassert_equal(zsock_connect(c_sock, (struct sockaddr *)&s_saddr, in ZTEST()
1200 test_close(c_sock); in ZTEST()
1364 int c_sock; in ZTEST() local
1374 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1380 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1390 rv = zsock_send(c_sock, tx_buf, sizeof(tx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1399 rv = zsock_send(c_sock, tx_buf, 1, ZSOCK_MSG_DONTWAIT); in ZTEST()
1403 test_close(c_sock); in ZTEST()
1453 int c_sock; in ZTEST() local
1463 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1467 rv = zsock_setsockopt(c_sock, SOL_SOCKET, SO_SNDBUF, &buf_optval, in ZTEST()
1474 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1482 rv = zsock_send(c_sock, tx_buf, sizeof(tx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1486 rv = zsock_send(c_sock, tx_buf, 1, ZSOCK_MSG_DONTWAIT); in ZTEST()
1492 test_close(c_sock); in ZTEST()
1501 int c_sock; in ZTEST() local
1519 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1525 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1530 rv = zsock_setsockopt(c_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
1540 recved = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1557 test_close(c_sock); in ZTEST()
1568 int c_sock; in ZTEST() local
1586 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1592 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1597 rv = zsock_setsockopt(c_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
1607 recved = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1624 test_close(c_sock); in ZTEST()
1636 int c_sock; in ZTEST() local
1651 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1657 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1662 rv = zsock_setsockopt(c_sock, SOL_SOCKET, SO_SNDTIMEO, &timeo_optval, in ZTEST()
1671 rv = zsock_send(c_sock, tx_buf, sizeof(tx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1679 rv = zsock_send(c_sock, tx_buf, 1, 0); in ZTEST()
1687 test_close(c_sock); in ZTEST()
1697 int c_sock; in ZTEST() local
1712 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1718 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1723 rv = zsock_setsockopt(c_sock, SOL_SOCKET, SO_SNDTIMEO, &timeo_optval, in ZTEST()
1732 rv = zsock_send(c_sock, tx_buf, sizeof(tx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1740 rv = zsock_send(c_sock, tx_buf, 1, 0); in ZTEST()
1748 test_close(c_sock); in ZTEST()
1782 int c_sock; in ZTEST() local
1796 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1802 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1813 test_data.sock = c_sock; in ZTEST()
1834 test_data.sock = c_sock; in ZTEST()
1850 test_close(c_sock); in ZTEST()
1860 int c_sock; in ZTEST() local
1874 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
1880 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1890 test_data.sock = c_sock; in ZTEST()
1911 test_data.sock = c_sock; in ZTEST()
1924 test_close(c_sock); in ZTEST()
2023 int c_sock; in ZTEST() local
2033 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
2040 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
2046 close_work_data.fd = c_sock; in ZTEST()
2052 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
2421 int c_sock, s_sock, new_sock; in ZTEST() local
2426 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &c_sock, &c_saddr); in ZTEST()
2431 ret = zsock_setsockopt(c_sock, SOL_SOCKET, SO_KEEPALIVE, in ZTEST()
2439 ret = zsock_setsockopt(c_sock, IPPROTO_TCP, TCP_KEEPIDLE, in ZTEST()
2447 ret = zsock_setsockopt(c_sock, IPPROTO_TCP, TCP_KEEPINTVL, in ZTEST()
2455 ret = zsock_setsockopt(c_sock, IPPROTO_TCP, TCP_KEEPCNT, in ZTEST()
2465 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
2473 ret = zsock_recv(c_sock, &rx_buf, sizeof(rx_buf), 0); in ZTEST()
2482 test_close(c_sock); in ZTEST()