Home
last modified time | relevance | path

Searched refs:sock2 (Results 1 – 4 of 4) sorted by relevance

/Zephyr-Core-3.7.0/tests/net/socket/af_packet/src/
Dmain.c194 static void __test_packet_sockets(int *sock1, int *sock2) in __test_packet_sockets() argument
207 *sock2 = setup_socket(ud.second, SOCK_RAW, htons(ETH_P_ALL)); in __test_packet_sockets()
208 zassert_true(*sock2 >= 0, "Cannot create 2nd socket (%d)", *sock2); in __test_packet_sockets()
213 ret = bind_socket(*sock2, ud.second); in __test_packet_sockets()
226 int ret, sock1, sock2, sock3, sock4; in ZTEST() local
230 __test_packet_sockets(&sock1, &sock2); in ZTEST()
284 zsock_close(sock2); in ZTEST()
291 int sock1, sock2; in ZTEST() local
293 __test_packet_sockets(&sock1, &sock2); in ZTEST()
296 zsock_close(sock2); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/net/socket/udp/src/
Dmain.c292 int sock1, sock2; in ZTEST() local
298 prepare_sock_udp_v4(MY_IPV4_ADDR, 55555, &sock2, &conn_addr); in ZTEST()
303 rv = zsock_connect(sock2, (struct sockaddr *)&conn_addr, sizeof(conn_addr)); in ZTEST()
306 len = zsock_send(sock2, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in ZTEST()
321 rv = zsock_close(sock2); in ZTEST()
329 int sock1, sock2, rv; in ZTEST() local
333 prepare_sock_udp_v6(MY_IPV6_ADDR, 55555, &sock2, &bind_addr6); in ZTEST()
338 rv = zsock_bind(sock2, (struct sockaddr *)&bind_addr6, sizeof(bind_addr6)); in ZTEST()
347 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_PRIORITY, &optval, in ZTEST()
353 rv = zsock_close(sock2); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/net/socket/tcp/src/
Dmain.c1265 int sock1, sock2, rv; in ZTEST() local
1274 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &sock2, &bind_addr6); in ZTEST()
1281 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST()
1287 test_close(sock2); in ZTEST()
1298 int sock1, sock2, rv; in ZTEST() local
1303 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &sock2, &bind_addr6); in ZTEST()
1310 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST()
1316 test_close(sock2); in ZTEST()
1325 int sock1, sock2, rv; in ZTEST() local
1331 prepare_sock_tcp_v6(MY_IPV6_ADDR, ANY_PORT, &sock2, &bind_addr6); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/net/socket/tls/src/
Dmain.c207 int sock1, sock2, rv; in ZTEST() local
212 prepare_sock_tls_v6(MY_IPV6_ADDR, ANY_PORT, &sock2, &bind_addr6, IPPROTO_TLS_1_2); in ZTEST()
219 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST()
225 test_close(sock2); in ZTEST()
232 int sock1, sock2, rv; in ZTEST() local
237 prepare_sock_tls_v6(MY_IPV6_ADDR, ANY_PORT, &sock2, &bind_addr6, IPPROTO_TLS_1_1); in ZTEST()
245 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST()
252 test_close(sock2); in ZTEST()