45#include <sys/socket.h>
68static void votequorum_inst_free (
void *inst);
113static void votequorum_inst_free (
void *inst)
582 if ((
strlen(name) == 0) ||
622 unsigned int cast_vote,
631 if ((
strlen(name) == 0) ||
680 if ((
strlen(name) == 0) ||
777 if ((
strlen(name) == 0) ||
cs_dispatch_flags_t
The cs_dispatch_flags_t enum.
@ CS_DISPATCH_ONE_NONBLOCKING
cs_error_t qb_to_cs_error(int result)
qb_to_cs_error
cs_error_t
The cs_error_t enum.
#define CS_IPC_TIMEOUT_MS
char oldname[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
char newname[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
#define DECLARE_HDB_DATABASE
uint64_t votequorum_handle_t
votequorum_handle_t
@ MESSAGE_RES_VOTEQUORUM_NODELIST_NOTIFICATION
@ MESSAGE_RES_VOTEQUORUM_EXPECTEDVOTES_NOTIFICATION
@ MESSAGE_RES_VOTEQUORUM_QUORUM_NOTIFICATION
@ MESSAGE_REQ_VOTEQUORUM_TRACKSTART
@ MESSAGE_REQ_VOTEQUORUM_GETINFO
@ MESSAGE_REQ_VOTEQUORUM_QDEVICE_UNREGISTER
@ MESSAGE_REQ_VOTEQUORUM_QDEVICE_REGISTER
@ MESSAGE_REQ_VOTEQUORUM_TRACKSTOP
@ MESSAGE_REQ_VOTEQUORUM_SETEXPECTED
@ MESSAGE_REQ_VOTEQUORUM_QDEVICE_UPDATE
@ MESSAGE_REQ_VOTEQUORUM_SETVOTES
@ MESSAGE_REQ_VOTEQUORUM_QDEVICE_MASTER_WINS
@ MESSAGE_REQ_VOTEQUORUM_QDEVICE_POLL
#define VOTEQUORUM_QDEVICE_MAX_NAME_LEN
cs_error_t hdb_error_to_cs(int res)
#define IPC_DISPATCH_SIZE
cs_error_t votequorum_qdevice_register(votequorum_handle_t handle, const char *name)
Register a quorum device.
cs_error_t votequorum_setvotes(votequorum_handle_t handle, unsigned int nodeid, unsigned int votes)
set votes for a node
cs_error_t votequorum_qdevice_master_wins(votequorum_handle_t handle, const char *name, unsigned int allow)
Allow qdevice to tell votequorum if master_wins can be enabled or not.
cs_error_t votequorum_qdevice_poll(votequorum_handle_t handle, const char *name, unsigned int cast_vote, votequorum_ring_id_t ring_id)
Poll a quorum device.
cs_error_t votequorum_context_get(votequorum_handle_t handle, void **context)
Save and retrieve private data/context.
cs_error_t votequorum_finalize(votequorum_handle_t handle)
Close the quorum handle.
cs_error_t votequorum_trackstop(votequorum_handle_t handle)
votequorum_trackstop
cs_error_t votequorum_qdevice_unregister(votequorum_handle_t handle, const char *name)
Unregister a quorum device.
cs_error_t votequorum_fd_get(votequorum_handle_t handle, int *fd)
Get a file descriptor on which to poll.
cs_error_t votequorum_context_set(votequorum_handle_t handle, void *context)
votequorum_context_set
cs_error_t votequorum_trackstart(votequorum_handle_t handle, uint64_t context, unsigned int flags)
Track node and quorum changes.
cs_error_t votequorum_qdevice_update(votequorum_handle_t handle, const char *oldname, const char *newname)
Update registered name of a quorum device.
cs_error_t votequorum_dispatch(votequorum_handle_t handle, cs_dispatch_flags_t dispatch_types)
Dispatch messages and configuration changes.
cs_error_t votequorum_getinfo(votequorum_handle_t handle, unsigned int nodeid, struct votequorum_info *info)
Get quorum information.
cs_error_t votequorum_setexpected(votequorum_handle_t handle, unsigned int expected_votes)
set expected_votes
cs_error_t votequorum_initialize(votequorum_handle_t *handle, votequorum_callbacks_t *callbacks)
Create a new quorum connection.
The req_lib_votequorum_general struct.
The req_lib_votequorum_getinfo struct.
The req_lib_votequorum_qdevice_master_wins struct.
char name[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
The req_lib_votequorum_qdevice_poll struct.
char name[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
The req_lib_votequorum_qdevice_register struct.
char name[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
The req_lib_votequorum_qdevice_unregister struct.
char name[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
The req_lib_votequorum_qdevice_update struct.
char newname[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
char oldname[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
The req_lib_votequorum_setexpected struct.
unsigned int expected_votes
The req_lib_votequorum_setvotes struct.
The req_lib_votequorum_trackstart struct.
The res_lib_votequorum_expectedvotes_notification struct.
The res_lib_votequorum_getinfo struct.
unsigned int highest_expected
char qdevice_name[VOTEQUORUM_QDEVICE_MAX_NAME_LEN]
unsigned int expected_votes
unsigned int qdevice_votes
The res_lib_votequorum_quorum_notification struct.
The res_lib_votequorum_status struct.
The votequorum_callbacks_t struct.
votequorum_nodelist_notification_fn_t votequorum_nodelist_notify_fn
votequorum_expectedvotes_notification_fn_t votequorum_expectedvotes_notify_fn
votequorum_quorum_notification_fn_t votequorum_quorum_notify_fn
The votequorum_info struct.
votequorum_callbacks_t callbacks
The votequorum_node_t struct.
The votequorum_ring_id_t struct.
struct memb_ring_id ring_id