Lines Matching refs:test_sock
44 static int test_sock = -1; variable
422 test_sock = zsock_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); in test_socket_setup_udp()
424 zassert_true(test_sock >= 0, "Failed to create socket"); in test_socket_setup_udp()
434 test_sock = zsock_socket(AF_INET, SOCK_STREAM, IPPROTO_TLS_1_2); in test_socket_setup_tls()
435 zassert_true(test_sock >= 0, "Failed to create socket"); in test_socket_setup_tls()
444 int ret = zsock_close(test_sock); in test_socket_teardown()
446 test_sock = -1; in test_socket_teardown()
456 int ret = zsock_close(test_sock); in ZTEST()
458 test_sock = -1; in ZTEST()
474 ret = zsock_fcntl(test_sock, F_SETFL, 0); in ZTEST()
490 ret = zsock_shutdown(test_sock, ZSOCK_SHUT_RD); in ZTEST()
508 ret = zsock_bind(test_sock, (struct sockaddr *)&addr, sizeof(addr)); in ZTEST()
524 ret = zsock_connect(test_sock, (struct sockaddr *)&addr, sizeof(addr)); in ZTEST()
539 ret = zsock_listen(test_sock, 1); in ZTEST()
556 ret = zsock_accept(test_sock, (struct sockaddr *)&addr, &addrlen); in ZTEST()
573 ret = zsock_sendto(test_sock, &dummy_data, 1, 0, in ZTEST()
590 ret = zsock_recvfrom(test_sock, &dummy_data, 1, 0, NULL, 0); in ZTEST()
607 ret = zsock_getsockopt(test_sock, SOL_SOCKET, SO_RCVTIMEO, in ZTEST()
624 ret = zsock_setsockopt(test_sock, SOL_SOCKET, SO_RCVTIMEO, in ZTEST()
641 ret = zsock_sendmsg(test_sock, &dummy_msg, 0); in ZTEST()
658 ret = zsock_getpeername(test_sock, (struct sockaddr *)&addr, &addrlen); in ZTEST()
675 ret = zsock_getsockname(test_sock, (struct sockaddr *)&addr, &addrlen); in ZTEST()
701 ret = zsock_setsockopt(test_sock, SOL_SOCKET, SO_BINDTODEVICE, in ZTEST()
711 ret = zsock_sendto(test_sock, &dummy_data, 1, 0, in ZTEST()
734 ret = zsock_setsockopt(test_sock, SOL_SOCKET, SO_BINDTODEVICE, in ZTEST()
743 ret = zsock_sendto(test_sock, &dummy_data, 1, 0, in ZTEST()
770 ret = zsock_setsockopt(test_sock, SOL_TLS, TLS_NATIVE, in ZTEST()
778 obj = zvfs_get_fd_obj_and_vtable(test_sock, &vtable, NULL); in ZTEST()
782 ret = zsock_setsockopt(test_sock, SOL_SOCKET, SO_BINDTODEVICE, in ZTEST()
793 ret = zsock_connect(test_sock, (struct sockaddr *)&addr, sizeof(addr)); in ZTEST()
817 ret = zsock_setsockopt(test_sock, SOL_TLS, TLS_NATIVE, in ZTEST()
825 obj = zvfs_get_fd_obj_and_vtable(test_sock, &vtable, NULL); in ZTEST()
829 ret = zsock_setsockopt(test_sock, SOL_SOCKET, SO_BINDTODEVICE, in ZTEST()
840 (void)zsock_connect(test_sock, (struct sockaddr *)&addr, sizeof(addr)); in ZTEST()