Home
last modified time | relevance | path

Searched refs:max_len (Results 1 – 25 of 35) sorted by relevance

12

/Zephyr-Core-2.7.6/tests/subsys/shell/shell_history/src/
Dshell_history_test.c172 int max_len = get_max_buffer_len(); in test_too_long_line_not_stored() local
177 z_shell_history_put(&history, exp1_buf, max_len + 1); in test_too_long_line_not_stored()
183 z_shell_history_put(&history, exp1_buf, max_len - 10); in test_too_long_line_not_stored()
186 test_get(true, true, exp1_buf, max_len - 10); in test_too_long_line_not_stored()
233 int max_len = get_max_buffer_len(); in test_storing_long_buffers() local
241 z_shell_history_put(&history, exp1_buf, max_len); in test_storing_long_buffers()
242 test_get(true, true, exp1_buf, max_len); in test_storing_long_buffers()
245 z_shell_history_put(&history, exp2_buf, max_len); in test_storing_long_buffers()
246 test_get(true, true, exp2_buf, max_len); in test_storing_long_buffers()
249 z_shell_history_put(&history, exp3_buf, max_len); in test_storing_long_buffers()
[all …]
/Zephyr-Core-2.7.6/subsys/net/lib/coap/
Dcoap.c58 if (cpkt->max_len - cpkt->offset < 1) { in append_u8()
73 if (cpkt->max_len - cpkt->offset < 2) { in append_be16()
89 if (cpkt->max_len - cpkt->offset < len) { in append()
99 int coap_packet_init(struct coap_packet *cpkt, uint8_t *data, uint16_t max_len, in coap_packet_init() argument
106 if (!cpkt || !data || !max_len) { in coap_packet_init()
114 cpkt->max_len = max_len; in coap_packet_init()
150 uint8_t *data, uint16_t max_len, uint8_t code) in coap_ack_init() argument
161 return coap_packet_init(cpkt, data, max_len, ver, COAP_TYPE_ACK, tkl, in coap_ack_init()
368 uint16_t max_len, uint8_t *value) in read_u8() argument
370 if (max_len - offset < 1) { in read_u8()
[all …]
Dcoap_link_format.c30 if (cpkt->max_len - cpkt->offset < 1) { in append_u8()
45 if (cpkt->max_len - cpkt->offset < 2) { in append_be16()
61 if (cpkt->max_len - cpkt->offset < len) { in append()
/Zephyr-Core-2.7.6/include/posix/sys/
Dsocket.h66 static inline ssize_t recv(int sock, void *buf, size_t max_len, int flags) in recv() argument
68 return zsock_recv(sock, buf, max_len, flags); in recv()
84 static inline ssize_t recvfrom(int sock, void *buf, size_t max_len, int flags, in recvfrom() argument
87 return zsock_recvfrom(sock, buf, max_len, flags, src_addr, addrlen); in recvfrom()
/Zephyr-Core-2.7.6/subsys/mgmt/osdp/src/
Dosdp_pd.c388 static int pd_build_reply(struct osdp_pd *pd, uint8_t *buf, int max_len) in pd_build_reply() argument
398 max_len -= data_off; in pd_build_reply()
399 if (max_len <= 0) { in pd_build_reply()
406 if (max_len < REPLY_ACK_LEN) { in pd_build_reply()
414 if (max_len < REPLY_PDID_LEN) { in pd_build_reply()
438 if (max_len < REPLY_PDCAP_LEN) { in pd_build_reply()
447 if (max_len < REPLY_PDCAP_ENTITY_LEN) { in pd_build_reply()
454 max_len -= REPLY_PDCAP_ENTITY_LEN; in pd_build_reply()
459 if (max_len < REPLY_LSTATR_LEN) { in pd_build_reply()
469 if (max_len < REPLY_RSTATR_LEN) { in pd_build_reply()
[all …]
Dosdp_cp.c85 static int cp_build_command(struct osdp_pd *pd, uint8_t *buf, int max_len) in cp_build_command() argument
97 max_len -= data_off; in cp_build_command()
98 if (max_len <= 0) { in cp_build_command()
116 if (max_len < CMD_ID_LEN) { in cp_build_command()
124 if (max_len < CMD_CAP_LEN) { in cp_build_command()
132 if (max_len < CMD_DIAG_LEN) { in cp_build_command()
140 if (max_len < CMD_OUT_LEN) { in cp_build_command()
152 if (max_len < CMD_LED_LEN) { in cp_build_command()
176 if (max_len < CMD_BUZ_LEN) { in cp_build_command()
190 if (max_len < (CMD_TEXT_LEN + cmd->text.length)) { in cp_build_command()
[all …]
Dosdp_phy.c90 int osdp_phy_packet_init(struct osdp_pd *pd, uint8_t *buf, int max_len) in osdp_phy_packet_init() argument
97 if (max_len < exp_len) { in osdp_phy_packet_init()
132 int len, int max_len) in osdp_phy_packet_finalize() argument
175 if (AES_PAD_LEN(data_len + 1) > max_len) { in osdp_phy_packet_finalize()
182 if (len + 4 > max_len) { in osdp_phy_packet_finalize()
201 if (len + 2 > max_len) { in osdp_phy_packet_finalize()
Dosdp_common.h472 int osdp_phy_packet_init(struct osdp_pd *p, uint8_t *buf, int max_len);
474 int len, int max_len);
/Zephyr-Core-2.7.6/drivers/eeprom/
Deeprom_simulator.c78 STATS_SECT_ENTRY32(max_len)
84 STATS_NAME(eeprom_sim_thresholds, max_len)
169 if (eeprom_sim_thresholds.max_len == 0) { in eeprom_sim_write()
177 if ((data_part_ignored) && (len > eeprom_sim_thresholds.max_len)) { in eeprom_sim_write()
178 len = eeprom_sim_thresholds.max_len; in eeprom_sim_write()
/Zephyr-Core-2.7.6/include/net/
Dsocket.h385 __syscall ssize_t zsock_recvfrom(int sock, void *buf, size_t max_len,
401 static inline ssize_t zsock_recv(int sock, void *buf, size_t max_len, in zsock_recv() argument
404 return zsock_recvfrom(sock, buf, max_len, flags, NULL, NULL); in zsock_recv()
686 static inline ssize_t recv(int sock, void *buf, size_t max_len, int flags) in recv() argument
688 return zsock_recv(sock, buf, max_len, flags); in recv()
721 static inline ssize_t recvfrom(int sock, void *buf, size_t max_len, int flags, in recvfrom() argument
724 return zsock_recvfrom(sock, buf, max_len, flags, src_addr, addrlen); in recvfrom()
Dcoap.h230 uint16_t max_len; /* Max CoAP packet data length */ member
378 int coap_packet_init(struct coap_packet *cpkt, uint8_t *data, uint16_t max_len,
398 uint8_t *data, uint16_t max_len, uint8_t code);
/Zephyr-Core-2.7.6/subsys/net/lib/sockets/
Dsockets_packet.c199 ssize_t zpacket_recvfrom_ctx(struct net_context *ctx, void *buf, size_t max_len, in zpacket_recvfrom_ctx() argument
237 if (recv_len > max_len) { in zpacket_recvfrom_ctx()
238 recv_len = max_len; in zpacket_recvfrom_ctx()
343 static ssize_t packet_sock_recvfrom_vmeth(void *obj, void *buf, size_t max_len, in packet_sock_recvfrom_vmeth() argument
347 return zpacket_recvfrom_ctx(obj, buf, max_len, flags, in packet_sock_recvfrom_vmeth()
Dsockets_net_mgmt.c142 size_t max_len, int flags, in znet_mgmt_recvfrom() argument
208 if (ret > max_len) { in znet_mgmt_recvfrom()
351 size_t max_len, int flags, in net_mgmt_sock_recvfrom() argument
355 return znet_mgmt_recvfrom(obj, buf, max_len, flags, in net_mgmt_sock_recvfrom()
Dsockets.c1017 size_t max_len, in zsock_recv_dgram() argument
1106 read_len = MIN(recv_len, max_len); in zsock_recv_dgram()
1136 size_t max_len, in zsock_recv_stream() argument
1202 if (recv_len + read_len > max_len) { in zsock_recv_stream()
1203 read_len = max_len - recv_len; in zsock_recv_stream()
1247 } while ((recv_len == 0) || (waitall && (recv_len < max_len))); in zsock_recv_stream()
1256 ssize_t zsock_recvfrom_ctx(struct net_context *ctx, void *buf, size_t max_len, in zsock_recvfrom_ctx() argument
1262 if (max_len == 0) { in zsock_recvfrom_ctx()
1267 return zsock_recv_dgram(ctx, buf, max_len, flags, src_addr, addrlen); in zsock_recvfrom_ctx()
1269 return zsock_recv_stream(ctx, buf, max_len, flags); in zsock_recvfrom_ctx()
[all …]
Dsockets_tls.c1699 size_t max_len, int flags) in recv_tls() argument
1706 size_t read_len = max_len - recv_len; in recv_tls()
1746 } while (waitall && (recv_len < max_len)); in recv_tls()
1753 size_t max_len, int flags, in recvfrom_dtls_common() argument
1759 ret = mbedtls_ssl_read(&ctx->ssl, buf, max_len); in recvfrom_dtls_common()
1773 if ((remaining == 0) || (max_len == 0)) { in recvfrom_dtls_common()
1800 size_t max_len, int flags, in recvfrom_dtls_client() argument
1811 ret = recvfrom_dtls_common(ctx, buf, max_len, flags, src_addr, addrlen); in recvfrom_dtls_client()
1848 size_t max_len, int flags, in recvfrom_dtls_server() argument
1896 ret = recvfrom_dtls_common(ctx, buf, max_len, flags, in recvfrom_dtls_server()
[all …]
Dsockets_can.c257 size_t max_len, int flags, in zcan_recvfrom_ctx() argument
296 if (recv_len > max_len) { in zcan_recvfrom_ctx()
297 recv_len = max_len; in zcan_recvfrom_ctx()
475 static ssize_t can_sock_recvfrom_vmeth(void *obj, void *buf, size_t max_len, in can_sock_recvfrom_vmeth() argument
479 return zcan_recvfrom_ctx(obj, buf, max_len, flags, in can_sock_recvfrom_vmeth()
Dsockets_internal.h59 ssize_t (*recvfrom)(void *obj, void *buf, size_t max_len, int flags,
/Zephyr-Core-2.7.6/drivers/flash/
Dflash_simulator.c120 STATS_SECT_ENTRY32(max_len)
127 STATS_NAME(flash_sim_thresholds, max_len)
243 if (flash_sim_thresholds.max_len == 0) { in flash_sim_write()
255 if (i >= flash_sim_thresholds.max_len) { in flash_sim_write()
/Zephyr-Core-2.7.6/subsys/net/ip/
Dnet_pkt.c956 size_t max_len; local
959 max_len = net_if_get_mtu(net_pkt_iface(pkt));
961 max_len = 0;
966 if (IS_ENABLED(CONFIG_NET_IPV6_FRAGMENT) && (size > max_len)) {
970 max_len = size;
973 max_len = MAX(max_len, NET_IPV6_MTU);
975 max_len = MAX(max_len, NET_IPV4_MTU);
980 max_len += NET_ETH_MAX_HDR_SIZE;
987 max_len = size;
991 max_len -= existing;
[all …]
/Zephyr-Core-2.7.6/samples/net/civetweb/common/src/
Dlibc_extensions.c192 ssize_t recv(int sock, void *buf, size_t max_len, int flags) in recv() argument
194 return zsock_recv(sock, buf, max_len, flags); in recv()
/Zephyr-Core-2.7.6/drivers/wifi/eswifi/
Deswifi_socket_offload.c292 static ssize_t eswifi_socket_recv(void *obj, void *buf, size_t max_len, in eswifi_socket_recv() argument
300 if ((max_len == 0) || (buf == NULL) || in eswifi_socket_recv()
322 if (len > max_len) { in eswifi_socket_recv()
323 len = max_len; in eswifi_socket_recv()
/Zephyr-Core-2.7.6/samples/net/civetweb/common/include/
Dlibc_extensions.h58 ssize_t recv(int sock, void *buf, size_t max_len, int flags);
/Zephyr-Core-2.7.6/subsys/bluetooth/controller/ll_sw/openisa/hal/RV32M1/radio/
Dradio.h24 void radio_pkt_configure(uint8_t bits_len, uint8_t max_len, uint8_t flags);
/Zephyr-Core-2.7.6/samples/net/sockets/websocket_client/src/
Dmain.c165 static size_t how_much_to_send(size_t max_len) in how_much_to_send() argument
170 amount = sys_rand32_get() % max_len; in how_much_to_send()
/Zephyr-Core-2.7.6/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/
Dradio.h24 void radio_pkt_configure(uint8_t bits_len, uint8_t max_len, uint8_t flags);

12