Lines Matching refs:sock2

194 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()
306 int ret, sock1, sock2; in ZTEST() local
317 sock2 = setup_socket(ud.second, SOCK_DGRAM, htons(ETH_P_TSN)); in ZTEST()
318 zassert_true(sock2 >= 0, "Cannot create 2nd socket (%d)", sock2); in ZTEST()
323 ret = bind_socket(sock2, ud.second); in ZTEST()
327 setblocking(sock2, false); in ZTEST()
334 ret = zsock_sendto(sock2, data_to_send, sizeof(data_to_send), 0, in ZTEST()
363 ret = zsock_sendto(sock2, data_to_send, sizeof(data_to_send), 0, in ZTEST()
381 ret = zsock_recvfrom(sock2, data_to_receive, sizeof(data_to_receive), in ZTEST()
393 zsock_close(sock2); in ZTEST()
403 int ret, sock1, sock2; in ZTEST() local
427 sock2 = setup_socket(ud.second, SOCK_RAW, htons(ETH_P_ALL)); in ZTEST()
428 zassert_true(sock2 >= 0, "Cannot create 2nd socket (%d)", sock2); in ZTEST()
433 ret = bind_socket(sock2, ud.second); in ZTEST()
437 setblocking(sock2, false); in ZTEST()
457 ret = zsock_recvfrom(sock2, data_to_receive, sizeof(data_to_receive), in ZTEST()
476 ret = zsock_sendto(sock2, send_payload_raw, sizeof(send_payload_raw), 0, in ZTEST()
499 zsock_close(sock2); in ZTEST()
509 int ret, sock1, sock2, sock3; in ZTEST() local
526 sock2 = setup_socket(ud.second, SOCK_RAW, htons(ETH_P_ALL)); in ZTEST()
527 zassert_true(sock2 >= 0, "Cannot create 2nd socket (%d)", sock2); in ZTEST()
535 ret = bind_socket(sock2, ud.second); in ZTEST()
542 setblocking(sock2, false); in ZTEST()
563 ret = zsock_recvfrom(sock2, data_to_receive, sizeof(data_to_receive), in ZTEST()
593 zsock_close(sock2); in ZTEST()