Lines Matching full:sizeof

30 #define BUF_AND_SIZE(buf) buf, sizeof(buf) - 1
31 #define STRLEN(buf) (sizeof(buf) - 1)
92 addrlen = sizeof(addr); in comm_sendto_recvfrom()
94 recved = zsock_recvfrom(server_sock, rx_buf, sizeof(rx_buf), in comm_sendto_recvfrom()
103 addrlen = sizeof(addr); in comm_sendto_recvfrom()
105 recved = zsock_recvfrom(server_sock, rx_buf, sizeof(rx_buf), in comm_sendto_recvfrom()
124 sent = zsock_sendto(server_sock, TEST_STR2, sizeof(TEST_STR2) - 1, in comm_sendto_recvfrom()
129 addrlen2 = sizeof(addr); in comm_sendto_recvfrom()
131 recved = zsock_recvfrom(client_sock, rx_buf, sizeof(rx_buf), in comm_sendto_recvfrom()
147 sent = zsock_sendto(server_sock, TEST_STR2, sizeof(TEST_STR2) - 1, in comm_sendto_recvfrom()
150 sent = zsock_sendto(server_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, in comm_sendto_recvfrom()
155 addrlen2 = sizeof(addr); in comm_sendto_recvfrom()
162 addrlen2 = sizeof(addr); in comm_sendto_recvfrom()
182 sizeof(server_addr)); in ZTEST()
187 sizeof(client_addr), in ZTEST()
190 sizeof(server_addr)); in ZTEST()
210 (struct sockaddr *)&server_addr, sizeof(server_addr)); in ZTEST()
215 sizeof(client_addr), in ZTEST()
218 sizeof(server_addr)); in ZTEST()
238 (struct sockaddr *)&client_addr, sizeof(client_addr)); in ZTEST()
242 (struct sockaddr *)&server_addr, sizeof(server_addr)); in ZTEST()
247 sizeof(client_addr), in ZTEST()
250 sizeof(server_addr)); in ZTEST()
270 (struct sockaddr *)&client_addr, sizeof(client_addr)); in ZTEST()
274 (struct sockaddr *)&server_addr, sizeof(server_addr)); in ZTEST()
279 sizeof(client_addr), in ZTEST()
282 sizeof(server_addr)); in ZTEST()
300 rv = zsock_bind(sock1, (struct sockaddr *)&bind_addr, sizeof(bind_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()
310 len = zsock_recv(sock1, buf, sizeof(buf), ZSOCK_MSG_PEEK); in ZTEST()
315 len = zsock_recv(sock1, buf, sizeof(buf), 0); in ZTEST()
335 rv = zsock_bind(sock1, (struct sockaddr *)&bind_addr4, sizeof(bind_addr4)); in ZTEST()
338 rv = zsock_bind(sock2, (struct sockaddr *)&bind_addr6, sizeof(bind_addr6)); in ZTEST()
343 sizeof(optval)); in ZTEST()
348 sizeof(optval)); in ZTEST()
388 addrlen = sizeof(addr); in comm_sendmsg_recvfrom()
390 recved = zsock_recvfrom(server_sock, rx_buf, sizeof(rx_buf), in comm_sendmsg_recvfrom()
403 addrlen = sizeof(addr); in comm_sendmsg_recvfrom()
405 recved = zsock_recvfrom(server_sock, rx_buf, sizeof(rx_buf), in comm_sendmsg_recvfrom()
433 unsigned char buf[CMSG_SPACE(sizeof(int))]; in ZTEST_USER()
441 sizeof(server_addr)); in ZTEST_USER()
446 sizeof(client_addr)); in ZTEST_USER()
452 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
454 msg.msg_controllen = sizeof(cmsgbuf.buf); in ZTEST_USER()
458 msg.msg_namelen = sizeof(server_addr); in ZTEST_USER()
461 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in ZTEST_USER()
468 sizeof(client_addr), in ZTEST_USER()
472 sizeof(server_addr)); in ZTEST_USER()
495 sizeof(server_addr)); in ZTEST_USER()
500 sizeof(client_addr)); in ZTEST_USER()
506 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
510 msg.msg_namelen = sizeof(server_addr); in ZTEST_USER()
514 sizeof(client_addr), in ZTEST_USER()
518 sizeof(server_addr)); in ZTEST_USER()
538 unsigned char buf[CMSG_SPACE(sizeof(int))]; in ZTEST_USER()
545 (struct sockaddr *)&server_addr, sizeof(server_addr)); in ZTEST_USER()
550 sizeof(client_addr)); in ZTEST_USER()
556 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
558 msg.msg_controllen = sizeof(cmsgbuf.buf); in ZTEST_USER()
562 msg.msg_namelen = sizeof(server_addr); in ZTEST_USER()
565 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in ZTEST_USER()
572 sizeof(client_addr), in ZTEST_USER()
576 sizeof(server_addr)); in ZTEST_USER()
596 unsigned char buf[CMSG_SPACE(sizeof(int))]; in ZTEST_USER()
604 sizeof(server_addr)); in ZTEST_USER()
609 sizeof(client_addr)); in ZTEST_USER()
613 sizeof(server_addr)); in ZTEST_USER()
619 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
621 msg.msg_controllen = sizeof(cmsgbuf.buf); in ZTEST_USER()
626 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in ZTEST_USER()
633 sizeof(client_addr), in ZTEST_USER()
637 sizeof(server_addr)); in ZTEST_USER()
657 unsigned char buf[CMSG_SPACE(sizeof(int))]; in ZTEST_USER()
664 (struct sockaddr *)&server_addr, sizeof(server_addr)); in ZTEST_USER()
669 sizeof(client_addr)); in ZTEST_USER()
673 sizeof(server_addr)); in ZTEST_USER()
679 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
681 msg.msg_controllen = sizeof(cmsgbuf.buf); in ZTEST_USER()
686 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in ZTEST_USER()
693 sizeof(client_addr), in ZTEST_USER()
697 sizeof(server_addr)); in ZTEST_USER()
711 socklen_t optsize = sizeof(optval); in ZTEST()
719 zassert_equal(optsize, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
724 zassert_equal(optsize, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
743 rv = zsock_bind(sock1, (struct sockaddr *)&bind_addr4, sizeof(bind_addr4)); in ZTEST()
746 rv = zsock_bind(sock2, (struct sockaddr *)&bind_addr6, sizeof(bind_addr6)); in ZTEST()
751 sizeof(optval)); in ZTEST()
756 sizeof(optval)); in ZTEST()
759 optlen = sizeof(optval); in ZTEST()
762 zassert_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
763 optlen, sizeof(optval)); in ZTEST()
766 optlen = sizeof(optval); in ZTEST()
769 zassert_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
770 optlen, sizeof(optval)); in ZTEST()
797 rv = zsock_bind(sock1, (struct sockaddr *)&bind_addr4, sizeof(bind_addr4)); in ZTEST()
800 rv = zsock_bind(sock2, (struct sockaddr *)&bind_addr6, sizeof(bind_addr6)); in ZTEST()
804 sizeof(optval)); in ZTEST()
809 sizeof(optval)); in ZTEST()
812 addrlen = sizeof(addr); in ZTEST()
815 recved = zsock_recvfrom(sock1, rx_buf, sizeof(rx_buf), in ZTEST()
825 recved = zsock_recvfrom(sock2, rx_buf, sizeof(rx_buf), in ZTEST()
854 rv = zsock_bind(sock1, (struct sockaddr *)&bind_addr4, sizeof(bind_addr4)); in ZTEST()
857 rv = zsock_bind(sock2, (struct sockaddr *)&bind_addr6, sizeof(bind_addr6)); in ZTEST()
861 sizeof(optval)); in ZTEST()
866 sizeof(optval)); in ZTEST()
881 socklen_t optsize = sizeof(optval); in ZTEST()
889 zassert_equal(optsize, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
894 zassert_equal(optsize, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
957 .len = sizeof(server_lladdr),
973 sizeof(ctx->mac_address), in eth_fake_iface_init()
1044 (void)memset(&udp_server_addr, 0, sizeof(udp_server_addr)); in ZTEST()
1067 unsigned char buf[CMSG_SPACE(sizeof(uint64_t))]; in ZTEST_USER()
1074 sizeof(client_addr)); in ZTEST_USER()
1080 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
1082 msg.msg_controllen = sizeof(cmsgbuf.buf); in ZTEST_USER()
1086 msg.msg_namelen = sizeof(udp_server_addr); in ZTEST_USER()
1091 cmsg->cmsg_len = CMSG_LEN(sizeof(txtime)); in ZTEST_USER()
1098 sizeof(optval)); in ZTEST_USER()
1104 sizeof(client_addr), in ZTEST_USER()
1124 uint8_t str_buf[sizeof(TEST_STR_SMALL) - 1]; in test_msg_trunc()
1137 rv = zsock_send(sock_c, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in test_msg_trunc()
1138 zassert_equal(rv, sizeof(TEST_STR_SMALL) - 1, "send failed"); in test_msg_trunc()
1140 memset(str_buf, 0, sizeof(str_buf)); in test_msg_trunc()
1142 zassert_equal(rv, sizeof(TEST_STR_SMALL) - 1, "MSG_TRUNC flag failed"); in test_msg_trunc()
1147 rv = zsock_recv(sock_s, str_buf, sizeof(str_buf), ZSOCK_MSG_DONTWAIT); in test_msg_trunc()
1153 rv = zsock_send(sock_c, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in test_msg_trunc()
1154 zassert_equal(rv, sizeof(TEST_STR_SMALL) - 1, "send failed"); in test_msg_trunc()
1156 memset(str_buf, 0, sizeof(str_buf)); in test_msg_trunc()
1158 zassert_equal(rv, sizeof(TEST_STR_SMALL) - 1, "MSG_TRUNC flag failed"); in test_msg_trunc()
1161 rv = zsock_recv(sock_s, str_buf, sizeof(str_buf), ZSOCK_MSG_TRUNC); in test_msg_trunc()
1162 zassert_equal(rv, sizeof(TEST_STR_SMALL) - 1, in test_msg_trunc()
1184 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
1185 (struct sockaddr *)&server_addr, sizeof(server_addr)); in ZTEST()
1199 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
1200 (struct sockaddr *)&server_addr, sizeof(server_addr)); in ZTEST()
1248 memset(rx_buf, 0, sizeof(rx_buf)); in test_dgram_fragmented()
1249 rv = zsock_recv(sock_s, rx_buf, sizeof(rx_buf), 0); in test_dgram_fragmented()
1270 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
1271 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
1287 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
1288 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
1292 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
1293 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
1309 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
1310 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
1336 rv = zsock_sendto(sock_s1, &tx_buf, sizeof(tx_buf), 0, addr_c, addrlen_c); in test_dgram_connected()
1337 zassert_equal(rv, sizeof(tx_buf), "send failed %d", errno); in test_dgram_connected()
1343 rv = zsock_recv(sock_c, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in test_dgram_connected()
1344 zassert_equal(rv, sizeof(rx_buf), "recv failed"); in test_dgram_connected()
1348 rv = zsock_sendto(sock_s2, &tx_buf, sizeof(tx_buf), 0, addr_c, addrlen_c); in test_dgram_connected()
1349 zassert_equal(rv, sizeof(tx_buf), "send failed"); in test_dgram_connected()
1354 rv = zsock_recv(sock_c, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in test_dgram_connected()
1380 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
1381 (struct sockaddr *)&server_addr_1, sizeof(server_addr_1), in ZTEST()
1382 (struct sockaddr *)&server_addr_2, sizeof(server_addr_2)); in ZTEST()
1399 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
1400 (struct sockaddr *)&server_addr_1, sizeof(server_addr_1), in ZTEST()
1401 (struct sockaddr *)&server_addr_2, sizeof(server_addr_2)); in ZTEST()
1412 unsigned char buf[CMSG_SPACE(sizeof(int))]; in ZTEST_USER()
1426 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
1427 msg.msg_controllen = sizeof(cmsgbuf.buf); in ZTEST_USER()
1440 msg.msg_namelen = sizeof(server_addr); in ZTEST_USER()
1443 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); in ZTEST_USER()
1464 #define SMALL_BUF_LEN (sizeof(TEST_STR_SMALL) - 1 - 2) in comm_sendmsg_recvmsg()
1485 memset(msg, 0, sizeof(*msg)); in comm_sendmsg_recvmsg()
1497 io_vector[0].iov_len = sizeof(buf); in comm_sendmsg_recvmsg()
1499 memset(msg, 0, sizeof(*msg)); in comm_sendmsg_recvmsg()
1569 io_vector[0].iov_len = sizeof(buf2); in comm_sendmsg_recvmsg()
1571 io_vector[1].iov_len = sizeof(buf); in comm_sendmsg_recvmsg()
1573 memset(msg, 0, sizeof(*msg)); in comm_sendmsg_recvmsg()
1631 io_vector[0].iov_len = sizeof(buf2); in comm_sendmsg_recvmsg()
1633 memset(msg, 0, sizeof(*msg)); in comm_sendmsg_recvmsg()
1645 zassert_equal(recved, sizeof(buf2), in comm_sendmsg_recvmsg()
1647 recved, sizeof(buf2)); in comm_sendmsg_recvmsg()
1650 zassert_mem_equal(buf2, TEST_STR_SMALL, sizeof(buf2), in comm_sendmsg_recvmsg()
1677 sizeof(server_addr)); in ZTEST_USER()
1682 sizeof(client_addr)); in ZTEST_USER()
1688 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
1692 msg.msg_namelen = sizeof(server_addr); in ZTEST_USER()
1696 sizeof(client_addr), in ZTEST_USER()
1700 sizeof(server_addr), in ZTEST_USER()
1728 unsigned char buf[CMSG_SPACE(sizeof(struct in6_pktinfo))]; in run_ancillary_recvmsg_test()
1730 #define SMALL_BUF_LEN (sizeof(TEST_STR_SMALL) - 1 - 2) in run_ancillary_recvmsg_test()
1744 memset(&cmsgbuf, 0, sizeof(cmsgbuf)); in run_ancillary_recvmsg_test()
1746 memset(&msg, 0, sizeof(msg)); in run_ancillary_recvmsg_test()
1761 sizeof(cmsgbuf.buf), in run_ancillary_recvmsg_test()
1788 optlen = sizeof(opt); in run_ancillary_recvmsg_test()
1792 memset(&cmsgbuf, 0, sizeof(cmsgbuf)); in run_ancillary_recvmsg_test()
1794 memset(&msg, 0, sizeof(msg)); in run_ancillary_recvmsg_test()
1809 sizeof(cmsgbuf.buf), in run_ancillary_recvmsg_test()
1840 sizeof(struct in6_addr), in run_ancillary_recvmsg_test()
1850 rv = zsock_sendto(client_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0, in run_ancillary_recvmsg_test()
1855 io_vector[0].iov_len = sizeof(buf); in run_ancillary_recvmsg_test()
1857 memset(&msg, 0, sizeof(msg)); in run_ancillary_recvmsg_test()
1886 sizeof(client_addr), in ZTEST_USER()
1889 sizeof(server_addr)); in ZTEST_USER()
1904 sizeof(client_addr), in ZTEST_USER()
1907 sizeof(server_addr)); in ZTEST_USER()
1934 memset(&addr, 0, sizeof(addr)); in bind_socket()
1939 return zsock_bind(sock, (struct sockaddr *)&addr, sizeof(addr)); in bind_socket()
1952 #define IPV4_HDR_SIZE sizeof(struct net_ipv4_hdr) in test_check_ttl()
1953 #define IPV6_HDR_SIZE sizeof(struct net_ipv6_hdr) in test_check_ttl()
1954 #define UDP_HDR_SIZE sizeof(struct net_udp_hdr) in test_check_ttl()
1958 uint8_t data_to_receive[sizeof(tx_buf) + MAX_HDR_SIZE]; in test_check_ttl()
1977 ret = net_if_get_name(lo0, ifname, sizeof(ifname)); in test_check_ttl()
1980 strncpy(ifreq.ifr_name, ifname, sizeof(ifreq.ifr_name)); in test_check_ttl()
1982 sizeof(ifreq)); in test_check_ttl()
1989 &timeo_optval, sizeof(timeo_optval)); in test_check_ttl()
1993 ret = zsock_sendto(sock_c, &tx_buf, sizeof(tx_buf), 0, in test_check_ttl()
1995 zassert_equal(ret, sizeof(tx_buf), "send failed (%d)", -errno); in test_check_ttl()
1997 ret = zsock_recv(sock_s, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in test_check_ttl()
1999 zassert_equal(ret, sizeof(rx_buf), "recv failed (%d)", ret); in test_check_ttl()
2003 ret = zsock_recvfrom(sock_p, data_to_receive, sizeof(data_to_receive), 0, in test_check_ttl()
2008 zassert_equal(ret, sizeof(tx_buf) + hdr_size, in test_check_ttl()
2010 ret, sizeof(tx_buf), -errno); in test_check_ttl()
2012 sizeof(tx_buf), in test_check_ttl()
2067 ret = zsock_setsockopt(sock_c, IPPROTO_IP, option, &opt, sizeof(opt)); in test_check_ttl()
2077 &ipv4_stats_before, sizeof(ipv4_stats_before)); in test_check_ttl()
2079 ret = zsock_sendto(sock_c, &tx_buf, sizeof(tx_buf), 0, in test_check_ttl()
2081 zassert_equal(ret, sizeof(tx_buf), "send failed (%d)", -errno); in test_check_ttl()
2085 &ipv4_stats_after, sizeof(ipv4_stats_after)); in test_check_ttl()
2093 ret = zsock_recv(sock_s, &rx_buf, sizeof(rx_buf), 0); in test_check_ttl()
2111 &opt, sizeof(opt)); in test_check_ttl()
2121 &ipv6_stats_before, sizeof(ipv6_stats_before)); in test_check_ttl()
2123 ret = zsock_sendto(sock_c, &tx_buf, sizeof(tx_buf), 0, in test_check_ttl()
2125 zassert_equal(ret, sizeof(tx_buf), "send failed (%d)", -errno); in test_check_ttl()
2129 &ipv6_stats_after, sizeof(ipv6_stats_after)); in test_check_ttl()
2137 ret = zsock_recv(sock_s, &rx_buf, sizeof(rx_buf), 0); in test_check_ttl()
2182 ret = zsock_setsockopt(client_sock, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); in ZTEST()
2185 optlen = sizeof(verify); in ZTEST()
2192 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
2193 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
2194 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
2227 sizeof(mcast_ttl)); in ZTEST()
2230 optlen = sizeof(verify); in ZTEST()
2241 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
2242 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
2243 (struct sockaddr *)&sendto_addr, sizeof(sendto_addr), in ZTEST()
2282 sizeof(opt)); in ZTEST()
2285 optlen = sizeof(verify); in ZTEST()
2295 sizeof(mcast_hops)); in ZTEST()
2298 optlen = sizeof(verify); in ZTEST()
2309 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
2310 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
2311 (struct sockaddr *)&sendto_addr, sizeof(sendto_addr), in ZTEST()
2348 sizeof(hops)); in ZTEST()
2351 optlen = sizeof(verify); in ZTEST()
2359 (struct sockaddr *)&client_addr, sizeof(client_addr), in ZTEST()
2360 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
2361 (struct sockaddr *)&server_addr, sizeof(server_addr), in ZTEST()
2376 unsigned char buf[CMSG_SPACE(sizeof(struct in6_pktinfo))]; in ZTEST_USER()
2384 sizeof(server_addr)); in ZTEST_USER()
2389 sizeof(client_addr)); in ZTEST_USER()
2392 memset(&cmsgbuf, 0, sizeof(cmsgbuf)); in ZTEST_USER()
2397 memset(&msg, 0, sizeof(msg)); in ZTEST_USER()
2401 msg.msg_namelen = sizeof(server_addr); in ZTEST_USER()
2405 sizeof(client_addr), in ZTEST_USER()
2409 sizeof(server_addr), in ZTEST_USER()
2412 sizeof(cmsgbuf.buf), in ZTEST_USER()
2442 sizeof(client_addr)); in ZTEST()
2478 &optval, sizeof(optval)); in check_ipv6_address_preferences()
2485 zassert_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in check_ipv6_address_preferences()
2486 optlen, sizeof(optval)); in check_ipv6_address_preferences()
2585 zexpect_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
2586 optlen, sizeof(optval)); in ZTEST()
2615 optval = 0; optlen = sizeof(int); in ZTEST()
2620 zexpect_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
2621 optlen, sizeof(optval)); in ZTEST()
2624 optval = net_if_get_by_iface(net_if_get_default()); optlen = sizeof(int); in ZTEST()
2628 zexpect_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
2629 optlen, sizeof(optval)); in ZTEST()
2636 zexpect_equal(optlen, sizeof(int), "setsockopt optlen (%d)", optlen); in ZTEST()
2647 ret = zsock_sendto(sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0, in ZTEST()
2648 (struct sockaddr *)&saddr6, sizeof(saddr6)); in ZTEST()
2656 addrlen = sizeof(saddr6); in ZTEST()
2657 ret = zsock_recvfrom(server_sock, rx_buf, sizeof(rx_buf), in ZTEST()
2662 zexpect_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, in ZTEST()
2725 optlen = sizeof(addr); in ZTEST()
2729 zexpect_equal(optlen, sizeof(addr), "invalid optlen %d vs %d", in ZTEST()
2730 optlen, sizeof(addr)); in ZTEST()
2760 optlen = sizeof(mreqn); in ZTEST()
2770 optlen = sizeof(addr); in ZTEST()
2775 zexpect_equal(optlen, sizeof(addr), "setsockopt optlen (%d)", optlen); in ZTEST()
2778 optlen = sizeof(mreqn); in ZTEST()
2788 optlen = sizeof(addr); in ZTEST()
2789 memset(&addr, 0, sizeof(addr)); in ZTEST()
2794 zexpect_equal(optlen, sizeof(addr), "setsockopt optlen (%d)", optlen); in ZTEST()
2814 ret = zsock_sendto(sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0, in ZTEST()
2815 (struct sockaddr *)&dst_addr, sizeof(dst_addr)); in ZTEST()
2821 addrlen = sizeof(saddr4); in ZTEST()
2822 ret = zsock_recvfrom(server_sock, rx_buf, sizeof(rx_buf), in ZTEST()
2827 zexpect_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, in ZTEST()
2831 optlen = sizeof(mreqn); in ZTEST()
2843 optlen = sizeof(mreqn); in ZTEST()
2859 optlen = sizeof(struct in_addr); in ZTEST()
2864 zexpect_equal(optlen, sizeof(struct in_addr), "setsockopt optlen (%d)", optlen); in ZTEST()
2875 ret = zsock_sendto(sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0, in ZTEST()
2876 (struct sockaddr *)&dst_addr, sizeof(dst_addr)); in ZTEST()
2882 addrlen = sizeof(saddr4); in ZTEST()
2883 ret = zsock_recvfrom(server_sock, rx_buf, sizeof(rx_buf), in ZTEST()
2888 zexpect_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, in ZTEST()
2892 optlen = sizeof(mreq); in ZTEST()
2902 ret = zsock_sendto(sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0, in ZTEST()
2903 (struct sockaddr *)&dst_addr, sizeof(dst_addr)); in ZTEST()
2909 addrlen = sizeof(saddr4); in ZTEST()
2910 ret = zsock_recvfrom(server_sock, rx_buf, sizeof(rx_buf), in ZTEST()
2915 zexpect_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, in ZTEST()
2961 &optval, sizeof(optval)); in check_port_range()
2971 optval = 0; optlen = sizeof(uint64_t); in check_port_range()
2979 &optval, sizeof(optval)); in check_port_range()
2987 &optval, sizeof(optval)); in check_port_range()
2992 &optval, sizeof(optval)); in check_port_range()
2998 &optval, sizeof(optval)); in check_port_range()
3001 optval = 0; optlen = sizeof(optval); in check_port_range()
3030 &optval, sizeof(optval)); in check_port_range()
3038 &optval, sizeof(optval)); in check_port_range()
3045 &optval, sizeof(optval)); in check_port_range()
3084 check_port_range((struct sockaddr *)&my_addr4, sizeof(my_addr4), in ZTEST()
3085 (struct sockaddr *)&local_addr4, sizeof(local_addr4)); in ZTEST()
3088 check_port_range((struct sockaddr *)&my_addr6, sizeof(my_addr6), in ZTEST()
3089 (struct sockaddr *)&local_addr6, sizeof(local_addr6)); in ZTEST()