/Zephyr-Core-3.7.0/tests/net/socket/af_packet/src/ |
D | main.c | 194 static void __test_packet_sockets(int *sock1, int *sock2) in __test_packet_sockets() argument 204 *sock1 = setup_socket(ud.first, SOCK_RAW, htons(ETH_P_ALL)); in __test_packet_sockets() 205 zassert_true(*sock1 >= 0, "Cannot create 1st socket (%d)", *sock1); in __test_packet_sockets() 210 ret = bind_socket(*sock1, ud.first); in __test_packet_sockets() 226 int ret, sock1, sock2, sock3, sock4; in ZTEST() local 230 __test_packet_sockets(&sock1, &sock2); in ZTEST() 264 setblocking(sock1, false); in ZTEST() 274 ret = zsock_recvfrom(sock1, data_to_receive, sizeof(data_to_receive), 0, in ZTEST() 283 zsock_close(sock1); in ZTEST() 291 int sock1, sock2; in ZTEST() local [all …]
|
/Zephyr-Core-3.7.0/tests/net/socket/udp/src/ |
D | main.c | 292 int sock1, sock2; in ZTEST() local 297 prepare_sock_udp_v4(MY_IPV4_ADDR, 55555, &sock1, &bind_addr); in ZTEST() 300 rv = zsock_bind(sock1, (struct sockaddr *)&bind_addr, sizeof(bind_addr)); in ZTEST() 310 len = zsock_recv(sock1, buf, sizeof(buf), ZSOCK_MSG_PEEK); in ZTEST() 315 len = zsock_recv(sock1, buf, sizeof(buf), 0); in ZTEST() 319 rv = zsock_close(sock1); in ZTEST() 329 int sock1, sock2, rv; in ZTEST() local 332 prepare_sock_udp_v4(MY_IPV4_ADDR, 55555, &sock1, &bind_addr4); in ZTEST() 335 rv = zsock_bind(sock1, (struct sockaddr *)&bind_addr4, sizeof(bind_addr4)); in ZTEST() 342 rv = zsock_setsockopt(sock1, SOL_SOCKET, SO_PRIORITY, &optval, in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/tests/net/socket/tcp/src/ |
D | main.c | 1265 int sock1, sock2, rv; in ZTEST() local 1273 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &sock1, &bind_addr4); in ZTEST() 1276 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST() 1286 test_close(sock1); in ZTEST() 1298 int sock1, sock2, rv; in ZTEST() local 1302 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &sock1, &bind_addr4); in ZTEST() 1305 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST() 1315 test_close(sock1); in ZTEST() 1325 int sock1, sock2, rv; in ZTEST() local 1330 prepare_sock_tcp_v4(MY_IPV4_ADDR, ANY_PORT, &sock1, &bind_addr4); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/tests/net/socket/tls/src/ |
D | main.c | 207 int sock1, sock2, rv; in ZTEST() local 211 prepare_sock_tls_v4(MY_IPV4_ADDR, ANY_PORT, &sock1, &bind_addr4, IPPROTO_TLS_1_2); in ZTEST() 214 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST() 224 test_close(sock1); in ZTEST() 232 int sock1, sock2, rv; in ZTEST() local 236 prepare_sock_tls_v4(MY_IPV4_ADDR, ANY_PORT, &sock1, &bind_addr4, IPPROTO_TLS_1_2); in ZTEST() 239 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST() 251 test_close(sock1); in ZTEST()
|