Lines Matching refs:rx_buf
186 char rx_buf[1]; in test_eof() local
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()
361 uint8_t rx_buf; in test_prepare_dtls_connection() local
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() local
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()
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() local
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()
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() local
555 memset(rx_buf, 0, sizeof(rx_buf)); in test_msg_trunc()
556 rv = zsock_recv(s_sock, rx_buf, 2, ZSOCK_MSG_TRUNC); in test_msg_trunc()
558 zassert_mem_equal(rx_buf, TEST_STR_SMALL, 2, "invalid rx data"); in test_msg_trunc()
559 zassert_equal(rx_buf[2], 0, "received more than requested"); 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() local
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()
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()
647 zassert_mem_equal(rx_buf, TEST_STR_SMALL, sizeof(TEST_STR_SMALL) - 1, "invalid rx data"); in test_dtls_sendmsg_no_buf()
852 uint8_t rx_buf; in ZTEST() local
861 ret = zsock_recv(new_sock, &rx_buf, sizeof(rx_buf), 0); in ZTEST()
950 char rx_buf[32]; in fake_tcp_server_work() local
952 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in fake_tcp_server_work()
1092 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST() local
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()
1116 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); 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() local
1144 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1146 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1173 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST() local
1204 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1206 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1216 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1218 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1221 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1241 char rx_buf[30] = { 0 }; in recv_work_handler() local
1246 size_t recvlen = MIN(sizeof(rx_buf), test_data->datalen - off); in recv_work_handler()
1248 ret = zsock_recv(test_data->sock, rx_buf, recvlen, 0); in recv_work_handler()
1250 zassert_mem_equal(rx_buf, test_data->data + off, ret, in recv_work_handler()
1263 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1] = { 0 }; in ZTEST() local
1294 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1296 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); 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() local
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() local
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()
1393 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1507 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST() local
1531 ret = zsock_recv(c_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1533 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1536 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), 0); in ZTEST()
1538 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1547 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST() local
1567 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1569 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1578 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST() local
1603 ret = zsock_recv(s_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1605 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1616 uint8_t rx_buf[sizeof(TEST_STR_SMALL) - 1]; in ZTEST() local
1648 ret = zsock_recv(new_sock, rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1650 zassert_mem_equal(rx_buf, TEST_STR_SMALL, ret, "Invalid data received"); in ZTEST()
1685 uint8_t rx_buf; in ZTEST() local
1702 ret = zsock_recv(new_sock, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1713 uint8_t rx_buf; in ZTEST() local
1729 ret = zsock_recv(s_sock, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1743 uint8_t rx_buf; in ZTEST() local
1769 ret = zsock_recv(new_sock, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()
1780 uint8_t rx_buf; in ZTEST() local
1807 ret = zsock_recv(s_sock, &rx_buf, sizeof(rx_buf), ZSOCK_MSG_DONTWAIT); in ZTEST()