coroapi.h
Go to the documentation of this file.
/*
* Copyright (c) 2008-2012 Red Hat, Inc.
*
* All rights reserved.
*
* Author: Steven Dake (sdake@redhat.com)
*
* This software licensed under BSD license, the text of which follows:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither the name of the MontaVista Software, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef COROAPI_H_DEFINED
#define COROAPI_H_DEFINED
#include <config.h>
#include <stdio.h>
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#include <corosync/hdb.h>
#include <qb/qbloop.h>
#include <corosync/swab.h>
typedef struct {
uint32_t nodeid __attribute__((aligned(8)));
void *conn __attribute__((aligned(8)));
} mar_message_source_t __attribute__((aligned(8)));
static inline void swab_mar_message_source_t (mar_message_source_t *to_swab)
{
swab32 (to_swab->nodeid);
/*
* if it is from a byteswapped machine, then we can safely
* ignore its conn info data structure since this is only
* local to the machine
*/
to_swab->conn = NULL;
}
#ifndef TIMER_HANDLE_T
typedef qb_loop_timer_handle corosync_timer_handle_t;
#define TIMER_HANDLE_T 1
#endif
struct corosync_tpg_group {
const void *group;
size_t group_len;
};
#define TOTEMIP_ADDRLEN (sizeof(struct in6_addr))
#define INTERFACE_MAX 8
#ifndef MESSAGE_QUEUE_MAX
#ifdef HAVE_SMALL_MEMORY_FOOTPRINT
#define PROCESSOR_COUNT_MAX 16
#define MESSAGE_SIZE_MAX 1024*64
#define MESSAGE_QUEUE_MAX 512
#else
#define PROCESSOR_COUNT_MAX 384
#define MESSAGE_SIZE_MAX 1024*1024
#define MESSAGE_QUEUE_MAX ((4 * MESSAGE_SIZE_MAX) / totem_config->net_mtu)
#endif /* HAVE_SMALL_MEMORY_FOOTPRINT */
#endif /* MESSAGE_QUEUE_MAX */
#define TOTEM_AGREED 0
#define TOTEM_SAFE 1
#define MILLI_2_NANO_SECONDS 1000000ULL
#if !defined(TOTEM_IP_ADDRESS)
struct totem_ip_address {
unsigned int nodeid;
unsigned short family;
unsigned char addr[TOTEMIP_ADDRLEN];
} __attribute__((packed));
#endif
#if !defined(MEMB_RING_ID)
struct memb_ring_id {
unsigned int nodeid;
unsigned long long seq;
} __attribute__((packed));
#endif
#if !defined(TOTEM_CONFIGURATION_TYPE)
enum totem_configuration_type {
TOTEM_CONFIGURATION_REGULAR,
TOTEM_CONFIGURATION_TRANSITIONAL
};
#endif
#if !defined(TOTEM_CALLBACK_TOKEN_TYPE)
enum totem_callback_token_type {
TOTEM_CALLBACK_TOKEN_RECEIVED = 1,
TOTEM_CALLBACK_TOKEN_SENT = 2
};
#endif
enum cs_lib_flow_control {
CS_LIB_FLOW_CONTROL_REQUIRED = 1,
CS_LIB_FLOW_CONTROL_NOT_REQUIRED = 2
};
#define corosync_lib_flow_control cs_lib_flow_control
#define COROSYNC_LIB_FLOW_CONTROL_REQUIRED CS_LIB_FLOW_CONTROL_REQUIRED
#define COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED CS_LIB_FLOW_CONTROL_NOT_REQUIRED
enum cs_lib_allow_inquorate {
CS_LIB_DISALLOW_INQUORATE = 0, /* default */
CS_LIB_ALLOW_INQUORATE = 1
};
#if !defined (COROSYNC_FLOW_CONTROL_STATE)
enum cs_flow_control_state {
CS_FLOW_CONTROL_STATE_DISABLED,
CS_FLOW_CONTROL_STATE_ENABLED
};
#define corosync_flow_control_state cs_flow_control_state
#define CS_FLOW_CONTROL_STATE_DISABLED CS_FLOW_CONTROL_STATE_DISABLED
#define CS_FLOW_CONTROL_STATE_ENABLED CS_FLOW_CONTROL_STATE_ENABLED
#endif /* COROSYNC_FLOW_CONTROL_STATE */
typedef enum {
COROSYNC_FATAL_ERROR_EXIT = -1,
COROSYNC_LIBAIS_SOCKET = -6,
COROSYNC_LIBAIS_BIND = -7,
COROSYNC_READKEY = -8,
COROSYNC_INVALID_CONFIG = -9,
COROSYNC_DYNAMICLOAD = -12,
COROSYNC_OUT_OF_MEMORY = -15,
COROSYNC_FATAL_ERR = -16
} cs_fatal_error_t;
#define corosync_fatal_error_t cs_fatal_error_t;
#ifndef QUORUM_H_DEFINED
typedef void (*quorum_callback_fn_t) (int quorate, void *context);
struct quorum_callin_functions {
int (*quorate) (void);
int (*register_callback) (quorum_callback_fn_t callback_fn, void *contexxt);
int (*unregister_callback) (quorum_callback_fn_t callback_fn, void *context);
};
typedef void (*sync_callback_fn_t) (
const unsigned int *view_list,
size_t view_list_entries,
int primary_designated,
struct memb_ring_id *ring_id);
#endif /* QUORUM_H_DEFINED */
struct corosync_api_v1 {
/*
* Time and timer APIs
*/
int (*timer_add_duration) (
unsigned long long nanoseconds_in_future,
void *data,
void (*timer_nf) (void *data),
corosync_timer_handle_t *handle);
int (*timer_add_absolute) (
unsigned long long nanoseconds_from_epoch,
void *data,
void (*timer_fn) (void *data),
corosync_timer_handle_t *handle);
void (*timer_delete) (
corosync_timer_handle_t timer_handle);
unsigned long long (*timer_time_get) (void);
unsigned long long (*timer_expire_time_get) (
corosync_timer_handle_t timer_handle);
/*
* IPC APIs
*/
void (*ipc_source_set) (mar_message_source_t *source, void *conn);
int (*ipc_source_is_local) (const mar_message_source_t *source);
void *(*ipc_private_data_get) (void *conn);
int (*ipc_response_send) (void *conn, const void *msg, size_t mlen);
int (*ipc_response_iov_send) (void *conn,
const struct iovec *iov, unsigned int iov_len);
int (*ipc_dispatch_send) (void *conn, const void *msg, size_t mlen);
int (*ipc_dispatch_iov_send) (void *conn,
const struct iovec *iov, unsigned int iov_len);
void (*ipc_refcnt_inc) (void *conn);
void (*ipc_refcnt_dec) (void *conn);
/*
* Totem APIs
*/
unsigned int (*totem_nodeid_get) (void);
int (*totem_family_get) (void);
int (*totem_mcast) (const struct iovec *iovec,
unsigned int iov_len, unsigned int guarantee);
int (*totem_ifaces_get) (
unsigned int nodeid,
unsigned int *interface_ids,
struct totem_ip_address *interfaces,
unsigned int interfaces_size,
char ***status,
unsigned int *iface_count);
const char *(*totem_ifaces_print) (unsigned int nodeid);
const char *(*totem_ip_print) (const struct totem_ip_address *addr);
int (*totem_crypto_set) (const char *cipher_type, const char *hash_type);
int (*totem_callback_token_create) (
void **handle_out,
enum totem_callback_token_type type,
int delete,
int (*callback_fn) (enum totem_callback_token_type type,
const void *),
const void *data);
/*
* Totem open process groups API for those service engines
* wanting their own groups
*/
int (*tpg_init) (
void **instance,
void (*deliver_fn) (
unsigned int nodeid,
const void *msg,
unsigned int msg_len,
int endian_conversion_required),
void (*confchg_fn) (
enum totem_configuration_type configuration_type,
const unsigned int *member_list,
size_t member_list_entries,
const unsigned int *left_list,
size_t left_list_entries,
const unsigned int *joined_list,
size_t joined_list_entries,
const struct memb_ring_id *ring_id));
int (*tpg_exit) (
void *instance);
int (*tpg_join) (
void *instance,
const struct corosync_tpg_group *groups,
size_t group_cnt);
int (*tpg_leave) (
void *instance,
const struct corosync_tpg_group *groups,
size_t group_cnt);
int (*tpg_joined_mcast) (
void *totempg_groups_instance,
const struct iovec *iovec,
unsigned int iov_len,
int guarantee);
int (*tpg_joined_reserve) (
void *totempg_groups_instance,
const struct iovec *iovec,
unsigned int iov_len);
int (*tpg_joined_release) (
int reserved_msgs);
int (*tpg_groups_mcast) (
void *instance,
int guarantee,
const struct corosync_tpg_group *groups,
size_t groups_cnt,
const struct iovec *iovec,
unsigned int iov_len);
int (*tpg_groups_reserve) (
void *instance,
const struct corosync_tpg_group *groups,
size_t groups_cnt,
const struct iovec *iovec,
unsigned int iov_len);
int (*tpg_groups_release) (
int reserved_msgs);
int (*schedwrk_create) (
hdb_handle_t *handle,
int (schedwrk_fn) (const void *),
const void *context);
void (*schedwrk_destroy) (hdb_handle_t handle);
int (*sync_request) (
const char *service_name);
/*
* User plugin-callable functions for quorum
*/
int (*quorum_is_quorate) (void);
int (*quorum_register_callback) (quorum_callback_fn_t callback_fn, void *context);
int (*quorum_unregister_callback) (quorum_callback_fn_t callback_fn, void *context);
/*
* This one is for the quorum management plugin's use
*/
int (*quorum_initialize)(struct quorum_callin_functions *fns);
/*
* Plugin loading and unloading
*/
int (*plugin_interface_reference) (
hdb_handle_t *handle,
const char *iface_name,
int version,
void **interface,
void *context);
int (*plugin_interface_release) (hdb_handle_t handle);
/*
* Service loading and unloading APIs
*/
unsigned int (*service_link_and_init) (
struct corosync_api_v1 *corosync_api_v1,
const char *service_name,
unsigned int service_ver);
unsigned int (*service_unlink_and_exit) (
struct corosync_api_v1 *corosync_api_v1,
const char *service_name,
unsigned int service_ver);
/*
* Error handling APIs
*/
void (*error_memory_failure) (void) __attribute__ ((noreturn));
#define corosync_fatal_error(err) api->fatal_error ((err), __FILE__, __LINE__)
void (*fatal_error) (cs_fatal_error_t err,
const char *file,
unsigned int line) __attribute__ ((noreturn));
void (*shutdown_request) (void);
void (*state_dump) (void);
qb_loop_t *(*poll_handle_get) (void);
void *(*totem_get_stats)(void);
int (*schedwrk_create_nolock) (
hdb_handle_t *handle,
int (schedwrk_fn) (const void *),
const void *context);
int (*poll_dispatch_add) (qb_loop_t * handle,
int fd,
int events,
void *data,
int (*dispatch_fn) (int fd,
int revents,
void *data));
int (*poll_dispatch_delete) (
qb_loop_t * handle,
int fd);
};
#define SERVICE_ID_MAKE(a,b) ( ((a)<<16) | (b) )
#define SERVICE_HANDLER_MAXIMUM_COUNT 64
#define SERVICES_COUNT_MAX 64
struct corosync_lib_handler {
void (*lib_handler_fn) (void *conn, const void *msg);
enum cs_lib_flow_control flow_control;
};
struct corosync_exec_handler {
void (*exec_handler_fn) (const void *msg, unsigned int nodeid);
void (*exec_endian_convert_fn) (void *msg);
};
struct corosync_service_engine_iface_ver0 {
struct corosync_service_engine *(*corosync_get_service_engine_ver0) (void);
};
struct corosync_service_engine {
const char *name;
unsigned short id;
unsigned short priority; /* Lower priority are loaded first, unloaded last.
* 0 is a special case which always loaded _and_ unloaded last
*/
size_t private_data_size;
enum cs_lib_flow_control flow_control;
enum cs_lib_allow_inquorate allow_inquorate;
char *(*exec_init_fn) (struct corosync_api_v1 *);
int (*exec_exit_fn) (void);
void (*exec_dump_fn) (void);
int (*lib_init_fn) (void *conn);
int (*lib_exit_fn) (void *conn);
struct corosync_lib_handler *lib_engine;
int lib_engine_count;
struct corosync_exec_handler *exec_engine;
int exec_engine_count;
int (*config_init_fn) (struct corosync_api_v1 *);
void (*confchg_fn) (
enum totem_configuration_type configuration_type,
const unsigned int *member_list, size_t member_list_entries,
const unsigned int *left_list, size_t left_list_entries,
const unsigned int *joined_list, size_t joined_list_entries,
const struct memb_ring_id *ring_id);
void (*sync_init) (
const unsigned int *trans_list,
size_t trans_list_entries,
const unsigned int *member_list,
size_t member_list_entries,
const struct memb_ring_id *ring_id);
int (*sync_process) (void);
void (*sync_activate) (void);
void (*sync_abort) (void);
};
#endif /* COROAPI_H_DEFINED */
config.h
totem_configuration_type
totem_configuration_type
The totem_configuration_type enum.
Definition: coroapi.h:132
TOTEM_CONFIGURATION_REGULAR
@ TOTEM_CONFIGURATION_REGULAR
Definition: coroapi.h:133
TOTEM_CONFIGURATION_TRANSITIONAL
@ TOTEM_CONFIGURATION_TRANSITIONAL
Definition: coroapi.h:134
CS_FLOW_CONTROL_STATE_ENABLED
#define CS_FLOW_CONTROL_STATE_ENABLED
Definition: coroapi.h:177
cs_lib_allow_inquorate
cs_lib_allow_inquorate
The cs_lib_allow_inquorate enum.
Definition: coroapi.h:162
CS_LIB_DISALLOW_INQUORATE
@ CS_LIB_DISALLOW_INQUORATE
Definition: coroapi.h:163
CS_LIB_ALLOW_INQUORATE
@ CS_LIB_ALLOW_INQUORATE
Definition: coroapi.h:164
corosync_timer_handle_t
qb_loop_timer_handle corosync_timer_handle_t
corosync_timer_handle_t
Definition: coroapi.h:74
nodeid
unsigned int nodeid
Definition: coroapi.h:0
__attribute__
enum totem_configuration_type __attribute__
addr
unsigned char addr[TOTEMIP_ADDRLEN]
Definition: coroapi.h:2
quorum_callback_fn_t
void(* quorum_callback_fn_t)(int quorate, void *context)
The quorum_callback_fn_t callback.
Definition: coroapi.h:199
totem_callback_token_type
totem_callback_token_type
The totem_callback_token_type enum.
Definition: coroapi.h:142
TOTEM_CALLBACK_TOKEN_SENT
@ TOTEM_CALLBACK_TOKEN_SENT
Definition: coroapi.h:144
TOTEM_CALLBACK_TOKEN_RECEIVED
@ TOTEM_CALLBACK_TOKEN_RECEIVED
Definition: coroapi.h:143
cs_lib_flow_control
cs_lib_flow_control
The cs_lib_flow_control enum.
Definition: coroapi.h:151
CS_LIB_FLOW_CONTROL_REQUIRED
@ CS_LIB_FLOW_CONTROL_REQUIRED
Definition: coroapi.h:152
CS_LIB_FLOW_CONTROL_NOT_REQUIRED
@ CS_LIB_FLOW_CONTROL_NOT_REQUIRED
Definition: coroapi.h:153
sync_callback_fn_t
void(* sync_callback_fn_t)(const unsigned int *view_list, size_t view_list_entries, int primary_designated, struct memb_ring_id *ring_id)
The sync_callback_fn_t callback.
Definition: coroapi.h:213
cs_fatal_error_t
cs_fatal_error_t
The cs_fatal_error_t enum.
Definition: coroapi.h:183
COROSYNC_DYNAMICLOAD
@ COROSYNC_DYNAMICLOAD
Definition: coroapi.h:189
COROSYNC_OUT_OF_MEMORY
@ COROSYNC_OUT_OF_MEMORY
Definition: coroapi.h:190
COROSYNC_READKEY
@ COROSYNC_READKEY
Definition: coroapi.h:187
COROSYNC_INVALID_CONFIG
@ COROSYNC_INVALID_CONFIG
Definition: coroapi.h:188
COROSYNC_LIBAIS_SOCKET
@ COROSYNC_LIBAIS_SOCKET
Definition: coroapi.h:185
COROSYNC_FATAL_ERR
@ COROSYNC_FATAL_ERR
Definition: coroapi.h:191
COROSYNC_LIBAIS_BIND
@ COROSYNC_LIBAIS_BIND
Definition: coroapi.h:186
COROSYNC_FATAL_ERROR_EXIT
@ COROSYNC_FATAL_ERROR_EXIT
Definition: coroapi.h:184
cs_flow_control_state
cs_flow_control_state
The cs_flow_control_state enum.
Definition: coroapi.h:171
CS_FLOW_CONTROL_STATE_DISABLED
#define CS_FLOW_CONTROL_STATE_DISABLED
Definition: coroapi.h:176
TOTEMIP_ADDRLEN
#define TOTEMIP_ADDRLEN
Definition: coroapi.h:86
hdb.h
hdb_handle_t
qb_handle_t hdb_handle_t
Definition: hdb.h:52
quorate
uint32_t quorate
Definition: sam.c:134
corosync_api_v1
The corosync_api_v1 struct.
Definition: coroapi.h:225
corosync_api_v1::timer_add_duration
int(* timer_add_duration)(unsigned long long nanoseconds_in_future, void *data, void(*timer_nf)(void *data), corosync_timer_handle_t *handle)
Definition: coroapi.h:229
corosync_api_v1::totem_crypto_set
int(* totem_crypto_set)(const char *cipher_type, const char *hash_type)
Definition: coroapi.h:294
corosync_api_v1::timer_time_get
unsigned long long(* timer_time_get)(void)
Definition: coroapi.h:244
corosync_api_v1::tpg_groups_mcast
int(* tpg_groups_mcast)(void *instance, int guarantee, const struct corosync_tpg_group *groups, size_t groups_cnt, const struct iovec *iovec, unsigned int iov_len)
Definition: coroapi.h:354
corosync_api_v1::totem_mcast
int(* totem_mcast)(const struct iovec *iovec, unsigned int iov_len, unsigned int guarantee)
Definition: coroapi.h:279
corosync_api_v1::poll_dispatch_delete
int(* poll_dispatch_delete)(qb_loop_t *handle, int fd)
Definition: coroapi.h:452
corosync_api_v1::quorum_initialize
int(* quorum_initialize)(struct quorum_callin_functions *fns)
Definition: coroapi.h:392
corosync_api_v1::ipc_source_is_local
int(* ipc_source_is_local)(const mar_message_source_t *source)
Definition: coroapi.h:254
corosync_api_v1::plugin_interface_reference
int(* plugin_interface_reference)(hdb_handle_t *handle, const char *iface_name, int version, void **interface, void *context)
Definition: coroapi.h:397
corosync_api_v1::timer_delete
void(* timer_delete)(corosync_timer_handle_t timer_handle)
Definition: coroapi.h:241
corosync_api_v1::tpg_join
int(* tpg_join)(void *instance, const struct corosync_tpg_group *groups, size_t group_cnt)
Definition: coroapi.h:330
corosync_api_v1::tpg_joined_release
int(* tpg_joined_release)(int reserved_msgs)
Definition: coroapi.h:351
corosync_api_v1::totem_nodeid_get
unsigned int(* totem_nodeid_get)(void)
Definition: coroapi.h:275
corosync_api_v1::service_link_and_init
unsigned int(* service_link_and_init)(struct corosync_api_v1 *corosync_api_v1, const char *service_name, unsigned int service_ver)
Definition: coroapi.h:409
corosync_api_v1::tpg_groups_release
int(* tpg_groups_release)(int reserved_msgs)
Definition: coroapi.h:369
corosync_api_v1::fatal_error
void(* fatal_error)(cs_fatal_error_t err, const char *file, unsigned int line) __attribute__((noreturn))
Definition: coroapi.h:425
corosync_api_v1::tpg_leave
int(* tpg_leave)(void *instance, const struct corosync_tpg_group *groups, size_t group_cnt)
Definition: coroapi.h:335
corosync_api_v1::ipc_refcnt_dec
void(* ipc_refcnt_dec)(void *conn)
Definition: coroapi.h:270
corosync_api_v1::tpg_init
int(* tpg_init)(void **instance, void(*deliver_fn)(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required), void(*confchg_fn)(enum totem_configuration_type configuration_type, const unsigned int *member_list, size_t member_list_entries, const unsigned int *left_list, size_t left_list_entries, const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id))
Definition: coroapi.h:308
corosync_api_v1::schedwrk_destroy
void(* schedwrk_destroy)(hdb_handle_t handle)
Definition: coroapi.h:377
corosync_api_v1::ipc_response_iov_send
int(* ipc_response_iov_send)(void *conn, const struct iovec *iov, unsigned int iov_len)
Definition: coroapi.h:260
corosync_api_v1::ipc_source_set
void(* ipc_source_set)(mar_message_source_t *source, void *conn)
Definition: coroapi.h:252
corosync_api_v1::schedwrk_create_nolock
int(* schedwrk_create_nolock)(hdb_handle_t *handle, int(schedwrk_fn)(const void *), const void *context)
Definition: coroapi.h:437
corosync_api_v1::shutdown_request
void(* shutdown_request)(void)
Definition: coroapi.h:429
corosync_api_v1::totem_ifaces_get
int(* totem_ifaces_get)(unsigned int nodeid, unsigned int *interface_ids, struct totem_ip_address *interfaces, unsigned int interfaces_size, char ***status, unsigned int *iface_count)
Definition: coroapi.h:282
corosync_api_v1::plugin_interface_release
int(* plugin_interface_release)(hdb_handle_t handle)
Definition: coroapi.h:404
corosync_api_v1::quorum_register_callback
int(* quorum_register_callback)(quorum_callback_fn_t callback_fn, void *context)
Definition: coroapi.h:386
corosync_api_v1::ipc_refcnt_inc
void(* ipc_refcnt_inc)(void *conn)
Definition: coroapi.h:268
corosync_api_v1::tpg_exit
int(* tpg_exit)(void *instance)
Definition: coroapi.h:327
corosync_api_v1::ipc_dispatch_send
int(* ipc_dispatch_send)(void *conn, const void *msg, size_t mlen)
Definition: coroapi.h:263
corosync_api_v1::schedwrk_create
int(* schedwrk_create)(hdb_handle_t *handle, int(schedwrk_fn)(const void *), const void *context)
Definition: coroapi.h:372
corosync_api_v1::tpg_joined_reserve
int(* tpg_joined_reserve)(void *totempg_groups_instance, const struct iovec *iovec, unsigned int iov_len)
Definition: coroapi.h:346
corosync_api_v1::tpg_joined_mcast
int(* tpg_joined_mcast)(void *totempg_groups_instance, const struct iovec *iovec, unsigned int iov_len, int guarantee)
Definition: coroapi.h:340
corosync_api_v1::totem_family_get
int(* totem_family_get)(void)
Definition: coroapi.h:277
corosync_api_v1::sync_request
int(* sync_request)(const char *service_name)
Definition: coroapi.h:379
corosync_api_v1::poll_dispatch_add
int(* poll_dispatch_add)(qb_loop_t *handle, int fd, int events, void *data, int(*dispatch_fn)(int fd, int revents, void *data))
Definition: coroapi.h:442
corosync_api_v1::timer_expire_time_get
unsigned long long(* timer_expire_time_get)(corosync_timer_handle_t timer_handle)
Definition: coroapi.h:246
corosync_api_v1::ipc_response_send
int(* ipc_response_send)(void *conn, const void *msg, size_t mlen)
Definition: coroapi.h:258
corosync_api_v1::error_memory_failure
void(* error_memory_failure)(void) __attribute__((noreturn))
Definition: coroapi.h:422
corosync_api_v1::state_dump
void(* state_dump)(void)
Definition: coroapi.h:431
corosync_api_v1::ipc_dispatch_iov_send
int(* ipc_dispatch_iov_send)(void *conn, const struct iovec *iov, unsigned int iov_len)
Definition: coroapi.h:265
corosync_api_v1::tpg_groups_reserve
int(* tpg_groups_reserve)(void *instance, const struct corosync_tpg_group *groups, size_t groups_cnt, const struct iovec *iovec, unsigned int iov_len)
Definition: coroapi.h:362
corosync_api_v1::quorum_unregister_callback
int(* quorum_unregister_callback)(quorum_callback_fn_t callback_fn, void *context)
Definition: coroapi.h:387
corosync_api_v1::service_unlink_and_exit
unsigned int(* service_unlink_and_exit)(struct corosync_api_v1 *corosync_api_v1, const char *service_name, unsigned int service_ver)
Definition: coroapi.h:414
corosync_api_v1::quorum_is_quorate
int(* quorum_is_quorate)(void)
Definition: coroapi.h:385
corosync_api_v1::timer_add_absolute
int(* timer_add_absolute)(unsigned long long nanoseconds_from_epoch, void *data, void(*timer_fn)(void *data), corosync_timer_handle_t *handle)
Definition: coroapi.h:235
corosync_api_v1::totem_callback_token_create
int(* totem_callback_token_create)(void **handle_out, enum totem_callback_token_type type, int delete, int(*callback_fn)(enum totem_callback_token_type type, const void *), const void *data)
Definition: coroapi.h:296
corosync_exec_handler
The corosync_exec_handler struct.
Definition: coroapi.h:475
corosync_exec_handler::exec_handler_fn
void(* exec_handler_fn)(const void *msg, unsigned int nodeid)
Definition: coroapi.h:476
corosync_exec_handler::exec_endian_convert_fn
void(* exec_endian_convert_fn)(void *msg)
Definition: coroapi.h:477
corosync_lib_handler
The corosync_lib_handler struct.
Definition: coroapi.h:467
corosync_lib_handler::flow_control
enum cs_lib_flow_control flow_control
Definition: coroapi.h:469
corosync_lib_handler::lib_handler_fn
void(* lib_handler_fn)(void *conn, const void *msg)
Definition: coroapi.h:468
corosync_service_engine_iface_ver0
The corosync_service_engine_iface_ver0 struct.
Definition: coroapi.h:483
corosync_service_engine
The corosync_service_engine struct.
Definition: coroapi.h:490
corosync_service_engine::sync_init
void(* sync_init)(const unsigned int *trans_list, size_t trans_list_entries, const unsigned int *member_list, size_t member_list_entries, const struct memb_ring_id *ring_id)
Definition: coroapi.h:515
corosync_service_engine::id
unsigned short id
Definition: coroapi.h:492
corosync_service_engine::lib_exit_fn
int(* lib_exit_fn)(void *conn)
Definition: coroapi.h:503
corosync_service_engine::config_init_fn
int(* config_init_fn)(struct corosync_api_v1 *)
Definition: coroapi.h:508
corosync_service_engine::priority
unsigned short priority
Definition: coroapi.h:493
corosync_service_engine::name
const char * name
Definition: coroapi.h:491
corosync_service_engine::sync_activate
void(* sync_activate)(void)
Definition: coroapi.h:522
corosync_service_engine::private_data_size
size_t private_data_size
Definition: coroapi.h:496
corosync_service_engine::allow_inquorate
enum cs_lib_allow_inquorate allow_inquorate
Definition: coroapi.h:498
corosync_service_engine::lib_init_fn
int(* lib_init_fn)(void *conn)
Definition: coroapi.h:502
corosync_service_engine::confchg_fn
void(* confchg_fn)(enum totem_configuration_type configuration_type, const unsigned int *member_list, size_t member_list_entries, const unsigned int *left_list, size_t left_list_entries, const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id)
Definition: coroapi.h:509
corosync_service_engine::sync_abort
void(* sync_abort)(void)
Definition: coroapi.h:523
corosync_service_engine::flow_control
enum cs_lib_flow_control flow_control
Definition: coroapi.h:497
corosync_service_engine::exec_engine
struct corosync_exec_handler * exec_engine
Definition: coroapi.h:506
corosync_service_engine::exec_exit_fn
int(* exec_exit_fn)(void)
Definition: coroapi.h:500
corosync_service_engine::exec_dump_fn
void(* exec_dump_fn)(void)
Definition: coroapi.h:501
corosync_service_engine::lib_engine
struct corosync_lib_handler * lib_engine
Definition: coroapi.h:504
corosync_service_engine::lib_engine_count
int lib_engine_count
Definition: coroapi.h:505
corosync_service_engine::sync_process
int(* sync_process)(void)
Definition: coroapi.h:521
corosync_service_engine::exec_engine_count
int exec_engine_count
Definition: coroapi.h:507
corosync_tpg_group
The corosync_tpg_group struct.
Definition: coroapi.h:81
corosync_tpg_group::group_len
size_t group_len
Definition: coroapi.h:83
corosync_tpg_group::group
const void * group
Definition: coroapi.h:82
mar_message_source_t
The mar_message_source_t struct.
Definition: coroapi.h:50
mar_message_source_t::__attribute__
void *conn __attribute__((aligned(8)))
mar_message_source_t::__attribute__
uint32_t nodeid __attribute__((aligned(8)))
memb_ring_id
The memb_ring_id struct.
Definition: coroapi.h:122
memb_ring_id::seq
unsigned long long seq
Definition: coroapi.h:124
memb_ring_id::nodeid
unsigned int nodeid
Definition: coroapi.h:123
quorum_callin_functions
The quorum_callin_functions struct.
Definition: coroapi.h:204
quorum_callin_functions::quorate
int(* quorate)(void)
Definition: coroapi.h:205
quorum_callin_functions::unregister_callback
int(* unregister_callback)(quorum_callback_fn_t callback_fn, void *context)
Definition: coroapi.h:207
quorum_callin_functions::register_callback
int(* register_callback)(quorum_callback_fn_t callback_fn, void *contexxt)
Definition: coroapi.h:206
totem_ip_address
The totem_ip_address struct.
Definition: coroapi.h:111
totem_ip_address::nodeid
unsigned int nodeid
Definition: coroapi.h:112
totem_ip_address::addr
unsigned char addr[TOTEMIP_ADDRLEN]
Definition: coroapi.h:114
totem_ip_address::family
unsigned short family
Definition: coroapi.h:113
swab.h
swab32
#define swab32(x)
The swab32 macro.
Definition: swab.h:51
version
char version
Definition: totem.h:1
type
char type
Definition: totem.h:2
guarantee
int guarantee
Definition: totemsrp.c:6
ring_id
struct memb_ring_id ring_id
Definition: totemsrp.c:4