Cpg_corosync

## Data Structures

struct | cpg_address
| The cpg_address struct. More...
struct | cpg_name
| The cpg_name struct. More...
struct | cpg_iteration_description_t
| The cpg_iteration_description_t struct. More...
struct | cpg_ring_id
| The cpg_ring_id struct. More...
struct | cpg_callbacks_t
| The cpg_callbacks_t struct. More...
struct | cpg_model_data_t
| The cpg_model_data_t struct. More...
struct | cpg_model_v1_data_t
| The cpg_model_v1_data_t struct. More...

## Macros

#define | CPG_MAX_NAME_LENGTH 128
#define | CPG_MEMBERS_MAX 128
#define | CPG_MODEL_V1_DELIVER_INITIAL_TOTEM_CONF 0x01

## Typedefs

typedef uint64_t | cpg_handle_t
| cpg_handle_t More...
typedef uint64_t | cpg_iteration_handle_t
| cpg_iteration_handle_t More...
typedef void(* | cpg_deliver_fn_t) (cpg_handle_t handle, const struct cpg_name *group_name, uint32_t nodeid, uint32_t pid, void *msg, size_t msg_len)
| The cpg_deliver_fn_t callback. More...
typedef void(* | cpg_confchg_fn_t) (cpg_handle_t handle, const struct cpg_name *group_name, const struct cpg_address *member_list, size_t member_list_entries, const struct cpg_address *left_list, size_t left_list_entries, const struct cpg_address *joined_list, size_t joined_list_entries)
| The cpg_confchg_fn_t callback. More...
typedef void(* | cpg_totem_confchg_fn_t) (cpg_handle_t handle, struct cpg_ring_id ring_id, uint32_t member_list_entries, const uint32_t *member_list)
| The cpg_totem_confchg_fn_t callback. More...

## Enumerations

enum | cpg_guarantee_t { CPG_TYPE_UNORDERED , CPG_TYPE_FIFO , CPG_TYPE_AGREED , CPG_TYPE_SAFE }
| The cpg_guarantee_t enum. More...
enum | cpg_flow_control_state_t { CPG_FLOW_CONTROL_DISABLED , CPG_FLOW_CONTROL_ENABLED }
| The cpg_flow_control_state_t enum. More...
enum | cpg_reason_t { CPG_REASON_UNDEFINED = 0 , CPG_REASON_JOIN = 1 , CPG_REASON_LEAVE = 2 , CPG_REASON_NODEDOWN = 3 , CPG_REASON_NODEUP = 4 , CPG_REASON_PROCDOWN = 5 }
| The cpg_reason_t enum. More...
enum | cpg_iteration_type_t { CPG_ITERATION_NAME_ONLY = 1 , CPG_ITERATION_ONE_GROUP = 2 , CPG_ITERATION_ALL = 3 }
| The cpg_iteration_type_t enum. More...
enum | cpg_model_t { CPG_MODEL_V1 = 1 }
| The cpg_model_t enum. More...

## Detailed Description

## Macro Definition Documentation

## CPG_MAX_NAME_LENGTH

#define CPG_MAX_NAME_LENGTH 128

Definition at line 116 of file cpg.h.

## CPG_MEMBERS_MAX

#define CPG_MEMBERS_MAX 128

Definition at line 125 of file cpg.h.

## CPG_MODEL_V1_DELIVER_INITIAL_TOTEM_CONF

#define CPG_MODEL_V1_DELIVER_INITIAL_TOTEM_CONF 0x01

Definition at line 193 of file cpg.h.

## Typedef Documentation

## cpg_confchg_fn_t

typedef void(* cpg_confchg_fn_t) (cpg_handle_t handle, const struct cpg_name *group_name, const struct cpg_address *member_list, size_t member_list_entries, const struct cpg_address *left_list, size_t left_list_entries, const struct cpg_address *joined_list, size_t joined_list_entries)

The cpg_confchg_fn_t callback.

Definition at line 162 of file cpg.h.

## cpg_deliver_fn_t

typedef void(* cpg_deliver_fn_t) (cpg_handle_t handle, const struct cpg_name *group_name, uint32_t nodeid, uint32_t pid, void *msg, size_t msg_len)

The cpg_deliver_fn_t callback.

Parameters

  msg | Unlike many "msg" pointers, this one is deliberately *not* declared const in order to permit in-place endian conversion.

Definition at line 147 of file cpg.h.

## cpg_handle_t

typedef uint64_t cpg_handle_t

cpg_handle_t

Definition at line 53 of file cpg.h.

## cpg_iteration_handle_t

typedef uint64_t cpg_iteration_handle_t

cpg_iteration_handle_t

Definition at line 58 of file cpg.h.

## cpg_totem_confchg_fn_t

typedef void(* cpg_totem_confchg_fn_t) (cpg_handle_t handle, struct cpg_ring_id ring_id, uint32_t member_list_entries, const uint32_t *member_list)

The cpg_totem_confchg_fn_t callback.

Definition at line 172 of file cpg.h.

## Enumeration Type Documentation

## cpg_flow_control_state_t

enum cpg_flow_control_state_t

The cpg_flow_control_state_t enum.

Enumerator
CPG_FLOW_CONTROL_DISABLED | flow control is disabled - new messages may be sent
CPG_FLOW_CONTROL_ENABLED | flow control is enabled - new messages should not be sent

Definition at line 73 of file cpg.h.

## cpg_guarantee_t

enum cpg_guarantee_t

The cpg_guarantee_t enum.

Enumerator
CPG_TYPE_UNORDERED | not implemented
CPG_TYPE_FIFO | same as agreed
CPG_TYPE_AGREED |
CPG_TYPE_SAFE | not implemented

Definition at line 63 of file cpg.h.

## cpg_iteration_type_t

enum cpg_iteration_type_t

The cpg_iteration_type_t enum.

Enumerator
CPG_ITERATION_NAME_ONLY |
CPG_ITERATION_ONE_GROUP |
CPG_ITERATION_ALL |

Definition at line 94 of file cpg.h.

## cpg_model_t

enum cpg_model_t

The cpg_model_t enum.

Enumerator
CPG_MODEL_V1 |

Definition at line 103 of file cpg.h.

## cpg_reason_t

enum cpg_reason_t

The cpg_reason_t enum.

Enumerator
CPG_REASON_UNDEFINED |
CPG_REASON_JOIN |
CPG_REASON_LEAVE |
CPG_REASON_NODEDOWN |
CPG_REASON_NODEUP |
CPG_REASON_PROCDOWN |

Definition at line 82 of file cpg.h.