![]() |
kinetic-c
v0.12.0
Seagate Kinetic Protocol Client Library for C
|
#include <stdint.h>#include <stdbool.h>#include <stddef.h>Go to the source code of this file.
Data Structures | |
| struct | ByteArray |
| Structure for handling generic arrays of bytes. More... | |
| struct | ByteBuffer |
| Structure for an embedded ByteArray as a buffer. More... | |
| struct | ByteBufferArray |
Macros | |
| #define | BYTE_ARRAY_NONE (ByteArray){.len = 0, .data = NULL} |
| Convenience macro to represent an empty array with no data. More... | |
| #define | BYTE_BUFFER_NONE (ByteBuffer){.array = BYTE_ARRAY_NONE, .bytesUsed = 0} |
| Convenience macro to represent an empty buffer with no data. More... | |
| #define BYTE_ARRAY_NONE (ByteArray){.len = 0, .data = NULL} |
Convenience macro to represent an empty array with no data.
Definition at line 40 of file byte_array.h.
| #define BYTE_BUFFER_NONE (ByteBuffer){.array = BYTE_ARRAY_NONE, .bytesUsed = 0} |
Convenience macro to represent an empty buffer with no data.
Definition at line 65 of file byte_array.h.
| ByteArray ByteArray_Create | ( | void * | data, |
| size_t | len | ||
| ) |
Definition at line 31 of file byte_array.c.
References ByteArray::data.
| ByteArray ByteArray_CreateWithCString | ( | const char * | str | ) |
Definition at line 38 of file byte_array.c.
References ByteArray::data.
Definition at line 52 of file byte_array.c.
References ByteArray::data, and ByteArray::len.
| void ByteArray_FillWithDummyData | ( | const ByteArray | array | ) |
Definition at line 45 of file byte_array.c.
References ByteArray::data, and ByteArray::len.
| ByteBuffer ByteBuffer_Create | ( | void * | data, |
| size_t | max_len, | ||
| size_t | used | ||
| ) |
Definition at line 68 of file byte_array.c.
| ByteBuffer ByteBuffer_CreateWithArray | ( | ByteArray | array | ) |
Definition at line 78 of file byte_array.c.
References ByteBuffer::array.
| ByteBuffer ByteBuffer_CreateAndAppend | ( | void * | data, |
| size_t | max_len, | ||
| const void * | value, | ||
| size_t | value_len | ||
| ) |
Definition at line 83 of file byte_array.c.
References ByteBuffer_Append(), and ByteBuffer_Create().
| ByteBuffer ByteBuffer_CreateAndAppendArray | ( | void * | data, |
| size_t | max_len, | ||
| const ByteArray | value | ||
| ) |
Definition at line 90 of file byte_array.c.
References ByteBuffer_AppendArray(), and ByteBuffer_Create().
| ByteBuffer ByteBuffer_CreateAndAppendCString | ( | void * | data, |
| size_t | max_len, | ||
| const char * | value | ||
| ) |
Definition at line 97 of file byte_array.c.
References ByteBuffer_AppendCString(), and ByteBuffer_Create().
| ByteBuffer ByteBuffer_CreateAndAppendFormattedCString | ( | void * | data, |
| size_t | max_len, | ||
| const char * | format, | ||
| ... | |||
| ) |
Definition at line 221 of file byte_array.c.
References append_formatted_cstring_va_list(), and ByteBuffer_Create().
| ByteBuffer ByteBuffer_CreateAndAppendDummyData | ( | void * | data, |
| size_t | max_len, | ||
| size_t | len | ||
| ) |
Definition at line 104 of file byte_array.c.
References ByteBuffer_AppendDummyData(), and ByteBuffer_Create().
| void ByteBuffer_Reset | ( | ByteBuffer * | buffer | ) |
Definition at line 62 of file byte_array.c.
References ByteBuffer::bytesUsed.
| long ByteBuffer_BytesRemaining | ( | const ByteBuffer | buffer | ) |
Definition at line 111 of file byte_array.c.
References ByteBuffer::array, ByteBuffer::bytesUsed, ByteArray::data, and ByteArray::len.
| ByteArray ByteBuffer_Consume | ( | ByteBuffer * | buffer, |
| size_t | max_len | ||
| ) |
Definition at line 117 of file byte_array.c.
References ByteBuffer::array, BYTE_ARRAY_NONE, ByteBuffer_BytesRemaining(), ByteBuffer::bytesUsed, ByteArray::data, and ByteArray::len.
| ByteBuffer* ByteBuffer_Append | ( | ByteBuffer * | buffer, |
| const void * | data, | ||
| size_t | len | ||
| ) |
Definition at line 135 of file byte_array.c.
References ByteBuffer::array, ByteBuffer::bytesUsed, ByteArray::data, and ByteArray::len.
| ByteBuffer* ByteBuffer_AppendArray | ( | ByteBuffer * | buffer, |
| const ByteArray | array | ||
| ) |
Definition at line 149 of file byte_array.c.
References ByteBuffer::array, ByteBuffer::bytesUsed, ByteArray::data, and ByteArray::len.
| ByteBuffer* ByteBuffer_AppendBuffer | ( | ByteBuffer * | buffer, |
| const ByteBuffer | bufferToAppend | ||
| ) |
Definition at line 162 of file byte_array.c.
References ByteBuffer::array, ByteBuffer::bytesUsed, ByteArray::data, and ByteArray::len.
| ByteBuffer* ByteBuffer_AppendCString | ( | ByteBuffer * | buffer, |
| const char * | data | ||
| ) |
Definition at line 176 of file byte_array.c.
References ByteBuffer::array, ByteBuffer::bytesUsed, ByteArray::data, and ByteArray::len.
| ByteBuffer* ByteBuffer_AppendFormattedCString | ( | ByteBuffer * | buffer, |
| const char * | format, | ||
| ... | |||
| ) |
Definition at line 205 of file byte_array.c.
References append_formatted_cstring_va_list(), ByteBuffer::array, and ByteArray::data.
| ByteBuffer* ByteBuffer_AppendDummyData | ( | ByteBuffer * | buffer, |
| size_t | len | ||
| ) |
Definition at line 235 of file byte_array.c.
References ByteBuffer::array, ByteBuffer::bytesUsed, ByteArray::data, and ByteArray::len.
| bool ByteBuffer_IsNull | ( | ByteBuffer const | buffer | ) |
Definition at line 249 of file byte_array.c.
References ByteBuffer::array, and ByteArray::data.
| ByteBuffer ByteBuffer_Malloc | ( | size_t | size | ) |
Definition at line 254 of file byte_array.c.
References ByteBuffer_Create().
| ByteBuffer ByteBuffer_MallocAndAppend | ( | const void * | data, |
| size_t | len | ||
| ) |
Definition at line 262 of file byte_array.c.
References ByteBuffer_Append(), ByteBuffer_IsNull(), and ByteBuffer_Malloc().
| void ByteBuffer_Free | ( | ByteBuffer | buffer | ) |
Definition at line 272 of file byte_array.c.
References ByteBuffer::array, and ByteArray::data.
1.8.8