130#define MGMT_HDR_SIZE 8
142typedef void *(*mgmt_alloc_rsp_fn)(
const void *src_buf,
void *arg);
154#ifdef CONFIG_MCUMGR_SMP_VERBOSE_ERR_RESPONSE
155#define MGMT_CTXT_SET_RC_RSN(mc, rsn) ((mc->rc_rsn) = (rsn))
156#define MGMT_CTXT_RC_RSN(mc) ((mc)->rc_rsn)
158#define MGMT_CTXT_SET_RC_RSN(mc, rsn)
159#define MGMT_CTXT_RC_RSN(mc) NULL
void(* mgmt_reset_buf_fn)(void *buf, void *arg)
Resets a buffer to a length of 0.
Definition: mgmt.h:152
const struct mgmt_handler * mgmt_find_handler(uint16_t group_id, uint16_t command_id)
Finds a registered command handler.
void mgmt_register_group(struct mgmt_group *group)
Registers a full command group.
mcumgr_group_t
Definition: mgmt.h:45
void mgmt_unregister_group(struct mgmt_group *group)
Unregisters a full command group.
mcumgr_err_t
Definition: mgmt.h:89
mcumgr_op_t
Definition: mgmt.h:27
int(* mgmt_handler_fn)(struct smp_streamer *ctxt)
Processes a request and writes the corresponding response.
Definition: mgmt.h:171
@ MGMT_GROUP_ID_CONFIG
Definition: mgmt.h:56
@ MGMT_GROUP_ID_SPLIT
Definition: mgmt.h:65
@ MGMT_GROUP_ID_IMAGE
Definition: mgmt.h:50
@ MGMT_GROUP_ID_RUN
Definition: mgmt.h:68
@ MGMT_GROUP_ID_OS
Definition: mgmt.h:47
@ MGMT_GROUP_ID_SHELL
Definition: mgmt.h:74
@ MGMT_GROUP_ID_STAT
Definition: mgmt.h:53
@ ZEPHYR_MGMT_GRP_BASIC
Definition: mgmt.h:83
@ MGMT_GROUP_ID_FS
Definition: mgmt.h:71
@ MGMT_GROUP_ID_LOG
Definition: mgmt.h:59
@ MGMT_GROUP_ID_PERUSER
Definition: mgmt.h:77
@ MGMT_GROUP_ID_CRASH
Definition: mgmt.h:62
@ MGMT_ERR_EPERUSER
Definition: mgmt.h:127
@ MGMT_ERR_EMSGSIZE
Definition: mgmt.h:112
@ MGMT_ERR_ENOTSUP
Definition: mgmt.h:115
@ MGMT_ERR_EINVAL
Definition: mgmt.h:100
@ MGMT_ERR_EOK
Definition: mgmt.h:91
@ MGMT_ERR_EBADSTATE
Definition: mgmt.h:109
@ MGMT_ERR_ENOENT
Definition: mgmt.h:106
@ MGMT_ERR_EUNKNOWN
Definition: mgmt.h:94
@ MGMT_ERR_EBUSY
Definition: mgmt.h:121
@ MGMT_ERR_EACCESSDENIED
Definition: mgmt.h:124
@ MGMT_ERR_ECORRUPT
Definition: mgmt.h:118
@ MGMT_ERR_ETIMEOUT
Definition: mgmt.h:103
@ MGMT_ERR_ENOMEM
Definition: mgmt.h:97
@ MGMT_OP_WRITE
Definition: mgmt.h:35
@ MGMT_OP_WRITE_RSP
Definition: mgmt.h:38
@ MGMT_OP_READ
Definition: mgmt.h:29
@ MGMT_OP_READ_RSP
Definition: mgmt.h:32
Single-linked list implementation.
struct _snode sys_snode_t
Definition: slist.h:33
SMP - Simple Management Protocol.
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
A collection of handlers for an entire command group.
Definition: mgmt.h:184
const struct mgmt_handler * mg_handlers
Definition: mgmt.h:189
uint16_t mg_handlers_count
Definition: mgmt.h:190
uint16_t mg_group_id
Definition: mgmt.h:193
sys_snode_t node
Definition: mgmt.h:186
Read handler and write handler for a single command ID.
Definition: mgmt.h:176
mgmt_handler_fn mh_write
Definition: mgmt.h:178
mgmt_handler_fn mh_read
Definition: mgmt.h:177
Decodes, encodes, and transmits SMP packets.
Definition: smp.h:69