#include <stdint.h>Data Structures | |
| struct | cld_packet |
| header for each packet More... | |
| struct | cld_msg_hdr |
| header for each message More... | |
| struct | cld_msg_resp |
| standard response for each message More... | |
| struct | cld_msg_open |
| OPEN message. More... | |
| struct | cld_msg_open_resp |
| OPEN message response. More... | |
| struct | cld_msg_get |
| GET message. More... | |
| struct | cld_msg_get_resp |
| GET message response. More... | |
| struct | cld_msg_data |
| DATA message. More... | |
| struct | cld_msg_put |
| PUT message. More... | |
| struct | cld_msg_close |
| CLOSE message. More... | |
| struct | cld_msg_del |
| DEL message. More... | |
| struct | cld_msg_unlock |
| UNLOCK message. More... | |
| struct | cld_msg_lock |
| LOCK message. More... | |
| struct | cld_msg_event |
| Server-to-client EVENT message. More... | |
Defines | |
| #define | CLD_PKT_MAGIC "CLDc1pkt" |
| #define | CLD_MSG_MAGIC "CLDc1msg" |
| #define | CLD_ALIGN8(n) ((8 - ((n) & 7)) & 7) |
| #define | SIDFMT "%016llX" |
| #define | SIDARG(sid) cld_sid2llu(sid) |
Enumerations | |
| enum | { CLD_MAGIC_SZ = 8, CLD_SID_SZ = 8, CLD_INODE_NAME_MAX = 256, CLD_MAX_USERNAME = 32, CLD_MAX_SECRET_KEY = 128, CLD_MAX_DATA_MSGS = 1024 } |
| enum | cld_msg_ops { cmo_nop = 0, cmo_new_sess = 1, cmo_open = 2, cmo_get_meta = 3, cmo_get = 4, cmo_data_s = 5, cmo_put = 6, cmo_close = 7, cmo_del = 8, cmo_lock = 9, cmo_unlock = 10, cmo_trylock = 11, cmo_ack = 12, cmo_end_sess = 13, cmo_ping = 30, cmo_not_master = 31, cmo_event = 32, cmo_data_c = 33 } |
| available RPC operations More... | |
| enum | cle_err_codes { CLE_OK = 0, CLE_SESS_EXISTS = 1, CLE_SESS_INVAL = 2, CLE_DB_ERR = 3, CLE_BAD_PKT = 4, CLE_INODE_INVAL = 5, CLE_NAME_INVAL = 6, CLE_OOM = 7, CLE_FH_INVAL = 8, CLE_DATA_INVAL = 9, CLE_LOCK_INVAL = 10, CLE_LOCK_CONFLICT = 11, CLE_LOCK_PENDING = 12, CLE_MODE_INVAL = 13, CLE_INODE_EXISTS = 14, CLE_DIR_NOTEMPTY = 15, CLE_INTERNAL_ERR = 16, CLE_TIMEOUT = 17, CLE_SIG_INVAL = 18 } |
| CLD error codes. More... | |
| enum | cld_open_modes { COM_READ = (1 << 0), COM_WRITE = (1 << 1), COM_LOCK = (1 << 2), COM_ACL = (1 << 3), COM_CREATE = (1 << 4), COM_EXCL = (1 << 5), COM_DIRECTORY = (1 << 6) } |
| availble OPEN mode flags More... | |
| enum | cld_events { CE_UPDATED = (1 << 0), CE_DELETED = (1 << 1), CE_LOCKED = (1 << 2), CE_MASTER_FAILOVER = (1 << 3), CE_SESS_FAILED = (1 << 4) } |
| potential events client may receive More... | |
| enum | cld_lock_flags { CLF_SHARED = (1 << 0) } |
| LOCK flags. More... | |
Functions | |
| unsigned long long | cld_sid2llu (const uint8_t *sid) |
| void | __cld_rand64 (void *p) |
| #define CLD_ALIGN8 | ( | n | ) | ((8 - ((n) & 7)) & 7) |
| #define CLD_MSG_MAGIC "CLDc1msg" |
| #define CLD_PKT_MAGIC "CLDc1pkt" |
| #define SIDARG | ( | sid | ) | cld_sid2llu(sid) |
| #define SIDFMT "%016llX" |
| anonymous enum |
| enum cld_events |
| enum cld_lock_flags |
| enum cld_msg_ops |
available RPC operations
| enum cld_open_modes |
| enum cle_err_codes |
CLD error codes.
| void __cld_rand64 | ( | void * | p | ) |
| unsigned long long cld_sid2llu | ( | const uint8_t * | sid | ) |
1.5.9