Home
last modified time | relevance | path

Searched refs:nb (Results 1 – 25 of 28) sorted by relevance

12

/Zephyr-Core-3.4.0/subsys/mgmt/mcumgr/transport/src/
Dsmp_dummy.c92 struct net_buf *nb; in smp_dummy_process_frag() local
97 nb = mcumgr_dummy_process_frag(&smp_dummy_rx_ctxt, in smp_dummy_process_frag()
106 if (nb != NULL) { in smp_dummy_process_frag()
107 smp_rx_req(&smp_dummy_transport, nb); in smp_dummy_process_frag()
118 struct net_buf *nb; in smp_dummy_process_frag_outgoing() local
123 nb = mcumgr_dummy_process_frag_outgoing(&smp_dummy_tx_ctxt, in smp_dummy_process_frag_outgoing()
126 return nb; in smp_dummy_process_frag_outgoing()
153 static uint16_t smp_dummy_get_mtu(const struct net_buf *nb) in smp_dummy_get_mtu() argument
178 static int smp_dummy_tx_pkt_int(struct net_buf *nb) in smp_dummy_tx_pkt_int() argument
182 rc = mcumgr_dummy_tx_pkt(nb->data, nb->len, dummy_mcumgr_send_raw); in smp_dummy_tx_pkt_int()
[all …]
Dserial_util.c22 if (rx_ctxt->nb != NULL) { in mcumgr_serial_free_rx_ctxt()
23 smp_packet_free(rx_ctxt->nb); in mcumgr_serial_free_rx_ctxt()
24 rx_ctxt->nb = NULL; in mcumgr_serial_free_rx_ctxt()
35 if (rx_ctxt->nb->len < 2) { in mcumgr_serial_extract_len()
39 rx_ctxt->pkt_len = net_buf_pull_be16(rx_ctxt->nb); in mcumgr_serial_extract_len()
49 rc = base64_decode(rx_ctxt->nb->data + rx_ctxt->nb->len, in mcumgr_serial_decode_frag()
50 net_buf_tailroom(rx_ctxt->nb), &dec_len, in mcumgr_serial_decode_frag()
56 rx_ctxt->nb->len += dec_len; in mcumgr_serial_decode_frag()
72 struct net_buf *nb; in mcumgr_serial_process_frag() local
77 if (rx_ctxt->nb == NULL) { in mcumgr_serial_process_frag()
[all …]
Dsmp.c47 void smp_packet_free(struct net_buf *nb) in smp_packet_free() argument
49 net_buf_unref(nb); in smp_packet_free()
106 smp_process_packet(struct smp_transport *smpt, struct net_buf *nb) in smp_process_packet() argument
119 rc = smp_process_request_packet(&streamer, nb); in smp_process_packet()
130 struct net_buf *nb; in smp_handle_reqs() local
134 while ((nb = net_buf_get(&smpt->fifo, K_NO_WAIT)) != NULL) { in smp_handle_reqs()
135 smp_process_packet(smpt, nb); in smp_handle_reqs()
168 smp_rx_req(struct smp_transport *smpt, struct net_buf *nb) in smp_rx_req() argument
170 net_buf_put(&smpt->fifo, nb); in smp_rx_req()
176 struct net_buf *nb; in smp_rx_remove_invalid() local
[all …]
Dsmp_uart.c40 struct net_buf *nb; in smp_uart_process_frag() local
45 nb = mcumgr_serial_process_frag(&smp_uart_rx_ctxt, in smp_uart_process_frag()
54 if (nb != NULL) { in smp_uart_process_frag()
55 smp_rx_req(&smp_uart_transport, nb); in smp_uart_process_frag()
78 static uint16_t smp_uart_get_mtu(const struct net_buf *nb) in smp_uart_get_mtu() argument
83 static int smp_uart_tx_pkt(struct net_buf *nb) in smp_uart_tx_pkt() argument
87 rc = uart_mcumgr_send(nb->data, nb->len); in smp_uart_tx_pkt()
88 smp_packet_free(nb); in smp_uart_tx_pkt()
Dsmp_udp.c112 static int smp_udp4_tx(struct net_buf *nb) in smp_udp4_tx() argument
115 struct sockaddr *addr = net_buf_user_data(nb); in smp_udp4_tx()
117 ret = sendto(configs.ipv4.sock, nb->data, nb->len, 0, addr, sizeof(*addr)); in smp_udp4_tx()
125 smp_packet_free(nb); in smp_udp4_tx()
132 static int smp_udp6_tx(struct net_buf *nb) in smp_udp6_tx() argument
135 struct sockaddr *addr = net_buf_user_data(nb); in smp_udp6_tx()
137 ret = sendto(configs.ipv6.sock, nb->data, nb->len, 0, addr, sizeof(*addr)); in smp_udp6_tx()
145 smp_packet_free(nb); in smp_udp6_tx()
151 static uint16_t smp_udp_get_mtu(const struct net_buf *nb) in smp_udp_get_mtu() argument
153 ARG_UNUSED(nb); in smp_udp_get_mtu()
[all …]
Dsmp_bt.c300 struct net_buf *nb; in smp_bt_chr_write() local
307 nb = smp_packet_alloc(); in smp_bt_chr_write()
308 if (!nb) { in smp_bt_chr_write()
313 if (net_buf_tailroom(nb) < len) { in smp_bt_chr_write()
315 len, net_buf_tailroom(nb)); in smp_bt_chr_write()
316 smp_packet_free(nb); in smp_bt_chr_write()
320 net_buf_add_mem(nb, buf, len); in smp_bt_chr_write()
322 ud = net_buf_user_data(nb); in smp_bt_chr_write()
330 smp_rx_req(&smp_bt_transport, nb); in smp_bt_chr_write()
382 static struct bt_conn *smp_bt_conn_from_pkt(const struct net_buf *nb) in smp_bt_conn_from_pkt() argument
[all …]
Dsmp_shell.c186 struct net_buf *nb; in smp_shell_process() local
194 nb = mcumgr_serial_process_frag(&smp_shell_rx_ctxt, in smp_shell_process()
197 if (nb != NULL) { in smp_shell_process()
198 smp_rx_req(&smp_shell_transport, nb); in smp_shell_process()
205 static uint16_t smp_shell_get_mtu(const struct net_buf *nb) in smp_shell_get_mtu() argument
226 static int smp_shell_tx_pkt(struct net_buf *nb) in smp_shell_tx_pkt() argument
230 rc = mcumgr_serial_tx_pkt(nb->data, nb->len, smp_shell_tx_raw); in smp_shell_tx_pkt()
231 smp_packet_free(nb); in smp_shell_tx_pkt()
/Zephyr-Core-3.4.0/tests/subsys/mgmt/mcumgr/os_mgmt_echo/src/
Dmain.c39 struct net_buf *nb; in ZTEST() local
55 nb = smp_dummy_get_outgoing(); in ZTEST()
58 zassert_equal(sizeof(expected_response), nb->len, in ZTEST()
60 nb->len); in ZTEST()
62 zassert_mem_equal(expected_response, nb->data, nb->len, in ZTEST()
/Zephyr-Core-3.4.0/tests/subsys/mgmt/mcumgr/smp_version/src/
Dmain.c63 static struct net_buf *nb; variable
146 nb = smp_dummy_get_outgoing(); in ZTEST()
150 zassert_equal(sizeof(response_old), nb->len, "Expected received data length mismatch"); in ZTEST()
151 zassert_mem_equal(response_old, nb->data, nb->len, "Expected received data mismatch"); in ZTEST()
154 smp_header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
158 zcbor_new_decode_state(zsd, 4, nb->data, nb->len, 1); in ZTEST()
233 nb = smp_dummy_get_outgoing(); in ZTEST()
237 zassert_equal(sizeof(response_current), nb->len, "Expected received data length mismatch"); in ZTEST()
238 zassert_mem_equal(response_current, nb->data, nb->len, "Expected received data mismatch"); in ZTEST()
241 smp_header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
[all …]
/Zephyr-Core-3.4.0/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/
Dlimited.c30 static struct net_buf *nb; variable
79 nb = smp_dummy_get_outgoing(); in ZTEST()
83 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
84 zcbor_new_decode_state(zsd, 3, nb->data, nb->len, 1); in ZTEST()
145 nb = smp_dummy_get_outgoing(); in ZTEST()
149 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
150 zcbor_new_decode_state(zsd, 3, nb->data, nb->len, 1); in ZTEST()
158 zcbor_new_decode_state(zsd, 3, nb->data, nb->len, 1); in ZTEST()
170 if (nb != NULL) { in cleanup_test()
171 net_buf_unref(nb); in cleanup_test()
[all …]
Dmain.c60 static struct net_buf *nb; variable
246 nb = smp_dummy_get_outgoing(); in ZTEST()
249 zassert_equal(sizeof(expected_response), nb->len, in ZTEST()
251 nb->len); in ZTEST()
253 zassert_mem_equal(expected_response, nb->data, nb->len, in ZTEST()
256 net_buf_unref(nb); in ZTEST()
284 nb = smp_dummy_get_outgoing(); in ZTEST()
287 zassert_equal(sizeof(expected_response), nb->len, in ZTEST()
289 nb->len); in ZTEST()
291 zassert_mem_equal(expected_response, nb->data, nb->len, in ZTEST()
[all …]
Dbuild_date.c30 static struct net_buf *nb; variable
119 nb = smp_dummy_get_outgoing(); in ZTEST()
123 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
124 zcbor_new_decode_state(zsd, 3, nb->data, nb->len, 1); in ZTEST()
195 nb = smp_dummy_get_outgoing(); in ZTEST()
199 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
200 zcbor_new_decode_state(zsd, 3, nb->data, nb->len, 1); in ZTEST()
251 if (nb != NULL) { in cleanup_test()
252 net_buf_unref(nb); in cleanup_test()
253 nb = NULL; in cleanup_test()
/Zephyr-Core-3.4.0/subsys/mgmt/mcumgr/smp/src/
Dsmp.c87 static void cbor_nb_reader_init(struct cbor_nb_reader *cnr, struct net_buf *nb) in cbor_nb_reader_init() argument
90 void *new_ptr = net_buf_pull(nb, sizeof(struct smp_hdr)); in cbor_nb_reader_init()
92 cnr->nb = nb; in cbor_nb_reader_init()
94 cnr->nb->len, 1); in cbor_nb_reader_init()
97 static void cbor_nb_writer_init(struct cbor_nb_writer *cnw, struct net_buf *nb) in cbor_nb_writer_init() argument
99 net_buf_reset(nb); in cbor_nb_writer_init()
100 cnw->nb = nb; in cbor_nb_writer_init()
101 cnw->nb->len = sizeof(struct smp_hdr); in cbor_nb_writer_init()
102 zcbor_new_encode_state(cnw->zs, 2, nb->data + sizeof(struct smp_hdr), in cbor_nb_writer_init()
103 net_buf_tailroom(nb), 0); in cbor_nb_writer_init()
[all …]
/Zephyr-Core-3.4.0/include/zephyr/mgmt/mcumgr/smp/
Dsmp.h47 struct net_buf *nb; member
55 struct net_buf *nb; member
77 void smp_packet_free(struct net_buf *nb);
/Zephyr-Core-3.4.0/include/zephyr/mgmt/mcumgr/transport/
Dsmp.h37 typedef int (*smp_transport_out_fn)(struct net_buf *nb);
52 typedef uint16_t (*smp_transport_get_mtu_fn)(const struct net_buf *nb);
92 typedef bool (*smp_transport_query_valid_check_fn)(struct net_buf *nb, void *arg);
Dserial.h32 struct net_buf *nb; member
/Zephyr-Core-3.4.0/subsys/mgmt/mcumgr/transport/include/mgmt/mcumgr/transport/
Dsmp_internal.h48 void smp_rx_req(struct smp_transport *smtp, struct net_buf *nb);
51 void zephyr_smp_rx_req(struct zephyr_smp_transport *smpt, struct net_buf *nb) in zephyr_smp_rx_req() argument
53 smp_rx_req((struct smp_transport *)smpt, nb); in zephyr_smp_rx_req()
/Zephyr-Core-3.4.0/tests/benchmarks/sched_userspace/src/
Dapp_threads.h25 #define DEFINE_THREADS_HELPER(nb) \ argument
26 K_THREAD_STACK_DEFINE(app_##nb##_stack, APP_STACKSIZE); \
27 K_APPMEM_PARTITION_DEFINE(app_##nb##_partition); \
28 K_APP_DMEM(app_##nb##_partition) int dummy##nb; /* Need data in each partition */
/Zephyr-Core-3.4.0/tests/kernel/mem_heap/mheap_api_concept/src/
Dtest_mheap_api.c71 int nb; in ZTEST() local
73 for (nb = 0; nb < ARRAY_SIZE(block); nb++) { in ZTEST()
78 block[nb] = k_malloc(BLK_SIZE_MIN); in ZTEST()
79 if (block[nb] == NULL) { in ZTEST()
88 for (int i = 0; i < nb; i++) { in ZTEST()
/Zephyr-Core-3.4.0/tests/subsys/mgmt/mcumgr/cb_notifications/src/
Dmain.c36 static struct net_buf *nb; variable
121 nb = smp_dummy_get_outgoing(); in ZTEST()
166 nb = smp_dummy_get_outgoing(); in ZTEST()
211 nb = smp_dummy_get_outgoing(); in ZTEST()
223 if (nb != NULL) { in cleanup_test()
224 net_buf_unref(nb); in cleanup_test()
225 nb = NULL; in cleanup_test()
/Zephyr-Core-3.4.0/tests/subsys/mgmt/mcumgr/fs_mgmt_hash_supported/src/
Dmain.c36 struct net_buf *nb; in ZTEST() local
73 nb = smp_dummy_get_outgoing(); in ZTEST()
77 struct smp_hdr *response_hdr = (struct smp_hdr *)nb->data; in ZTEST()
99 zcbor_new_decode_state(state, 10, &nb->data[sizeof(struct smp_hdr)], in ZTEST()
100 (nb->len - sizeof(struct smp_hdr)), 1); in ZTEST()
/Zephyr-Core-3.4.0/subsys/net/l2/ieee802154/
Dieee802154_radio_csma_ca.c33 uint8_t nb = 0U; in csma_ca_radio_send() local
54 nb++; in csma_ca_radio_send()
56 if (nb > max_bo) { in csma_ca_radio_send()
/Zephyr-Core-3.4.0/drivers/spi/
Dspi_xec_qmspi.c524 size_t nb; in qmspi_transceive() local
539 nb = tx_bufs->count; in qmspi_transceive()
540 while (nb--) { in qmspi_transceive()
551 nb = rx_bufs->count; in qmspi_transceive()
552 while (nb--) { in qmspi_transceive()
/Zephyr-Core-3.4.0/tests/subsys/mgmt/mcumgr/smp_reassembly/src/
Dmain.c28 void smp_rx_req(struct smp_transport *smpt, struct net_buf *nb) in smp_rx_req() argument
30 backup = nb; in smp_rx_req()
/Zephyr-Core-3.4.0/boards/arm/rak5010_nrf52840/doc/
Dindex.rst156 https://doc.rakwireless.com/datasheet/rakproducts/rak5010-wistrio-nb-iot-tracker-datasheet

12