![]() |
|
|||
File indexing completed on 2025-04-18 09:16:02
0001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 0002 * Copyright by The HDF Group. * 0003 * All rights reserved. * 0004 * * 0005 * This file is part of HDF5. The full HDF5 copyright notice, including * 0006 * terms governing use, modification, and redistribution, is contained in * 0007 * the COPYING file, which can be found at the root of the source code * 0008 * distribution tree, or in https://www.hdfgroup.org/licenses. * 0009 * If you do not have access to either file, you may request a copy from * 0010 * help@hdfgroup.org. * 0011 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 0012 0013 /* 0014 * Purpose: The public header file for the mirror virtual file driver (VFD) 0015 */ 0016 0017 #ifndef H5FDmirror_H 0018 #define H5FDmirror_H 0019 0020 #ifdef H5_HAVE_MIRROR_VFD 0021 0022 /** Initializer for the mirror VFD */ 0023 #define H5FD_MIRROR (H5FDperform_init(H5FD_mirror_init)) 0024 0025 /** Identifier for the mirror VFD */ 0026 #define H5FD_MIRROR_VALUE H5_VFD_MIRROR 0027 0028 /** Magic number to identify the H5FD_mirror_fapl_t struct */ 0029 #define H5FD_MIRROR_FAPL_MAGIC 0xF8DD514C 0030 0031 /** 0032 * The version number of the H5FD_mirror_fapl_t configuration 0033 * structure for the #H5FD_MIRROR driver 0034 */ 0035 #define H5FD_MIRROR_CURR_FAPL_T_VERSION 1 0036 0037 /** Max size of the remote_ip array in H5FD_mirror_fapl_t */ 0038 #define H5FD_MIRROR_MAX_IP_LEN 45 /* Max size of an IPv4-mapped IPv6 address */ 0039 0040 /** 0041 *\struct H5FD_mirror_fapl_t 0042 * \brief Configuration structure for H5Pset_fapl_mirror() / H5Pget_fapl_mirror() 0043 * 0044 * \details H5FD_mirror_fapl_t is a public structure that is used to pass 0045 * configuration data to the #H5FD_MIRROR driver via a File Access 0046 * Property List. A pointer to an instance of this structure is 0047 * a parameter to H5Pset_fapl_mirror() and H5Pget_fapl_mirror(). 0048 * 0049 * \var uint32_t H5FD_mirror_fapl_t::magic 0050 * Semi-unique number to sanity-check pointers to this structure type. 0051 * Must equal H5FD_MIRROR_FAPL_MAGIC to be considered valid. 0052 * 0053 * \var uint32_t H5FD_mirror_fapl_t::version 0054 * Version number of the H5FD_mirror_fapl_t structure. Any instance passed 0055 * to H5Pset_fapl_mirror() / H5Pget_fapl_mirror() must have a recognized version 0056 * number or an error will be raised. Currently, this field should be set 0057 * to #H5FD_MIRROR_CURR_FAPL_T_VERSION. 0058 * 0059 * \var int H5FD_mirror_fapl_t::handshake_port 0060 * Port number on the remote host. 0061 * 0062 * \var char H5FD_mirror_fapl_t::remote_ip[H5FD_MIRROR_MAX_IP_LEN + 1] 0063 * IP address string of the remote host. 0064 */ 0065 typedef struct H5FD_mirror_fapl_t { 0066 uint32_t magic; 0067 uint32_t version; 0068 int handshake_port; 0069 char remote_ip[H5FD_MIRROR_MAX_IP_LEN + 1]; 0070 } H5FD_mirror_fapl_t; 0071 0072 #ifdef __cplusplus 0073 extern "C" { 0074 #endif 0075 0076 /** @private 0077 * 0078 * \brief Private initializer for the mirror VFD 0079 */ 0080 H5_DLL hid_t H5FD_mirror_init(void); 0081 0082 /** 0083 * \ingroup FAPL 0084 * 0085 * \brief Queries a File Access Property List for #H5FD_MIRROR file driver properties 0086 * 0087 * \fapl_id 0088 * \param[out] fa_out Pointer to #H5FD_MIRROR driver configuration structure 0089 * \returns \herr_t 0090 * 0091 * \details H5Pget_fapl_mirror() queries the #H5FD_MIRROR driver properties as set 0092 * by H5Pset_fapl_mirror(). 0093 * 0094 * \since 1.10.7 0095 */ 0096 H5_DLL herr_t H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_out); 0097 0098 /** 0099 * \ingroup FAPL 0100 * 0101 * \brief Modifies the file access property list to use the #H5FD_MIRROR driver 0102 * 0103 * \fapl_id 0104 * \param[in] fa Pointer to #H5FD_MIRROR driver configuration structure 0105 * 0106 * \returns \herr_t 0107 * 0108 * \details H5Pset_fapl_mirror() modifies the file access property list to use the 0109 * #H5FD_MIRROR driver. 0110 * 0111 * \since 1.10.7 0112 */ 0113 H5_DLL herr_t H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa); 0114 0115 #ifdef __cplusplus 0116 } 0117 #endif 0118 0119 #else /* H5_HAVE_MIRROR_VFD */ 0120 0121 #define H5FD_MIRROR (H5I_INAVLID_HID) 0122 0123 #endif /* H5_HAVE_MIRROR_VFD */ 0124 0125 #endif /* H5FDmirror_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |