Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
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
16extern "C" {
17#endif
18
29typedef int (*fs_mgmt_hash_checksum_handler_fn)(struct fs_file_t *file, uint8_t *output,
30 size_t *out_len, size_t len);
31
51
59 void *user_data);
60
67
74
84
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* ifndef H_MGMT_MCUMGR_GRP_FS_MGMT_CHKSUM_ */
void fs_mgmt_hash_checksum_register_group(struct fs_mgmt_hash_checksum_group *group)
Registers a full hash/checksum group.
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
const struct fs_mgmt_hash_checksum_group * fs_mgmt_hash_checksum_find_handler(const char *name)
Finds a registered hash/checksum handler.
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.
void fs_mgmt_hash_checksum_unregister_group(struct fs_mgmt_hash_checksum_group *group)
Unregisters a full hash/checksum group.
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
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
Public kernel APIs.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
File object representing an open file.
Definition fs_interface.h:76
A collection of handlers for an entire hash/checksum group.
Definition fs_mgmt_hash_checksum.h:35
fs_mgmt_hash_checksum_handler_fn function
Hash/checksum function pointer.
Definition fs_mgmt_hash_checksum.h:49
const char * group_name
Array of handlers; one entry per name.
Definition fs_mgmt_hash_checksum.h:40
sys_snode_t node
Entry list node.
Definition fs_mgmt_hash_checksum.h:37
uint8_t output_size
Size (in bytes) of output.
Definition fs_mgmt_hash_checksum.h:46
bool byte_string
Byte string or numerical output.
Definition fs_mgmt_hash_checksum.h:43
Group structure.
Definition grp.h:18