| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |
#include <arpa/inet.h>#include <errno.h>#include <fcntl.h>#include <sys/stat.h>#include <sys/mman.h>#include <time.h>#include <unistd.h>#include <doca_argp.h>#include <doca_log.h>#include <doca_mmap.h>#include <doca_pe.h>#include <utils.h>#include "file_integrity_core.h"
Go to the source code of this file.
Macros | |
| #define | SLEEP_IN_NANOS (10 * 1000) /* Sample the task every 10 microseconds */ |
| #define | DEFAULT_TIMEOUT (10) /* default timeout for receiving messages */ |
| #define | SHA_ALGORITHM (DOCA_SHA_ALGORITHM_SHA256) /* doca_sha_algorithm for the sample */ |
| #define | LOG_NUM_SHA_TASKS (0) /* Log of SHA tasks number */ |
Functions | |
| DOCA_LOG_REGISTER (FILE_INTEGRITY::Core) | |
| static void | free_cb (void *addr, size_t len, void *opaque) |
| static void | unmap_cb (void *addr, size_t len, void *opaque) |
| static doca_error_t | populate_dst_buf (struct program_core_objects *state, struct doca_buf **dst_doca_buf) |
| static doca_error_t | calculate_sha (struct program_core_objects *state, struct doca_sha *sha_ctx, struct doca_buf **dst_doca_buf, char *file_data, size_t file_size) |
| static doca_error_t | send_file (struct comch_cfg *comch_cfg, struct file_integrity_config *app_cfg, char *file_data, size_t file_size, uint8_t *file_sha, size_t sha_len, uint32_t min_partial_block_size) |
| void | client_recv_event_cb (struct doca_comch_event_msg_recv *event, uint8_t *recv_buffer, uint32_t msg_len, struct doca_comch_connection *comch_connection) |
| doca_error_t | file_integrity_client (struct comch_cfg *comch_cfg, struct file_integrity_config *app_cfg, struct program_core_objects *state, struct doca_sha *sha_ctx) |
| void | server_recv_event_cb (struct doca_comch_event_msg_recv *event, uint8_t *recv_buffer, uint32_t msg_len, struct doca_comch_connection *comch_connection) |
| static doca_error_t | init_async_sha_recv_data (struct doca_sha *sha_ctx, struct program_core_objects *state, struct server_runtime_data *server_data, struct doca_buf *dst_doca_buf, uint32_t max_comch_msg, int fd) |
| static void | uninit_async_sha_recv_data (struct server_runtime_data *server_data) |
| doca_error_t | file_integrity_server (struct comch_cfg *comch_cfg, struct file_integrity_config *app_cfg, struct program_core_objects *state, struct doca_sha *sha_ctx) |
| static void | sha_hash_completed_callback (struct doca_sha_task_hash *sha_hash_task, union doca_data task_user_data, union doca_data ctx_user_data) |
| static void | sha_hash_error_callback (struct doca_sha_task_hash *sha_hash_task, union doca_data task_user_data, union doca_data ctx_user_data) |
| static void | sha_partial_hash_completed_callback (struct doca_sha_task_partial_hash *sha_partial_hash_task, union doca_data task_user_data, union doca_data ctx_user_data) |
| static void | sha_partial_hash_error_callback (struct doca_sha_task_partial_hash *sha_partial_hash_task, union doca_data task_user_data, union doca_data ctx_user_data) |
| static doca_error_t | sha_partial_hash_is_supported (struct doca_devinfo *devinfo) |
| doca_error_t | file_integrity_init (struct file_integrity_config *app_cfg, struct program_core_objects *state, struct doca_sha **sha_ctx) |
| void | file_integrity_cleanup (struct program_core_objects *state, struct doca_sha *sha_ctx) |
| static doca_error_t | file_callback (void *param, void *config) |
| static doca_error_t | dev_pci_addr_callback (void *param, void *config) |
| static doca_error_t | rep_pci_addr_callback (void *param, void *config) |
| static doca_error_t | timeout_callback (void *param, void *config) |
| static doca_error_t | args_validation_callback (void *cfg) |
| doca_error_t | register_file_integrity_params (void) |
| #define DEFAULT_TIMEOUT (10) /* default timeout for receiving messages */ |
Definition at line 44 of file file_integrity_core.c.
| #define LOG_NUM_SHA_TASKS (0) /* Log of SHA tasks number */ |
Definition at line 46 of file file_integrity_core.c.
| #define SHA_ALGORITHM (DOCA_SHA_ALGORITHM_SHA256) /* doca_sha_algorithm for the sample */ |
Definition at line 45 of file file_integrity_core.c.
| #define SLEEP_IN_NANOS (10 * 1000) /* Sample the task every 10 microseconds */ |
Definition at line 43 of file file_integrity_core.c.
|
static |
Definition at line 1211 of file file_integrity_core.c.
|
static |
Definition at line 151 of file file_integrity_core.c.
| void client_recv_event_cb | ( | struct doca_comch_event_msg_recv * | event, |
| uint8_t * | recv_buffer, | ||
| uint32_t | msg_len, | ||
| struct doca_comch_connection * | comch_connection | ||
| ) |
Definition at line 368 of file file_integrity_core.c.
|
static |
Definition at line 1146 of file file_integrity_core.c.
| DOCA_LOG_REGISTER | ( | FILE_INTEGRITY::Core | ) |
|
static |
Definition at line 1126 of file file_integrity_core.c.
| void file_integrity_cleanup | ( | struct program_core_objects * | state, |
| struct doca_sha * | sha_ctx | ||
| ) |
Definition at line 1097 of file file_integrity_core.c.
| doca_error_t file_integrity_client | ( | struct comch_cfg * | comch_cfg, |
| struct file_integrity_config * | app_cfg, | ||
| struct program_core_objects * | state, | ||
| struct doca_sha * | sha_ctx | ||
| ) |
Definition at line 384 of file file_integrity_core.c.
| doca_error_t file_integrity_init | ( | struct file_integrity_config * | app_cfg, |
| struct program_core_objects * | state, | ||
| struct doca_sha ** | sha_ctx | ||
| ) |
Definition at line 1013 of file file_integrity_core.c.
| doca_error_t file_integrity_server | ( | struct comch_cfg * | comch_cfg, |
| struct file_integrity_config * | app_cfg, | ||
| struct program_core_objects * | state, | ||
| struct doca_sha * | sha_ctx | ||
| ) |
Definition at line 799 of file file_integrity_core.c.
|
static |
Definition at line 57 of file file_integrity_core.c.
|
static |
Definition at line 655 of file file_integrity_core.c.
|
static |
Definition at line 88 of file file_integrity_core.c.
| doca_error_t register_file_integrity_params | ( | void | ) |
Definition at line 1225 of file file_integrity_core.c.
|
static |
Definition at line 1167 of file file_integrity_core.c.
|
static |
Definition at line 280 of file file_integrity_core.c.
| void server_recv_event_cb | ( | struct doca_comch_event_msg_recv * | event, |
| uint8_t * | recv_buffer, | ||
| uint32_t | msg_len, | ||
| struct doca_comch_connection * | comch_connection | ||
| ) |
Definition at line 508 of file file_integrity_core.c.
|
static |
Definition at line 923 of file file_integrity_core.c.
|
static |
Definition at line 945 of file file_integrity_core.c.
|
static |
Definition at line 966 of file file_integrity_core.c.
|
static |
Definition at line 988 of file file_integrity_core.c.
|
static |
Definition at line 1008 of file file_integrity_core.c.
|
static |
Definition at line 1192 of file file_integrity_core.c.
|
static |
Definition at line 783 of file file_integrity_core.c.
|
static |
Definition at line 73 of file file_integrity_core.c.