diff options
author | Jacob Smith <jake.smith@hdfgroup.org> | 2020-03-13 22:13:17 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:34:20 (GMT) |
commit | b11015c4ccec9384e516ca13a0a56b209b71a578 (patch) | |
tree | d140c28354788589a09ae8d6cdec116bdc5b9646 /utils/mirror_vfd/mirror_remote.h | |
parent | 333388c744626b23791298be9f9165fa5bc9d037 (diff) | |
download | hdf5-b11015c4ccec9384e516ca13a0a56b209b71a578.zip hdf5-b11015c4ccec9384e516ca13a0a56b209b71a578.tar.gz hdf5-b11015c4ccec9384e516ca13a0a56b209b71a578.tar.bz2 |
Add Splitter VFD to library.
* "Simultaneous and equivalent" Read-Write and Write-Only channels for
file I/O.
* Only supports drivers with the H5FD_FEAT_DEFAULT_VFD_COMPATIBLE flag for
now, preventing issues with multi-file drivers.
Add Mirror VFD to library.
* Write-only operations over a network.
* Uses TCP/IP sockets.
* Server and auxiliary server-shutdown programs provided in a new directory,
`utils/mirror_vfd`.
* Automated testing via loopback ("remote" of localhost).
Diffstat (limited to 'utils/mirror_vfd/mirror_remote.h')
-rw-r--r-- | utils/mirror_vfd/mirror_remote.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/utils/mirror_vfd/mirror_remote.h b/utils/mirror_vfd/mirror_remote.h new file mode 100644 index 0000000..9132d51 --- /dev/null +++ b/utils/mirror_vfd/mirror_remote.h @@ -0,0 +1,51 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* Common definitions for "remote" processes for the Mirror VFD. + * + * Jacob Smith, 2020-03-06 + */ + +#include "hdf5.h" +#include "H5private.h" + +#ifdef H5_HAVE_MIRROR_VFD + +#define V_NONE 0 +#define V_ERR 1 +#define V_WARN 2 +#define V_INFO 3 +#define V_ALL 4 + +#define MIRROR_LOG_DEFAULT_STREAM stdout +#define MIRROR_LOG_DEFAULT_VERBOSITY V_WARN +#define MIRROR_LOG_PREFIX_MAX 79 +#define MIRROR_LOG_INFO_MAGIC 0x569D589A + +typedef struct mirror_log_info { + uint32_t magic; + FILE *stream; + unsigned int verbosity; + char prefix[MIRROR_LOG_PREFIX_MAX+1]; +} loginfo_t; + +void mirror_log(loginfo_t *info, unsigned int level, + const char *format, ...); +void mirror_log_bytes(loginfo_t *info, unsigned int level, + size_t n_bytes, const unsigned char *buf); +loginfo_t *mirror_log_init(char *path, char *prefix, unsigned int verbosity); +int mirror_log_term(loginfo_t *loginfo); + +herr_t run_writer(int socketfd, H5FD_mirror_xmit_open_t *xmit_open); + +#endif /* H5_HAVE_MIRROR_VFD */ + |