Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
fs_mgmt_hash_checksum.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018-2022 mcumgr authors
3
* Copyright (c) 2022 Laird Connectivity
4
* Copyright (c) 2022 Nordic Semiconductor ASA
5
*
6
* SPDX-License-Identifier: Apache-2.0
7
*/
8
9
#ifndef H_MGMT_MCUMGR_GRP_FS_MGMT_CHKSUM_
10
#define H_MGMT_MCUMGR_GRP_FS_MGMT_CHKSUM_
11
12
#include <
zephyr/kernel.h
>
13
#include <
zephyr/fs/fs.h
>
14
15
#ifdef __cplusplus
16
extern
"C"
{
17
#endif
18
29
typedef
int (*
fs_mgmt_hash_checksum_handler_fn
)(
struct
fs_file_t
*file,
uint8_t
*output,
30
size_t
*out_len,
size_t
len);
31
35
struct
fs_mgmt_hash_checksum_group
{
37
sys_snode_t
node
;
38
40
const
char
*
group_name
;
41
43
bool
byte_string
;
44
46
uint8_t
output_size
;
47
49
fs_mgmt_hash_checksum_handler_fn
function
;
50
};
51
58
typedef
void (*
fs_mgmt_hash_checksum_list_cb
)(
const
struct
fs_mgmt_hash_checksum_group
*
group
,
59
void
*user_data);
60
66
void
fs_mgmt_hash_checksum_register_group
(
struct
fs_mgmt_hash_checksum_group
*
group
);
67
73
void
fs_mgmt_hash_checksum_unregister_group
(
struct
fs_mgmt_hash_checksum_group
*
group
);
74
83
const
struct
fs_mgmt_hash_checksum_group
*
fs_mgmt_hash_checksum_find_handler
(
const
char
*name);
84
91
void
fs_mgmt_hash_checksum_find_handlers
(
fs_mgmt_hash_checksum_list_cb
cb,
void
*user_data);
92
93
#ifdef __cplusplus
94
}
95
#endif
96
97
#endif
/* ifndef H_MGMT_MCUMGR_GRP_FS_MGMT_CHKSUM_ */
fs.h
fs_mgmt_hash_checksum_register_group
void fs_mgmt_hash_checksum_register_group(struct fs_mgmt_hash_checksum_group *group)
Registers a full hash/checksum group.
fs_mgmt_hash_checksum_handler_fn
int(* fs_mgmt_hash_checksum_handler_fn)(struct fs_file_t *file, uint8_t *output, size_t *out_len, size_t len)
Function that gets called to generate a hash or checksum.
Definition
fs_mgmt_hash_checksum.h:29
fs_mgmt_hash_checksum_find_handler
const struct fs_mgmt_hash_checksum_group * fs_mgmt_hash_checksum_find_handler(const char *name)
Finds a registered hash/checksum handler.
fs_mgmt_hash_checksum_find_handlers
void fs_mgmt_hash_checksum_find_handlers(fs_mgmt_hash_checksum_list_cb cb, void *user_data)
Runs a callback with all supported hash/checksum types.
fs_mgmt_hash_checksum_unregister_group
void fs_mgmt_hash_checksum_unregister_group(struct fs_mgmt_hash_checksum_group *group)
Unregisters a full hash/checksum group.
fs_mgmt_hash_checksum_list_cb
void(* fs_mgmt_hash_checksum_list_cb)(const struct fs_mgmt_hash_checksum_group *group, void *user_data)
Function that gets called with hash/checksum details.
Definition
fs_mgmt_hash_checksum.h:58
sys_snode_t
struct _snode sys_snode_t
Single-linked list node structure.
Definition
slist.h:42
kernel.h
Public kernel APIs.
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
fs_file_t
File object representing an open file.
Definition
fs_interface.h:84
fs_mgmt_hash_checksum_group
A collection of handlers for an entire hash/checksum group.
Definition
fs_mgmt_hash_checksum.h:35
fs_mgmt_hash_checksum_group::function
fs_mgmt_hash_checksum_handler_fn function
Hash/checksum function pointer.
Definition
fs_mgmt_hash_checksum.h:49
fs_mgmt_hash_checksum_group::group_name
const char * group_name
Array of handlers; one entry per name.
Definition
fs_mgmt_hash_checksum.h:40
fs_mgmt_hash_checksum_group::node
sys_snode_t node
Entry list node.
Definition
fs_mgmt_hash_checksum.h:37
fs_mgmt_hash_checksum_group::output_size
uint8_t output_size
Size (in bytes) of output.
Definition
fs_mgmt_hash_checksum.h:46
fs_mgmt_hash_checksum_group::byte_string
bool byte_string
Byte string or numerical output.
Definition
fs_mgmt_hash_checksum.h:43
group
Group structure.
Definition
grp.h:18
zephyr
mgmt
mcumgr
grp
fs_mgmt
fs_mgmt_hash_checksum.h
Generated on
for Zephyr API by
1.17.0