|
corosync
2.3.5
|
#include <config.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/uio.h>#include <errno.h>#include <qb/qbipcc.h>#include <corosync/corotypes.h>#include <corosync/corodefs.h>#include <corosync/hdb.h>#include <corosync/quorum.h>#include <corosync/ipc_quorum.h>#include "util.h"
Go to the source code of this file.
Data Structures | |
| struct | quorum_inst |
Functions | |
| DECLARE_HDB_DATABASE (quorum_handle_t_db, quorum_inst_free) | |
| cs_error_t | quorum_initialize (quorum_handle_t *handle, quorum_callbacks_t *callbacks, uint32_t *quorum_type) |
| Create a new quorum connection. More... | |
| cs_error_t | quorum_finalize (quorum_handle_t handle) |
| Close the quorum handle. More... | |
| cs_error_t | quorum_getquorate (quorum_handle_t handle, int *quorate) |
| Get quorum information. More... | |
| cs_error_t | quorum_fd_get (quorum_handle_t handle, int *fd) |
| Get a file descriptor on which to poll. More... | |
| cs_error_t | quorum_context_get (quorum_handle_t handle, const void **context) |
| cs_error_t | quorum_context_set (quorum_handle_t handle, const void *context) |
| cs_error_t | quorum_trackstart (quorum_handle_t handle, unsigned int flags) |
| Track node and quorum changes. More... | |
| cs_error_t | quorum_trackstop (quorum_handle_t handle) |
| cs_error_t | quorum_dispatch (quorum_handle_t handle, cs_dispatch_flags_t dispatch_types) |
| Dispatch messages and configuration changes. More... | |
| DECLARE_HDB_DATABASE | ( | quorum_handle_t_db | , |
| quorum_inst_free | |||
| ) |
| cs_error_t quorum_context_get | ( | quorum_handle_t | handle, |
| const void ** | context | ||
| ) |
Definition at line 232 of file lib/quorum.c.
References quorum_inst::context, CS_OK, and hdb_error_to_cs().
| cs_error_t quorum_context_set | ( | quorum_handle_t | handle, |
| const void * | context | ||
| ) |
Definition at line 251 of file lib/quorum.c.
References quorum_inst::context, CS_OK, and hdb_error_to_cs().
| cs_error_t quorum_dispatch | ( | quorum_handle_t | handle, |
| cs_dispatch_flags_t | dispatch_types | ||
| ) |
Dispatch messages and configuration changes.
Definition at line 351 of file lib/quorum.c.
References quorum_inst::c, quorum_inst::callbacks, CS_DISPATCH_ALL, CS_DISPATCH_BLOCKING, CS_DISPATCH_ONE, CS_DISPATCH_ONE_NONBLOCKING, CS_ERR_BAD_HANDLE, CS_ERR_INVALID_PARAM, CS_ERR_LIBRARY, CS_ERR_TRY_AGAIN, CS_OK, quorum_inst::finalize, hdb_error_to_cs(), IPC_DISPATCH_SIZE, MESSAGE_RES_QUORUM_NOTIFICATION, qb_to_cs_error(), quorum_callbacks_t::quorum_notify_fn, and res_lib_quorum_notification::view_list.
Referenced by sam_initialize(), and sam_warn_signal_set().
| cs_error_t quorum_fd_get | ( | quorum_handle_t | handle, |
| int * | fd | ||
| ) |
Get a file descriptor on which to poll.
Definition at line 212 of file lib/quorum.c.
References quorum_inst::c, CS_OK, hdb_error_to_cs(), and qb_to_cs_error().
Referenced by sam_initialize().
| cs_error_t quorum_finalize | ( | quorum_handle_t | handle | ) |
Close the quorum handle.
Definition at line 142 of file lib/quorum.c.
References CS_ERR_BAD_HANDLE, CS_OK, quorum_inst::finalize, and hdb_error_to_cs().
Referenced by sam_initialize(), and sam_register().
| cs_error_t quorum_getquorate | ( | quorum_handle_t | handle, |
| int * | quorate | ||
| ) |
Get quorum information.
Definition at line 170 of file lib/quorum.c.
References quorum_inst::c, CS_IPC_TIMEOUT_MS, CS_OK, hdb_error_to_cs(), MESSAGE_REQ_QUORUM_GETQUORATE, qb_to_cs_error(), and res_lib_quorum_getquorate::quorate.
| cs_error_t quorum_initialize | ( | quorum_handle_t * | handle, |
| quorum_callbacks_t * | callbacks, | ||
| uint32_t * | quorum_type | ||
| ) |
Create a new quorum connection.
Definition at line 69 of file lib/quorum.c.
References quorum_inst::c, quorum_inst::callbacks, CS_OK, quorum_inst::finalize, hdb_error_to_cs(), IPC_REQUEST_SIZE, MESSAGE_REQ_QUORUM_GETTYPE, qb_to_cs_error(), and res_lib_quorum_gettype::quorum_type.
Referenced by sam_initialize().
| cs_error_t quorum_trackstart | ( | quorum_handle_t | handle, |
| unsigned int | flags | ||
| ) |
Track node and quorum changes.
Definition at line 271 of file lib/quorum.c.
References quorum_inst::c, CS_IPC_TIMEOUT_MS, CS_OK, flags, hdb_error_to_cs(), MESSAGE_REQ_QUORUM_TRACKSTART, qb_to_cs_error(), and req_lib_quorum_trackstart::track_flags.
Referenced by sam_initialize().
| cs_error_t quorum_trackstop | ( | quorum_handle_t | handle | ) |
Definition at line 312 of file lib/quorum.c.
References quorum_inst::c, CS_IPC_TIMEOUT_MS, CS_OK, hdb_error_to_cs(), MESSAGE_REQ_QUORUM_TRACKSTOP, and qb_to_cs_error().
1.8.11