Lines Matching full:sizeof

69 					 psk, sizeof(psk)),  in test_config_psk()
77 sec_tag_list, sizeof(sec_tag_list)), in test_config_psk()
83 sec_tag_list, sizeof(sec_tag_list)), in test_config_psk()
190 recved = zsock_recv(sock, rx_buf, sizeof(rx_buf), 0); in test_eof()
194 recved = zsock_recv(sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in test_eof()
199 recved = zsock_recv(sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in test_eof()
209 socklen_t optlen = sizeof(optval); in ZTEST()
217 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
222 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
234 socklen_t optlen = sizeof(optval); in ZTEST()
243 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
249 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
290 sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)); in client_connect_work_handler()
301 sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)); in dtls_client_connect_send_work_handler()
302 test_send(data->sock, &tx_buf, sizeof(tx_buf), 0); in dtls_client_connect_send_work_handler()
310 sizeof(struct sockaddr_in6) : in test_prepare_tls_connection()
311 sizeof(struct sockaddr_in); in test_prepare_tls_connection()
313 socklen_t addrlen = sizeof(addr); in test_prepare_tls_connection()
356 sizeof(struct sockaddr_in6) : in test_prepare_dtls_connection()
357 sizeof(struct sockaddr_in); in test_prepare_dtls_connection()
384 &role, sizeof(role)), in test_prepare_dtls_connection()
404 ret = zsock_recv(s_sock, &rx_buf, sizeof(rx_buf), 0); in test_prepare_dtls_connection()
405 zassert_equal(ret, sizeof(rx_buf), "recv() failed"); in test_prepare_dtls_connection()
416 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
428 test_data.retries = sizeof(rx_buf); in ZTEST()
434 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_WAITALL); in ZTEST()
435 zassert_equal(ret, sizeof(rx_buf), "Invalid length received"); in ZTEST()
436 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(rx_buf), in ZTEST()
444 sizeof(timeo_optval)); in ZTEST()
447 memset(rx_buf, 0, sizeof(rx_buf)); in ZTEST()
449 test_data.retries = sizeof(rx_buf) - 1; in ZTEST()
455 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf) - 1, ZSOCK_MSG_WAITALL); in ZTEST()
456 zassert_equal(ret, sizeof(rx_buf) - 1, "Invalid length received"); in ZTEST()
457 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(rx_buf) - 1, in ZTEST()
472 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
484 test_data.retries = sizeof(rx_buf); in ZTEST()
490 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_WAITALL); in ZTEST()
491 zassert_equal(ret, sizeof(rx_buf), "Invalid length received"); in ZTEST()
492 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(rx_buf), in ZTEST()
500 sizeof(timeo_optval)); in ZTEST()
503 memset(rx_buf, 0, sizeof(rx_buf)); in ZTEST()
505 test_data.retries = sizeof(rx_buf) - 1; in ZTEST()
511 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf) - 1, ZSOCK_MSG_WAITALL); in ZTEST()
512 zassert_equal(ret, sizeof(rx_buf) - 1, "Invalid length received"); in ZTEST()
513 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(rx_buf) - 1, in ZTEST()
541 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in test_msg_trunc()
544 .datalen = sizeof(TEST_STR_SMALL) - 1 in test_msg_trunc()
555 memset(rx_buf, 0, sizeof(rx_buf)); in test_msg_trunc()
557 zassert_equal(rv, sizeof(TEST_STR_SMALL) - 1, "MSG_TRUNC flag failed"); in test_msg_trunc()
562 rv = zsock_recv(s_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in test_msg_trunc()
604 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in test_dtls_sendmsg_no_buf()
609 .iov_len = sizeof(TEST_STR_SMALL) - 1, in test_dtls_sendmsg_no_buf()
630 memset(rx_buf, 0, sizeof(rx_buf)); in test_dtls_sendmsg_no_buf()
631 rv = zsock_recv(s_sock, rx_buf, sizeof(rx_buf), 0); in test_dtls_sendmsg_no_buf()
632 zassert_equal(rv, sizeof(TEST_STR_SMALL) - 1, "recv failed"); in test_dtls_sendmsg_no_buf()
633 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, "invalid rx data"); in test_dtls_sendmsg_no_buf()
644 memset(rx_buf, 0, sizeof(rx_buf)); in test_dtls_sendmsg_no_buf()
645 rv = zsock_recv(s_sock, rx_buf, sizeof(rx_buf), 0); in test_dtls_sendmsg_no_buf()
646 zassert_equal(rv, sizeof(TEST_STR_SMALL) - 1, "recv failed"); in test_dtls_sendmsg_no_buf()
647 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, "invalid rx data"); in test_dtls_sendmsg_no_buf()
654 iov[0].iov_len = sizeof(TEST_STR_SMALL) - 1; in test_dtls_sendmsg_no_buf()
693 .iov_len = sizeof(TEST_STR_SMALL) - 1, in test_dtls_sendmsg()
697 .iov_len = sizeof(TEST_STR_SMALL) - 1, in test_dtls_sendmsg()
718 memset(buf, 0, sizeof(buf)); in test_dtls_sendmsg()
719 rv = zsock_recv(s_sock, buf, sizeof(buf), 0); in test_dtls_sendmsg()
720 zassert_equal(rv, sizeof(expected_str) - 1, "recv failed"); in test_dtls_sendmsg()
721 zassert_mem_equal(buf, expected_str, sizeof(expected_str) - 1, "invalid rx data"); in test_dtls_sendmsg()
730 iov[2].iov_len = sizeof(TEST_STR_SMALL) - 1; in test_dtls_sendmsg()
736 memset(buf, 0, sizeof(buf)); in test_dtls_sendmsg()
737 rv = zsock_recv(s_sock, buf, sizeof(buf), 0); in test_dtls_sendmsg()
738 zassert_equal(rv, sizeof(expected_str) - 1, "recv failed"); in test_dtls_sendmsg()
739 zassert_mem_equal(buf, expected_str, sizeof(expected_str) - 1, "invalid rx data"); in test_dtls_sendmsg()
747 memset(buf, 'a', sizeof(buf)); in test_dtls_sendmsg()
749 iov[0].iov_len = sizeof(buf); in test_dtls_sendmsg()
758 memset(buf, 0, sizeof(buf)); in test_dtls_sendmsg()
759 rv = zsock_recv(s_sock, buf, sizeof(buf), 0); in test_dtls_sendmsg()
760 zassert_equal(rv, sizeof(buf), "recv failed"); in test_dtls_sendmsg()
761 for (int i = 0; i < sizeof(buf); i++) { in test_dtls_sendmsg()
770 iov[0].iov_len = sizeof(buf); in test_dtls_sendmsg()
772 iov[1].iov_len = sizeof(dummy_byte); in test_dtls_sendmsg()
822 socklen_t addrlen = sizeof(addr); in ZTEST()
829 test_bind(s_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
861 ret = zsock_recv(new_sock, &rx_buf, sizeof(rx_buf), 0); in ZTEST()
890 sizeof(s_saddr)), in ZTEST()
917 sizeof(s_saddr)), in ZTEST()
952 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in fake_tcp_server_work()
957 (void)zsock_send(new_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL), 0); in fake_tcp_server_work()
970 sizeof(struct sockaddr_in6) : in test_prepare_fake_tcp_server()
971 sizeof(struct sockaddr_in); in test_prepare_fake_tcp_server()
1003 sizeof(s_saddr)), in ZTEST()
1030 sizeof(s_saddr)), in ZTEST()
1051 test_bind(s_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1074 test_bind(s_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1078 test_connect(c_sock, (struct sockaddr *)&s_saddr, sizeof(s_saddr)); in ZTEST()
1079 test_send(c_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL), 0); in ZTEST()
1092 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
1097 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1103 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1114 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1119 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1131 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
1134 .datalen = sizeof(TEST_STR_SMALL) - 1 in ZTEST()
1144 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1145 zassert_equal(ret, sizeof(TEST_STR_SMALL) - 1, "recv() failed"); in ZTEST()
1173 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
1174 int buf_optval = TLS_RECORD_OVERHEAD + sizeof(TEST_STR_SMALL) - 1; in ZTEST()
1180 sizeof(buf_optval)); in ZTEST()
1204 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1216 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1221 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1246 size_t recvlen = MIN(sizeof(rx_buf), test_data->datalen - off); in recv_work_handler()
1262 int buf_optval = TLS_RECORD_OVERHEAD + sizeof(TEST_STR_SMALL) - 1; in ZTEST()
1263 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
1266 .datalen = sizeof(TEST_STR_SMALL) - 1 in ZTEST()
1273 sizeof(buf_optval)); in ZTEST()
1294 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1299 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1310 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST()
1327 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1344 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1359 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST()
1367 .datalen = sizeof(TEST_STR_SMALL) - 1 in ZTEST()
1374 sizeof(optval)); in ZTEST()
1378 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1391 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1392 zassert_equal(ret, sizeof(TEST_STR_SMALL) - 1, "recv() failed"); in ZTEST()
1402 int buf_optval = TLS_RECORD_OVERHEAD + sizeof(TEST_STR_SMALL) - 1; in ZTEST()
1410 .datalen = sizeof(TEST_STR_SMALL) - 1 in ZTEST()
1417 sizeof(timeo_optval)); in ZTEST()
1422 sizeof(buf_optval)); in ZTEST()
1425 ret = zsock_send(c_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in ZTEST()
1426 zassert_equal(ret, sizeof(TEST_STR_SMALL) - 1, "send() failed"); in ZTEST()
1433 ret = zsock_send(c_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in ZTEST()
1507 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST()
1510 .datalen = sizeof(TEST_STR_SMALL) - 1 in ZTEST()
1514 .datalen = sizeof(TEST_STR_SMALL) - 1 in ZTEST()
1531 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1532 zassert_equal(ret, sizeof(TEST_STR_SMALL) - 1, "recv() failed"); in ZTEST()
1536 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1537 zassert_equal(ret, sizeof(TEST_STR_SMALL) - 1, "recv() failed"); in ZTEST()
1547 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST()
1559 ret = zsock_send(c_sock, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, 0); in ZTEST()
1567 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1568 zassert_equal(ret, sizeof(TEST_STR_SMALL) - 1, "recv() failed"); in ZTEST()
1578 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST()
1581 .datalen = sizeof(TEST_STR_SMALL) - 1 in ZTEST()
1603 ret = zsock_recv(s_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1604 zassert_equal(ret, sizeof(TEST_STR_SMALL) - 1, "recv() failed"); in ZTEST()
1615 int buf_optval = TLS_RECORD_OVERHEAD + sizeof(TEST_STR_SMALL) - 1; in ZTEST()
1616 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST()
1631 sizeof(buf_optval)); in ZTEST()
1648 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1649 zassert_equal(ret, sizeof(TEST_STR_SMALL) - 1, "recv() failed"); in ZTEST()
1702 ret = zsock_recv(new_sock, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1729 ret = zsock_recv(s_sock, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1747 socklen_t optlen = sizeof(optval); in ZTEST()
1769 ret = zsock_recv(new_sock, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1784 socklen_t optlen = sizeof(optval); in ZTEST()
1807 ret = zsock_recv(s_sock, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()