Home
last modified time | relevance | path

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

12

/Zephyr-latest/tests/subsys/mgmt/mcumgr/settings_mgmt/src/
Dsmp_test_util.c14 static void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len, uint8_t type, bool write) in smp_make_hdr()
16 *rsp_hdr = (struct smp_hdr) { in smp_make_hdr()
40 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, SETTINGS_MGMT_ID_READ_WRITE, in create_settings_mgmt_read_packet()
42 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_settings_mgmt_read_packet()
43 *buffer_size += sizeof(struct smp_hdr); in create_settings_mgmt_read_packet()
62 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, SETTINGS_MGMT_ID_READ_WRITE, in create_settings_mgmt_write_packet()
64 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_settings_mgmt_write_packet()
65 *buffer_size += sizeof(struct smp_hdr); in create_settings_mgmt_write_packet()
81 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, SETTINGS_MGMT_ID_DELETE, true); in create_settings_mgmt_delete_packet()
82 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_settings_mgmt_delete_packet()
[all …]
Dmain.c30 #define TEST_RESPONSE_OK_LENGTH (sizeof(struct smp_hdr) + TEST_RESPONSE_OK_DATA_LENGTH)
32 #define TEST_RESPONSE_ERROR_LENGTH (sizeof(struct smp_hdr) + TEST_RESPONSE_ERROR_DATA_LENGTH)
36 #define TEST_RESPONSE_READ_LENGTH (sizeof(struct smp_hdr) + TEST_RESPONSE_READ_DATA_LENGTH)
111 struct smp_hdr *header; in ZTEST()
142 header = (struct smp_hdr *)nb->data; in ZTEST()
196 header = (struct smp_hdr *)nb->data; in ZTEST()
241 struct smp_hdr *header; in ZTEST()
272 header = (struct smp_hdr *)nb->data; in ZTEST()
326 header = (struct smp_hdr *)nb->data; in ZTEST()
371 struct smp_hdr *header; in ZTEST()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/enum_mgmt/src/
Dsmp_test_util.c14 static void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len, uint8_t type, bool write) in smp_make_hdr()
16 *rsp_hdr = (struct smp_hdr) { in smp_make_hdr()
40 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, ENUM_MGMT_ID_COUNT, false); in create_enum_mgmt_count_packet()
41 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_enum_mgmt_count_packet()
42 *buffer_size += sizeof(struct smp_hdr); in create_enum_mgmt_count_packet()
60 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, ENUM_MGMT_ID_LIST, false); in create_enum_mgmt_list_packet()
61 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_enum_mgmt_list_packet()
62 *buffer_size += sizeof(struct smp_hdr); in create_enum_mgmt_list_packet()
82 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, ENUM_MGMT_ID_SINGLE, false); in create_enum_mgmt_single_packet()
83 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_enum_mgmt_single_packet()
[all …]
Dmain.c114 struct smp_hdr *header; in ZTEST()
150 header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
213 struct smp_hdr *header; in ZTEST()
251 header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
316 struct smp_hdr *header; in ZTEST()
357 header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
510 struct smp_hdr *header; in ZTEST()
563 header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
608 struct smp_hdr *header; in ZTEST()
647 header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/smp_reassembly/src/
Dmain.c36 struct smp_hdr *mh = (struct smp_hdr *)buff; in ZTEST()
47 smp_reassembly_collect(&smpt, buff, sizeof(struct smp_hdr) - 1), in ZTEST()
50 mh->nh_len = sys_cpu_to_be16(TRANSPORT_NETBUF_SIZE - sizeof(struct smp_hdr) + 1); in ZTEST()
52 smp_reassembly_collect(&smpt, buff, sizeof(struct smp_hdr) + 1), in ZTEST()
56 mh->nh_len = sys_cpu_to_be16(TEST_FRAME_SIZE - sizeof(struct smp_hdr)); in ZTEST()
83 struct smp_hdr *mh = (struct smp_hdr *)buff; in ZTEST()
89 mh->nh_len = sys_cpu_to_be16(TEST_FRAME_SIZE - sizeof(struct smp_hdr)); in ZTEST()
103 struct smp_hdr *mh = (struct smp_hdr *)buff; in ZTEST()
116 mh->nh_len = sys_cpu_to_be16(TEST_FRAME_SIZE - sizeof(struct smp_hdr)); in ZTEST()
183 struct smp_hdr *mh = (struct smp_hdr *)buff; in ZTEST()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/cb_notifications/src/
Dsmp_test_util.c13 void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len) in smp_make_hdr()
15 *rsp_hdr = (struct smp_hdr) { in smp_make_hdr()
36 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size); in create_mcumgr_format_packet()
37 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_mcumgr_format_packet()
38 *buffer_size += sizeof(struct smp_hdr); in create_mcumgr_format_packet()
Dsmp_test_util.h16 void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len);
/Zephyr-latest/tests/subsys/mgmt/mcumgr/os_mgmt_datetime/src/
Dsmp_test_util.c17 void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len, bool version2, bool write) in smp_make_hdr()
19 *rsp_hdr = (struct smp_hdr) { in smp_make_hdr()
40 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, version2, false); in create_mcumgr_datetime_get_packet()
41 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_mcumgr_datetime_get_packet()
42 *buffer_size += sizeof(struct smp_hdr); in create_mcumgr_datetime_get_packet()
58 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, version2, true); in create_mcumgr_datetime_set_packet_str()
59 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_mcumgr_datetime_set_packet_str()
60 *buffer_size += sizeof(struct smp_hdr); in create_mcumgr_datetime_set_packet_str()
Dmain.c193 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
255 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
320 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
367 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
430 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
477 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
540 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
587 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
650 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
697 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
[all …]
Dsmp_test_util.h20 void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len, bool version2, bool write);
/Zephyr-latest/tests/subsys/mgmt/mcumgr/img_mgmt_slot_info/src/
Dsmp_test_util.c14 static void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len, uint8_t type, bool write) in smp_make_hdr()
16 *rsp_hdr = (struct smp_hdr) { in smp_make_hdr()
40 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, IMG_MGMT_ID_SLOT_INFO, false); in create_img_mgmt_slot_info_packet()
41 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_img_mgmt_slot_info_packet()
42 *buffer_size += sizeof(struct smp_hdr); in create_img_mgmt_slot_info_packet()
/Zephyr-latest/tests/subsys/mgmt/mcumgr/os_mgmt_info/src/
Dsmp_test_util.c14 void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len) in smp_make_hdr()
16 *rsp_hdr = (struct smp_hdr) { in smp_make_hdr()
38 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size); in create_mcumgr_format_packet()
39 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_mcumgr_format_packet()
40 *buffer_size += sizeof(struct smp_hdr); in create_mcumgr_format_packet()
Dsmp_test_util.h16 void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len);
Dmain.c340 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
401 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
463 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
525 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
586 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
647 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
708 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
780 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
841 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
916 (void)net_buf_pull(nb, sizeof(struct smp_hdr)); in ZTEST()
[all …]
/Zephyr-latest/tests/subsys/mgmt/mcumgr/smp_version/src/
Dsmp_test_util.c14 void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len, uint8_t version) in smp_make_hdr()
16 *rsp_hdr = (struct smp_hdr) { in smp_make_hdr()
39 smp_make_hdr((struct smp_hdr *)output_buffer, *buffer_size, version); in create_mcumgr_format_packet()
40 memcpy(&output_buffer[sizeof(struct smp_hdr)], buffer, *buffer_size); in create_mcumgr_format_packet()
41 *buffer_size += sizeof(struct smp_hdr); in create_mcumgr_format_packet()
Dmain.c111 struct smp_hdr *smp_header; in ZTEST()
154 smp_header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
198 struct smp_hdr *smp_header; in ZTEST()
241 smp_header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
284 struct smp_hdr *smp_header; in ZTEST()
327 smp_header = net_buf_pull_mem(nb, sizeof(struct smp_hdr)); in ZTEST()
Dsmp_test_util.h16 void smp_make_hdr(struct smp_hdr *rsp_hdr, size_t len, uint8_t version);
/Zephyr-latest/subsys/mgmt/mcumgr/smp/src/
Dsmp.c63 cnw->nb->len = sizeof(struct smp_hdr); in cbor_nb_writer_init()
64 zcbor_new_encode_state(cnw->zs, ARRAY_SIZE(cnw->zs), nb->data + sizeof(struct smp_hdr), in cbor_nb_writer_init()
80 static void smp_make_rsp_hdr(const struct smp_hdr *req_hdr, struct smp_hdr *rsp_hdr, size_t len) in smp_make_rsp_hdr()
82 *rsp_hdr = (struct smp_hdr) { in smp_make_rsp_hdr()
94 static int smp_read_hdr(const struct net_buf *nb, struct smp_hdr *dst_hdr) in smp_read_hdr()
107 static inline int smp_write_hdr(struct smp_streamer *streamer, const struct smp_hdr *src_hdr) in smp_write_hdr()
113 static int smp_build_err_rsp(struct smp_streamer *streamer, const struct smp_hdr *req_hdr, in smp_build_err_rsp()
116 struct smp_hdr rsp_hdr; in smp_build_err_rsp()
159 static int smp_handle_single_payload(struct smp_streamer *cbuf, const struct smp_hdr *req_hdr) in smp_handle_single_payload()
274 static int smp_handle_single_req(struct smp_streamer *streamer, const struct smp_hdr *req_hdr, in smp_handle_single_req()
[all …]
/Zephyr-latest/subsys/mgmt/mcumgr/smp_client/src/
Dclient.c46 static void smp_read_hdr(const struct net_buf *nb, struct smp_hdr *dst_hdr);
66 static void smp_header_init(struct smp_hdr *header, uint16_t group, uint8_t id, uint8_t op, in smp_header_init()
70 memset(header, 0, sizeof(struct smp_hdr)); in smp_header_init()
184 static struct smp_client_cmd_req *smp_client_response_discover(const struct smp_hdr *res_hdr) in smp_client_response_discover()
186 struct smp_hdr smp_header; in smp_client_response_discover()
227 int smp_client_single_response(struct net_buf *nb, const struct smp_hdr *res_hdr) in smp_client_single_response()
257 struct smp_hdr smp_header; in smp_client_buf_allocation()
276 static void smp_read_hdr(const struct net_buf *nb, struct smp_hdr *dst_hdr) in smp_read_hdr()
286 struct smp_hdr smp_header; in smp_client_send_cmd()
/Zephyr-latest/tests/subsys/mgmt/mcumgr/fs_mgmt_hash_supported/src/
Dmain.c77 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, NULL, 0); in ZTEST()
/Zephyr-latest/subsys/mgmt/mcumgr/transport/src/
Dsmp_reassembly.c40 if (len >= sizeof(struct smp_hdr)) { in smp_reassembly_collect()
41 uint16_t expected = sys_be16_to_cpu(((struct smp_hdr *)buf)->nh_len); in smp_reassembly_collect()
48 expected += sizeof(struct smp_hdr); in smp_reassembly_collect()
/Zephyr-latest/tests/subsys/mgmt/mcumgr/smp_client/src/
Dmain.c47 zassert_equal(sizeof(struct smp_hdr), buf[i]->len, in ZTEST()
49 sizeof(struct smp_hdr), buf[i]->len); in ZTEST()
77 struct smp_hdr dst_hdr; in ZTEST()
Dsmp_transport_stub.h17 void smp_transport_read_hdr(const struct net_buf *nb, struct smp_hdr *dst_hdr);
/Zephyr-latest/tests/subsys/mgmt/mcumgr/mcumgr_client/src/
Dsmp_stub.c21 static struct smp_hdr res_hdr;
58 void smp_transport_read_hdr(const struct net_buf *nb, struct smp_hdr *dst_hdr) in smp_transport_read_hdr()
/Zephyr-latest/subsys/mgmt/mcumgr/transport/include/mgmt/mcumgr/transport/
Dsmp_internal.h20 struct smp_hdr { struct

12