/usr/include/saf/ais_checkpoint.h is in libheartbeat2-dev 1:3.0.5-3.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | #ifndef _AIS_CHECKPOINT_H_
#define _AIS_CHECKPOINT_H_
#include "ais_base.h"
/* Chapter 7 */
#ifdef __CPLUSPLUS
extern "C"{
#endif
typedef OPAQUE_TYPE SaCkptHandleT;
typedef OPAQUE_TYPE SaCkptCheckpointHandleT;
typedef OPAQUE_TYPE SaCkptSectionIteratorT;
#define SA_CKPT_WR_ALL_REPLICAS 0X1
#define SA_CKPT_WR_ACTIVE_REPLICA 0X2
#define SA_CKPT_WR_ACTIVE_REPLICA_WEAK 0X4
typedef SaUint32T SaCkptCheckpointCreationFlagsT;
typedef struct {
SaCkptCheckpointCreationFlagsT creationFlags;
SaSizeT checkpointSize;
SaTimeT retentionDuration;
SaUint32T maxSections;
SaSizeT maxSectionSize;
SaUint32T maxSectionIdSize;
} SaCkptCheckpointCreationAttributesT;
#define SA_CKPT_CHECKPOINT_READ 0X1
#define SA_CKPT_CHECKPOINT_WRITE 0X2
#define SA_CKPT_CHECKPOINT_COLOCATED 0X4
typedef SaUint32T SaCkptCheckpointOpenFlagsT;
#define SA_CKPT_DEFAULT_SECTION_ID {NULL, 0}
#define SA_CKPT_GENERATED_SECTION_ID {NULL, 0}
typedef struct {
SaUint8T *id;
SaUint32T idLen;
} SaCkptSectionIdT;
typedef struct {
SaCkptSectionIdT *sectionId;
SaTimeT expirationTime;
} SaCkptSectionCreationAttributesT;
typedef enum {
SA_CKPT_SECTION_VALID = 1,
SA_CKPT_SECTION_CORRUPTED = 2
} SaCkptSectionStateT;
typedef struct {
SaCkptSectionIdT sectionId;
SaTimeT expirationTime;
SaSizeT sectionSize;
SaCkptSectionStateT sectionState;
SaTimeT lastUpdate;
} SaCkptSectionDescriptorT;
typedef enum {
SA_CKPT_SECTIONS_FOREVER = 1,
SA_CKPT_SECTIONS_LEQ_EXPIRATION_TIME = 2,
SA_CKPT_SECTIONS_GEQ_EXPIRATION_TIME = 3,
SA_CKPT_SECTIONS_CORRUPTED = 4,
SA_CKPT_SECTIONS_ANY = 5
} SaCkptSectionsChosenT;
typedef struct {
SaCkptSectionIdT sectionId;
void *dataBuffer;
SaSizeT dataSize;
SaOffsetT dataOffset;
SaSizeT readSize; /*[out] */
} SaCkptIOVectorElementT;
typedef struct {
SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
SaUint32T numberOfSections;
SaUint32T memoryUsed;
} SaCkptCheckpointStatusT;
typedef void
(*SaCkptCheckpointOpenCallbackT)(SaInvocationT invocation,
const SaCkptCheckpointHandleT
*checkpointHandle,
SaErrorT error);
typedef void
(*SaCkptCheckpointSynchronizeCallbackT)(SaInvocationT invocation,
SaErrorT error);
typedef struct {
SaCkptCheckpointOpenCallbackT saCkptCheckpointOpenCallback;
SaCkptCheckpointSynchronizeCallbackT saCkptCheckpointSynchronizeCallback;
} SaCkptCallbacksT;
SaErrorT
saCkptInitialize(SaCkptHandleT *ckptHandle, const SaCkptCallbacksT *callbacks,
const SaVersionT *version);
SaErrorT
saCkptSelectionObjectGet(const SaCkptHandleT *ckptHandle,
SaSelectionObjectT *selectionObject);
SaErrorT
saCkptDispatch(const SaCkptHandleT *ckptHandle,
SaDispatchFlagsT dispatchFlags);
SaErrorT
saCkptFinalize(const SaCkptHandleT *ckptHandle);
SaErrorT
saCkptCheckpointOpen(
const SaCkptHandleT *ckptHandle,
const SaNameT *ckeckpointName,
const SaCkptCheckpointCreationAttributesT
*checkpointCreationAttributes,
SaCkptCheckpointOpenFlagsT checkpointOpenFlags,
SaTimeT timeout,
SaCkptCheckpointHandleT *checkpointHandle);
SaErrorT
saCkptCheckpointOpenAsync(const SaCkptHandleT *ckptHandle,
SaInvocationT invocation,
const SaNameT *ckeckpointName,
const SaCkptCheckpointCreationAttributesT
*checkpointCreationAttributes,
SaCkptCheckpointOpenFlagsT checkpointOpenFlags);
SaErrorT
saCkptCheckpointClose(const SaCkptCheckpointHandleT *checkpointHandle);
SaErrorT
saCkptCheckpointUnlink(
const SaCkptHandleT *ckptHandle,
const SaNameT *checkpointName);
SaErrorT
saCkptCheckpointRetentionDurationSet(const SaCkptCheckpointHandleT
*checkpointHandle,
SaTimeT retentionDuration);
SaErrorT
saCkptActiveCheckpointSet(const SaCkptCheckpointHandleT *checkpointHandle);
SaErrorT
saCkptCheckpointStatusGet(const SaCkptCheckpointHandleT *checkpointHandle,
SaCkptCheckpointStatusT *checkpointStatus);
SaErrorT
saCkptSectionCreate(const SaCkptCheckpointHandleT *checkpointHandle,
SaCkptSectionCreationAttributesT
*sectionCreationAttributes,
const void *initialData,
SaUint32T initialDataSize);
SaErrorT
saCkptSectionDelete(const SaCkptCheckpointHandleT *checkpointHandle,
const SaCkptSectionIdT *sectionId);
SaErrorT
saCkptSectionExpirationTimeSet(const SaCkptCheckpointHandleT *checkpointHandle,
const SaCkptSectionIdT* sectionId,
SaTimeT expirationTime);
SaErrorT
saCkptSectionIteratorInitialize(const SaCkptCheckpointHandleT
*checkpointHandle,
SaCkptSectionsChosenT sectionsChosen,
SaTimeT expirationTime,
SaCkptSectionIteratorT *sectionIterator);
SaErrorT
saCkptSectionIteratorNext(SaCkptSectionIteratorT *sectionIterator,
SaCkptSectionDescriptorT *sectionDescriptor);
SaErrorT
saCkptSectionIteratorFinalize(SaCkptSectionIteratorT *sectionIterator);
SaErrorT
saCkptCheckpointWrite(const SaCkptCheckpointHandleT *checkpointHandle,
const SaCkptIOVectorElementT *ioVector,
SaUint32T numberOfElements,
SaUint32T *erroneousVectorIndex);
SaErrorT
saCkptSectionOverwrite(const SaCkptCheckpointHandleT *checkpointHandle,
const SaCkptSectionIdT *sectionId,
SaUint8T *dataBuffer,
SaSizeT dataSize);
SaErrorT
saCkptCheckpointRead(const SaCkptCheckpointHandleT *checkpointHandle,
SaCkptIOVectorElementT *ioVector,
SaUint32T numberOfElements,
SaUint32T *erroneousVectorIndex);
SaErrorT
saCkptCheckpointSynchronize(const SaCkptCheckpointHandleT *ckeckpointHandle,
SaTimeT timeout);
SaErrorT
saCkptCheckpointSynchronizeAsync(const SaCkptHandleT *ckptHandle,
SaInvocationT invocation,
const SaCkptCheckpointHandleT
*checkpointHandle);
#ifdef __CPLUSPLUS
}
#endif
#endif /* _AIS_CHECKPOINT_H_ */
|