/Zephyr-latest/tests/subsys/shell/shell_history/src/ |
D | shell_history_test.c | 172 int max_len = get_max_buffer_len(); in ZTEST() local 177 z_shell_history_put(&history, exp1_buf, max_len + 1); in ZTEST() 183 z_shell_history_put(&history, exp1_buf, max_len - 10); in ZTEST() 186 test_get(true, true, exp1_buf, max_len - 10); in ZTEST() 233 int max_len = get_max_buffer_len(); in ZTEST() local 241 z_shell_history_put(&history, exp1_buf, max_len); in ZTEST() 242 test_get(true, true, exp1_buf, max_len); in ZTEST() 245 z_shell_history_put(&history, exp2_buf, max_len); in ZTEST() 246 test_get(true, true, exp2_buf, max_len); in ZTEST() 249 z_shell_history_put(&history, exp3_buf, max_len); in ZTEST() [all …]
|
/Zephyr-latest/drivers/eeprom/ |
D | eeprom_simulator.c | 72 STATS_SECT_ENTRY32(max_len) 78 STATS_NAME(eeprom_sim_thresholds, max_len) 166 if (eeprom_sim_thresholds.max_len == 0) { in eeprom_sim_write() 174 if ((data_part_ignored) && (len > eeprom_sim_thresholds.max_len)) { in eeprom_sim_write() 175 len = eeprom_sim_thresholds.max_len; in eeprom_sim_write()
|
/Zephyr-latest/subsys/net/lib/coap/ |
D | coap.c | 93 return (cpkt != NULL) && (cpkt->max_len - cpkt->offset >= bytes_to_add); in enough_space() 169 int coap_packet_init(struct coap_packet *cpkt, uint8_t *data, uint16_t max_len, in coap_packet_init() argument 176 if (!cpkt || !data || !max_len) { in coap_packet_init() 184 cpkt->max_len = max_len; in coap_packet_init() 220 uint8_t *data, uint16_t max_len, uint8_t code) in coap_ack_init() argument 231 return coap_packet_init(cpkt, data, max_len, ver, COAP_TYPE_ACK, tkl, in coap_ack_init() 236 uint8_t *data, uint16_t max_len) in coap_rst_init() argument 244 return coap_packet_init(cpkt, data, max_len, ver, COAP_TYPE_RESET, 0, in coap_rst_init() 457 uint16_t max_len, uint8_t *value) in read_u8() argument 459 if (max_len - offset < 1) { in read_u8() [all …]
|
/Zephyr-latest/subsys/mgmt/osdp/src/ |
D | osdp_pd.c | 573 static int pd_build_reply(struct osdp_pd *pd, uint8_t *buf, int max_len) in pd_build_reply() argument 584 max_len -= data_off; in pd_build_reply() 588 if (!check_buf_len(REPLY_ACK_LEN, max_len)) { in pd_build_reply() 595 if (!check_buf_len(REPLY_PDID_LEN, max_len)) { in pd_build_reply() 618 if (!check_buf_len(REPLY_PDCAP_LEN, max_len)) { in pd_build_reply() 626 if (max_len < REPLY_PDCAP_ENTITY_LEN) { in pd_build_reply() 633 max_len -= REPLY_PDCAP_ENTITY_LEN; in pd_build_reply() 638 if (!check_buf_len(REPLY_LSTATR_LEN, max_len)) { in pd_build_reply() 647 if (!check_buf_len(REPLY_RSTATR_LEN, max_len)) { in pd_build_reply() 656 if (!check_buf_len(REPLY_KEYPAD_LEN + event->keypress.length, max_len)) { in pd_build_reply() [all …]
|
D | osdp_cp.c | 126 static int cp_build_command(struct osdp_pd *pd, uint8_t *buf, int max_len) in cp_build_command() argument 136 max_len -= data_off; in cp_build_command() 137 if (max_len <= 0) { in cp_build_command() 143 if (!check_buf_len(CMD_POLL_LEN, max_len)) { in cp_build_command() 149 if (!check_buf_len(CMD_LSTAT_LEN, max_len)) { in cp_build_command() 155 if (!check_buf_len(CMD_ISTAT_LEN, max_len)) { in cp_build_command() 161 if (!check_buf_len(CMD_OSTAT_LEN, max_len)) { in cp_build_command() 167 if (!check_buf_len(CMD_RSTAT_LEN, max_len)) { in cp_build_command() 173 if (!check_buf_len(CMD_ID_LEN, max_len)) { in cp_build_command() 180 if (!check_buf_len(CMD_CAP_LEN, max_len)) { in cp_build_command() [all …]
|
D | osdp_phy.c | 108 int osdp_phy_packet_init(struct osdp_pd *pd, uint8_t *buf, int max_len) in osdp_phy_packet_init() argument 114 if (max_len < exp_len) { in osdp_phy_packet_init() 159 int len, int max_len) in osdp_phy_packet_finalize() argument 179 max_len -= 1; in osdp_phy_packet_finalize() 215 if (AES_PAD_LEN(data_len + 1) > max_len) { in osdp_phy_packet_finalize() 222 if (len + 4 > max_len) { in osdp_phy_packet_finalize() 239 if (len + 2 > max_len) { in osdp_phy_packet_finalize()
|
/Zephyr-latest/include/zephyr/posix/sys/ |
D | socket.h | 37 ssize_t recv(int sock, void *buf, size_t max_len, int flags); 38 ssize_t recvfrom(int sock, void *buf, size_t max_len, int flags, struct sockaddr *src_addr,
|
/Zephyr-latest/include/zephyr/mgmt/mcumgr/grp/os_mgmt/ |
D | os_mgmt_client.h | 53 int os_mgmt_client_echo(struct os_mgmt_client *client, const char *echo_string, size_t max_len);
|
/Zephyr-latest/tests/net/socket/reuseaddr_reuseport/src/ |
D | main.c | 218 static void test_recvfrom_success(int sock, void *buf, size_t max_len, int flags, in test_recvfrom_success() argument 223 ret = zsock_recvfrom(sock, buf, max_len, flags, src_addr, addrlen); in test_recvfrom_success() 224 zassert_equal(ret, max_len, "recvfrom failed with error %d", errno); in test_recvfrom_success() 227 static void test_recvfrom_fail(int sock, void *buf, size_t max_len, int flags, in test_recvfrom_fail() argument 232 ret = zsock_recvfrom(sock, buf, max_len, flags, src_addr, addrlen); in test_recvfrom_fail() 238 static void test_recv_success(int sock, void *buf, size_t max_len, int flags) in test_recv_success() argument 242 ret = zsock_recv(sock, buf, max_len, flags); in test_recv_success() 243 zassert_equal(ret, max_len, "recv failed with error %d", errno); in test_recv_success() 246 static void test_recv_fail(int sock, void *buf, size_t max_len, int flags) in test_recv_fail() argument 250 ret = zsock_recv(sock, buf, max_len, flags); in test_recv_fail()
|
/Zephyr-latest/tests/net/lib/coap_client/src/ |
D | main.c | 121 static ssize_t z_impl_zsock_recvfrom_custom_fake(int sock, void *buf, size_t max_len, int flags, in z_impl_zsock_recvfrom_custom_fake() argument 269 static ssize_t z_impl_zsock_recvfrom_custom_fake_response(int sock, void *buf, size_t max_len, in z_impl_zsock_recvfrom_custom_fake_response() argument 291 static ssize_t z_impl_zsock_recvfrom_custom_fake_empty_ack(int sock, void *buf, size_t max_len, in z_impl_zsock_recvfrom_custom_fake_empty_ack() argument 312 static ssize_t z_impl_zsock_recvfrom_custom_fake_rst(int sock, void *buf, size_t max_len, int flags, in z_impl_zsock_recvfrom_custom_fake_rst() argument 331 static ssize_t z_impl_zsock_recvfrom_custom_fake_only_ack(int sock, void *buf, size_t max_len, in z_impl_zsock_recvfrom_custom_fake_only_ack() argument 337 ret = z_impl_zsock_recvfrom_custom_fake_empty_ack(sock, buf, max_len, flags, src_addr, in z_impl_zsock_recvfrom_custom_fake_only_ack() 343 static ssize_t z_impl_zsock_recvfrom_custom_fake_unmatching(int sock, void *buf, size_t max_len, in z_impl_zsock_recvfrom_custom_fake_unmatching() argument 364 static ssize_t z_impl_zsock_recvfrom_custom_fake_echo(int sock, void *buf, size_t max_len, in z_impl_zsock_recvfrom_custom_fake_echo() argument 391 static ssize_t z_impl_zsock_recvfrom_custom_fake_echo_next_req(int sock, void *buf, size_t max_len, in z_impl_zsock_recvfrom_custom_fake_echo_next_req() argument 419 size_t max_len, int flags, in z_impl_zsock_recvfrom_custom_fake_duplicate_response() argument [all …]
|
/Zephyr-latest/subsys/net/lib/sockets/ |
D | sockets_net_mgmt.c | 142 size_t max_len, int flags, in znet_mgmt_recvfrom() argument 208 if (ret > max_len) { in znet_mgmt_recvfrom() 352 size_t max_len, int flags, in net_mgmt_sock_recvfrom() argument 356 return znet_mgmt_recvfrom(obj, buf, max_len, flags, in net_mgmt_sock_recvfrom()
|
D | sockets_inet.c | 1053 size_t max_len, in zsock_recv_dgram() argument 1147 tmp_read_len = read_len = MIN(recv_len, max_len); in zsock_recv_dgram() 1183 read_len = MIN(recv_len, max_len); in zsock_recv_dgram() 1242 static size_t zsock_recv_stream_immediate(struct net_context *ctx, uint8_t **buf, size_t *max_len, in zsock_recv_stream_immediate() argument 1251 const bool do_recv = !(buf == NULL || max_len == NULL); in zsock_recv_stream_immediate() 1252 size_t _max_len = (max_len == NULL) ? SIZE_MAX : *max_len; in zsock_recv_stream_immediate() 1309 *max_len = _max_len; in zsock_recv_stream_immediate() 1323 uint8_t *buf, size_t max_len, in zsock_recv_stream_timed() argument 1342 for (end = sys_timepoint_calc(timeout); max_len > 0; timeout = sys_timepoint_timeout(end)) { in zsock_recv_stream_timed() 1370 max_len -= res; in zsock_recv_stream_timed() [all …]
|
D | sockets_packet.c | 297 ssize_t zpacket_recvfrom_ctx(struct net_context *ctx, void *buf, size_t max_len, in zpacket_recvfrom_ctx() argument 335 if (recv_len > max_len) { in zpacket_recvfrom_ctx() 336 recv_len = max_len; in zpacket_recvfrom_ctx() 445 static ssize_t packet_sock_recvfrom_vmeth(void *obj, void *buf, size_t max_len, in packet_sock_recvfrom_vmeth() argument 449 return zpacket_recvfrom_ctx(obj, buf, max_len, flags, in packet_sock_recvfrom_vmeth()
|
D | sockets_can.c | 276 size_t max_len, int flags, in zcan_recvfrom_ctx() argument 327 if (recv_len > max_len) { in zcan_recvfrom_ctx() 328 recv_len = max_len; in zcan_recvfrom_ctx() 506 static ssize_t can_sock_recvfrom_vmeth(void *obj, void *buf, size_t max_len, in can_sock_recvfrom_vmeth() argument 510 return zcan_recvfrom_ctx(obj, buf, max_len, flags, in can_sock_recvfrom_vmeth()
|
D | sockets.c | 477 ssize_t z_impl_zsock_recvfrom(int sock, void *buf, size_t max_len, int flags, in z_impl_zsock_recvfrom() argument 482 SYS_PORT_TRACING_OBJ_FUNC_ENTER(socket, recvfrom, sock, max_len, flags, src_addr, addrlen); in z_impl_zsock_recvfrom() 484 bytes_received = VTABLE_CALL(recvfrom, sock, buf, max_len, flags, src_addr, addrlen); in z_impl_zsock_recvfrom() 496 ssize_t z_vrfy_zsock_recvfrom(int sock, void *buf, size_t max_len, int flags, in z_vrfy_zsock_recvfrom() argument 502 if (K_SYSCALL_MEMORY_WRITE(buf, max_len)) { in z_vrfy_zsock_recvfrom() 513 ret = z_impl_zsock_recvfrom(sock, (void *)buf, max_len, flags, in z_vrfy_zsock_recvfrom()
|
D | sockets_tls.c | 2570 size_t max_len, int flags) in recv_tls() argument 2597 size_t read_len = max_len - recv_len; in recv_tls() 2664 } while ((recv_len == 0) || (waitall && (recv_len < max_len))); in recv_tls() 2671 size_t max_len, int flags, in recvfrom_dtls_common() argument 2696 ret = mbedtls_ssl_read(&ctx->ssl, buf, max_len); in recvfrom_dtls_common() 2749 if ((remaining == 0) || (max_len == 0)) { in recvfrom_dtls_common() 2778 size_t max_len, int flags, in recvfrom_dtls_client() argument 2789 ret = recvfrom_dtls_common(ctx, buf, max_len, flags, src_addr, addrlen); in recvfrom_dtls_client() 2844 size_t max_len, int flags, in recvfrom_dtls_server() argument 2893 ret = recvfrom_dtls_common(ctx, buf, max_len, flags, in recvfrom_dtls_server() [all …]
|
/Zephyr-latest/lib/posix/options/ |
D | net.c | 342 ssize_t recv(int sock, void *buf, size_t max_len, int flags) in recv() argument 344 return zsock_recv(sock, buf, max_len, flags); in recv() 347 ssize_t recvfrom(int sock, void *buf, size_t max_len, int flags, struct sockaddr *src_addr, in recvfrom() argument 350 return zsock_recvfrom(sock, buf, max_len, flags, src_addr, addrlen); in recvfrom()
|
/Zephyr-latest/subsys/mgmt/mcumgr/grp/os_mgmt_client/src/ |
D | os_mgmt_client.c | 122 int os_mgmt_client_echo(struct os_mgmt_client *client, const char *echo_string, size_t max_len) in os_mgmt_client_echo() argument 142 zcbor_tstr_put_term(zse, echo_string, max_len) && in os_mgmt_client_echo()
|
/Zephyr-latest/drivers/flash/ |
D | flash_simulator.c | 117 STATS_SECT_ENTRY32(max_len) 124 STATS_NAME(flash_sim_thresholds, max_len) 258 if (flash_sim_thresholds.max_len == 0) { in flash_sim_write() 270 if (i >= flash_sim_thresholds.max_len) { in flash_sim_write()
|
/Zephyr-latest/include/zephyr/net/ |
D | coap.h | 315 uint16_t max_len; /**< Max CoAP packet data length */ member 533 int coap_packet_init(struct coap_packet *cpkt, uint8_t *data, uint16_t max_len, 553 uint8_t *data, uint16_t max_len, uint8_t code); 569 uint8_t *data, uint16_t max_len);
|
D | socket.h | 487 __syscall ssize_t zsock_recvfrom(int sock, void *buf, size_t max_len, 513 static inline ssize_t zsock_recv(int sock, void *buf, size_t max_len, in zsock_recv() argument 516 return zsock_recvfrom(sock, buf, max_len, flags, NULL, NULL); in zsock_recv()
|
/Zephyr-latest/subsys/net/ip/ |
D | net_pkt.c | 1077 size_t max_len; local 1080 max_len = net_if_get_mtu(net_pkt_iface(pkt)); 1082 max_len = 0; 1087 if (IS_ENABLED(CONFIG_NET_IPV6_FRAGMENT) && (size > max_len)) { 1091 max_len = size; 1094 max_len = MAX(max_len, NET_IPV6_MTU); 1096 if (IS_ENABLED(CONFIG_NET_IPV4_FRAGMENT) && (size > max_len)) { 1098 max_len = size; 1101 max_len = MAX(max_len, NET_IPV4_MTU); 1106 max_len += NET_ETH_MAX_HDR_SIZE; [all …]
|
/Zephyr-latest/drivers/ethernet/ |
D | eth_ivshmem_queue.c | 26 static uint32_t tx_buffer_advance(uint32_t max_len, uint32_t *position, uint32_t *len); 252 static uint32_t tx_buffer_advance(uint32_t max_len, uint32_t *position, uint32_t *len) in tx_buffer_advance() argument 255 uint32_t contiguous_len = max_len - *position; in tx_buffer_advance()
|
/Zephyr-latest/drivers/wifi/eswifi/ |
D | eswifi_socket_offload.c | 320 static ssize_t eswifi_socket_recv(void *obj, void *buf, size_t max_len, in eswifi_socket_recv() argument 328 if ((max_len == 0) || (buf == NULL) || in eswifi_socket_recv() 366 if (len > max_len) { in eswifi_socket_recv() 367 len = max_len; in eswifi_socket_recv()
|
/Zephyr-latest/tests/net/lib/lwm2m/lwm2m_engine/src/ |
D | stubs.c | 110 ssize_t z_impl_zsock_recvfrom(int sock, void *buf, size_t max_len, int flags, in z_impl_zsock_recvfrom() argument
|