kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
Functions
kinetic_types_internal.c File Reference
#include "kinetic_types_internal.h"
#include "kinetic_logger.h"
#include "byte_array.h"
#include <sys/param.h>
#include <errno.h>

Go to the source code of this file.

Functions

KineticStatus KineticProtoStatusCode_to_KineticStatus (Com__Seagate__Kinetic__Proto__Command__Status__StatusCode protoStatus)
 
Com__Seagate__Kinetic__Proto__Command__Synchronization Com__Seagate__Kinetic__Proto__Command__Synchronization_from_KineticSynchronization (KineticSynchronization sync_mode)
 
KineticSynchronization KineticSynchronization_from_Com__Seagate__Kinetic__Proto__Command__Synchronization (Com__Seagate__Kinetic__Proto__Command__Synchronization sync_mode)
 
Com__Seagate__Kinetic__Proto__Command__Algorithm Com__Seagate__Kinetic__Proto__Command__Algorithm_from_KineticAlgorithm (KineticAlgorithm kinteicAlgorithm)
 
KineticAlgorithm KineticAlgorithm_from_Com__Seagate__Kinetic__Proto__Command__Algorithm (Com__Seagate__Kinetic__Proto__Command__Algorithm protoAlgorithm)
 
ByteArray ProtobufCBinaryData_to_ByteArray (ProtobufCBinaryData protoData)
 
bool Copy_ProtobufCBinaryData_to_ByteBuffer (ByteBuffer dest, ProtobufCBinaryData src)
 
bool Copy_Com__Seagate__Kinetic__Proto__Command__KeyValue_to_KineticEntry (Com__Seagate__Kinetic__Proto__Command__KeyValue *key_value, KineticEntry *entry)
 
bool Copy_Com__Seagate__Kinetic__Proto__Command__Range_to_ByteBufferArray (Com__Seagate__Kinetic__Proto__Command__Range *keyRange, ByteBufferArray *keys)
 
int Kinetic_GetErrnoDescription (int err_num, char *buf, size_t len)
 
struct timeval Kinetic_TimevalZero (void)
 
bool Kinetic_TimevalIsZero (struct timeval const tv)
 
struct timeval Kinetic_TimevalAdd (struct timeval const a, struct timeval const b)
 
static int cmp_suseconds_t (suseconds_t const a, suseconds_t const b)
 
int Kinetic_TimevalCmp (struct timeval const a, struct timeval const b)
 
Com__Seagate__Kinetic__Proto__Command__GetLog__Type KineticLogInfo_Type_to_Com__Seagate__Kinetic__Proto__Command__GetLog__Type (KineticLogInfo_Type type)
 
KineticMessageType Com__Seagate__Kinetic__Proto__Command__MessageType_to_KineticMessageType (Com__Seagate__Kinetic__Proto__Command__MessageType type)
 
void KineticSessionConfig_Copy (KineticSessionConfig *dest, KineticSessionConfig *src)
 
void KineticMessage_Init (KineticMessage *const message)
 
static void KineticMessage_HeaderInit (Com__Seagate__Kinetic__Proto__Command__Header *hdr, KineticSession const *const session)
 
void KineticRequest_Init (KineticRequest *request, KineticSession const *const session)
 

Function Documentation

KineticStatus KineticProtoStatusCode_to_KineticStatus ( Com__Seagate__Kinetic__Proto__Command__Status__StatusCode  protoStatus)

Definition at line 28 of file kinetic_types_internal.c.

References COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__DATA_ERROR, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__DEVICE_LOCKED, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__EXPIRED, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__HEADER_REQUIRED, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__HMAC_FAILURE, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__INTERNAL_ERROR, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__INVALID_REQUEST, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__INVALID_STATUS_CODE, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__NESTED_OPERATION_ERRORS, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__NO_SPACE, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__NO_SUCH_HMAC_ALGORITHM, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__NOT_ATTEMPTED, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__NOT_AUTHORIZED, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__NOT_FOUND, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__PERM_DATA_ERROR, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__REMOTE_CONNECTION_ERROR, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__SERVICE_BUSY, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__SUCCESS, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__VERSION_FAILURE, COM__SEAGATE__KINETIC__PROTO__COMMAND__STATUS__STATUS_CODE__VERSION_MISMATCH, KINETIC_STATUS_CLUSTER_MISMATCH, KINETIC_STATUS_CONNECTION_ERROR, KINETIC_STATUS_DATA_ERROR, KINETIC_STATUS_DEVICE_BUSY, KINETIC_STATUS_DEVICE_LOCKED, KINETIC_STATUS_HMAC_FAILURE, KINETIC_STATUS_INVALID, KINETIC_STATUS_INVALID_REQUEST, KINETIC_STATUS_NOT_AUTHORIZED, KINETIC_STATUS_NOT_FOUND, KINETIC_STATUS_OPERATION_FAILED, KINETIC_STATUS_SUCCESS, and KINETIC_STATUS_VERSION_MISMATCH.

Com__Seagate__Kinetic__Proto__Command__Synchronization Com__Seagate__Kinetic__Proto__Command__Synchronization_from_KineticSynchronization ( KineticSynchronization  sync_mode)
KineticSynchronization KineticSynchronization_from_Com__Seagate__Kinetic__Proto__Command__Synchronization ( Com__Seagate__Kinetic__Proto__Command__Synchronization  sync_mode)
Com__Seagate__Kinetic__Proto__Command__Algorithm Com__Seagate__Kinetic__Proto__Command__Algorithm_from_KineticAlgorithm ( KineticAlgorithm  kinteicAlgorithm)
KineticAlgorithm KineticAlgorithm_from_Com__Seagate__Kinetic__Proto__Command__Algorithm ( Com__Seagate__Kinetic__Proto__Command__Algorithm  protoAlgorithm)
ByteArray ProtobufCBinaryData_to_ByteArray ( ProtobufCBinaryData  protoData)

Definition at line 199 of file kinetic_types_internal.c.

References ByteArray::data.

bool Copy_ProtobufCBinaryData_to_ByteBuffer ( ByteBuffer  dest,
ProtobufCBinaryData  src 
)
bool Copy_Com__Seagate__Kinetic__Proto__Command__KeyValue_to_KineticEntry ( Com__Seagate__Kinetic__Proto__Command__KeyValue *  key_value,
KineticEntry entry 
)
bool Copy_Com__Seagate__Kinetic__Proto__Command__Range_to_ByteBufferArray ( Com__Seagate__Kinetic__Proto__Command__Range *  keyRange,
ByteBufferArray keys 
)
int Kinetic_GetErrnoDescription ( int  err_num,
char *  buf,
size_t  len 
)

Definition at line 294 of file kinetic_types_internal.c.

struct timeval Kinetic_TimevalZero ( void  )

Definition at line 308 of file kinetic_types_internal.c.

bool Kinetic_TimevalIsZero ( struct timeval const  tv)

Definition at line 316 of file kinetic_types_internal.c.

struct timeval Kinetic_TimevalAdd ( struct timeval const  a,
struct timeval const  b 
)

Definition at line 321 of file kinetic_types_internal.c.

static int cmp_suseconds_t ( suseconds_t const  a,
suseconds_t const  b 
)
static

Definition at line 335 of file kinetic_types_internal.c.

int Kinetic_TimevalCmp ( struct timeval const  a,
struct timeval const  b 
)

Definition at line 348 of file kinetic_types_internal.c.

References cmp_suseconds_t().

Com__Seagate__Kinetic__Proto__Command__GetLog__Type KineticLogInfo_Type_to_Com__Seagate__Kinetic__Proto__Command__GetLog__Type ( KineticLogInfo_Type  type)
KineticMessageType Com__Seagate__Kinetic__Proto__Command__MessageType_to_KineticMessageType ( Com__Seagate__Kinetic__Proto__Command__MessageType  type)

Definition at line 379 of file kinetic_types_internal.c.

void KineticSessionConfig_Copy ( KineticSessionConfig dest,
KineticSessionConfig src 
)
void KineticMessage_Init ( KineticMessage *const  message)
static void KineticMessage_HeaderInit ( Com__Seagate__Kinetic__Proto__Command__Header *  hdr,
KineticSession const *const  session 
)
static
void KineticRequest_Init ( KineticRequest *  request,
KineticSession const *const  session 
)