21 #ifndef _KINETIC_TYPES_H
22 #define _KINETIC_TYPES_H
25 #if !defined(__bool_true_false_are_defined) || (__bool_true_false_are_defined == 0)
39 #define KINETIC_SOCKET_INVALID (-1)
40 #define KINETIC_PORT (8123)
41 #define KINETIC_TLS_PORT (8443)
42 #define KINETIC_HMAC_SHA1_LEN (SHA_DIGEST_LENGTH)
43 #define KINETIC_HMAC_MAX_LEN (KINETIC_HMAC_SHA1_LEN)
44 #define KINETIC_PIN_MAX_LEN (1024)
45 #define KINETIC_DEFAULT_KEY_LEN (1024)
46 #define KINETIC_MAX_KEY_LEN (4096)
47 #define KINETIC_OBJ_SIZE (1024 * 1024)
55 #include <sys/types.h>
57 #define HOST_NAME_MAX 256
58 #endif // HOST_NAME_MAX
73 typedef enum _KineticAlgorithm {
86 typedef enum _KineticSynchronization {
118 typedef struct _KineticSessionConfig {
206 typedef struct _KineticCompletionData {
209 struct timeval requestTime;
225 typedef struct _KineticCompletionClosure {
235 typedef struct _KineticEntry {
255 typedef struct _KineticKeyRange {
479 #define KINETIC_P2P_OPERATION_LIMIT 100000
484 #define KINETIC_P2P_MAX_NESTING 1000
490 #define KINETIC_CLIENT_DEFAULT_LOG_LEVEL 0
491 #define KINETIC_CLIENT_DEFAULT_READER_THREADS 4
492 #define KINETIC_CLIENT_DEFAULT_MAX_THREADPOOL_THREADS 8
516 #endif // _KINETIC_TYPES_H
Handle to the kinetic client, which is shared by all connections.
An HMAC validation error was detected.
uint8_t maxThreadpoolThreads
Max number of threads to use for the threadpool that handles response callbacks.
Structure for handling generic arrays of bytes.
KineticSynchronization
Enumeration of synchronization types for an operation on a KineticEntry.
Structure for an embedded ByteArray as a buffer.
One or more of byte buffers did not fit all data.
bool reverse
Optional bool, defaults to false If true, the key range will be returned in reverse order...
This request is made persistent before returning.
int logLevel
Logging level (-1:none, 0:error, 1:info, 2:verbose, 3:full)
uint32_t maxIdentityCount
int64_t sequence
Sequence count for the operation.
ByteBuffer tag
Generated authentication hash per the specified algorithm
Log info device name (used as a key for device-specific log data)
bool tls
If set, will use TLS for peer connection. Optional, defaults to false.
Structure used to specify the configuration for a session.
No request was attempted.
bool endKeyInclusive
Optional bool, defaults to false If set, indicates that the end key should be included in the returne...
KineticMessageType messageType
Device did not respond to the operation in time.
All pending information that has not been written is pushed to the disk and the command that specifie...
Host was empty in request.
const char * protocolVersion
kinetic-protocol version library is built with
bool force
If set for a GET/DELETE request, will override version checking.
bool metadataOnly
If set for a GET request, will return only the metadata for the specified object (value will not be r...
#define KINETIC_MAX_KEY_LEN
Max key length.
The operation failed because the device is securely locked. An UNLOCK must be issued to unlock for us...
Peer-to-peer opearation instance.
The specified object version info for a PUT/GET do not match stored object.
uint32_t maxOutstandingWriteRequests
char * protocolCompilationDate
Something about the request is invalid.
KineticLogInfo_Capacity * capacity
Log info network interface entry.
The operation requires an SSL connection and the specified connection is non-SSL. ...
char * hostname
Host name of peer/destination. Pointer must remain valid until operation completes.
KineticAlgorithm algorithm
Algorithm used to generate the specified tag
KineticLogInfo_Configuration * configuration
int64_t identity
The identity associated with this request.
Failed allocating/deallocating memory.
KineticAlgorithm
Enumeration of encryption/checksum key algorithms.
int32_t port
Port to etablish peer connection to destination host.
Log info device configuration.
const char * repoCommitHash
repository commit hash which library is built from
uint32_t maxOutstandingReadRequests
Number of status codes in KineticStatusDescriptor.
const char * version
kinetic-c library version
Device busy (retry later)
uint16_t timeoutSeconds
Operation timeout. If 0, use the default (10 seconds).
The device log type specified was invalid.
KineticLogInfo_Limits * limits
Closure which can be specified for operations which support asynchronous mode.
Configuration of remote peer for a PEER2PEERPUSH operation.
const char * Kinetic_GetStatusDescription(KineticStatus status)
Provides a string representation for a KineticStatus code.
KineticLogInfo_Type
Log info type.
A security operation failed due to bad ACL(s)
The requested object does not exist.
int32_t maxReturned
Required int32, must be greater than 0 The maximum number of keys returned, in sorted order...
kinetic-c library version info (returned from KineticClient_Version())
KineticP2P_OperationData * operations
Number of operations in operations array
Kinetic Key Range request structure.
Base log info structure which is allocated by client and passed to KineticAdminClient_GetLog.
No connection/disconnected.
A timeout occurred while waiting for a socket operation.
KineticLogInfo_Interface * interfaces
uint8_t readerThreads
Number of threads used for handling incoming responses and status messages.
KineticLogInfo_Device * device
Specified file does not exist or could not be read/writtten.
void(* KineticCompletionCallback)(KineticCompletionData *kinetic_data, void *client_data)
Operation completion callback function prototype.
KineticCompletionCallback callback
Function to be called upon completion.
An instance of a session with a Kinetic device.
They can be made persistent when the drive chooses, or when a subsequent FLUSH is sent to the drive...
int64_t clusterVersion
The version number of this cluster definition.
ByteBuffer startKey
Required bytes, the beginning of the requested range.
Completion data which will be provided to KineticCompletionClosure for asynchronous operations...
Invalid synchronization value.
int port
Port for Kinetic Device session.
Log info statistics entry.
No operation has been attempted.
Session was NULL in request.
size_t numOperations
Peer to perform operations with
Device reported an operation error.
int64_t connectionID
Connection ID for the session.
KineticLogInfo_Utilization * utilizations
Log info untilization entry.
The session has been terminated by the Kinetic device.
KineticLogInfo_Statistics * statistics
const char * logFile
Path to log file. Specify 'stdout' to log to STDOUT or NULL to disable logging.
bool computeTag
If set and an algorithm is specified, the tag will be populated with the calculated hash for integrit...
KineticLogInfo_Temperature * temperatures
ByteBuffer newVersion
New version for the object to assume once written to disk (optional)
An operation is missing a PIN.
ByteBuffer key
Key associated with the object stored on disk.
bool startKeyInclusive
Optional bool, defaults to false If set, indicates that the start key should be included in the retur...
An operation is missing a required key.
const char * KineticMessageType_GetName(KineticMessageType type)
Provides a string representation for a Kinetic message type.
KineticStatus status
Resultant status of the operation.
uint64_t nominalCapacityInBytes
Status not available (no reponse/status available)
A device name is required, but was empty.
All PDUs for the session have been allocated.
char * protocolSourceHash
KineticStatus
Kinetic status codes.
Device reported data error, no space or HMAC failure.
uint32_t maxKeyRangeCount
KineticMessageType
Log info message types.
An I/O error occurred during a socket operation.
Configuration values for the KineticClient connection.
bool useSsl
Set to `true' to enable SSL for for this session.
void * clientData
Optional client-supplied data which will be supplied to callback.
KineticStatus resultStatus
ByteBuffer dbVersion
Current version of the entry (optional)
ByteBuffer endKey
Required bytes, the end of the requested range.
An operation is missing a required value buffer.
KineticSynchronization synchronization
Synchronization method to use for PUT/DELETE requests.
Log info temperature entry.
HMAC key is empty or NULL.
Specified cluster version does not match device.
Peer-to-peer operation data structure.
ByteBuffer value
Value data associated with the key.
Session configuration was invalid or NULL.
KineticP2P_Operation * chainedOperation