39typedef void *(*mgmt_alloc_rsp_fn)(
const void *src_buf,
void *arg);
51#ifdef CONFIG_MCUMGR_SMP_VERBOSE_ERR_RESPONSE
52#define MGMT_CTXT_SET_RC_RSN(mc, rsn) ((mc->rc_rsn) = (rsn))
53#define MGMT_CTXT_RC_RSN(mc) ((mc)->rc_rsn)
55#define MGMT_CTXT_SET_RC_RSN(mc, rsn)
56#define MGMT_CTXT_RC_RSN(mc) NULL
77#if defined(CONFIG_MCUMGR_MGMT_HANDLER_USER_DATA)
96#if defined(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL)
100 smp_translate_error_fn mg_translate_error;
103#if defined(CONFIG_MCUMGR_MGMT_CUSTOM_PAYLOAD)
155#if defined(CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL)
165smp_translate_error_fn mgmt_find_error_translation_function(
uint16_t group_id);
void(* mgmt_reset_buf_fn)(void *buf, void *arg)
Resets a buffer to a length of 0.
Definition mgmt.h:49
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.
void mgmt_unregister_group(struct mgmt_group *group)
Unregisters a full command group.
const struct mgmt_group * mgmt_find_group(uint16_t group_id)
Finds a registered command group.
const struct mgmt_handler * mgmt_get_handler(const struct mgmt_group *group, uint16_t command_id)
Finds a registered command handler.
int(* mgmt_handler_fn)(struct smp_streamer *ctxt)
Processes a request and writes the corresponding response.
Definition mgmt.h:68
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
SMP - Simple Management Protocol.
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
A collection of handlers for an entire command group.
Definition mgmt.h:85
const struct mgmt_handler * mg_handlers
Array of handlers; one entry per command ID.
Definition mgmt.h:90
uint16_t mg_handlers_count
Definition mgmt.h:91
uint16_t mg_group_id
The numeric ID of this group.
Definition mgmt.h:94
sys_snode_t node
Entry list node.
Definition mgmt.h:87
Read handler and write handler for a single command ID.
Definition mgmt.h:74
mgmt_handler_fn mh_write
Definition mgmt.h:76
mgmt_handler_fn mh_read
Definition mgmt.h:75
Decodes, encodes, and transmits SMP packets.
Definition smp.h:83
static const intptr_t user_data[5]
Definition main.c:588