corosync
2.4.5
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
exec
totemrrp.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005 MontaVista Software, Inc.
3
* Copyright (c) 2006-2007, 2009 Red Hat, Inc.
4
*
5
* All rights reserved.
6
*
7
* Author: Steven Dake (sdake@redhat.com)
8
*
9
* This software licensed under BSD license, the text of which follows:
10
*
11
* Redistribution and use in source and binary forms, with or without
12
* modification, are permitted provided that the following conditions are met:
13
*
14
* - Redistributions of source code must retain the above copyright notice,
15
* this list of conditions and the following disclaimer.
16
* - Redistributions in binary form must reproduce the above copyright notice,
17
* this list of conditions and the following disclaimer in the documentation
18
* and/or other materials provided with the distribution.
19
* - Neither the name of the MontaVista Software, Inc. nor the names of its
20
* contributors may be used to endorse or promote products derived from this
21
* software without specific prior written permission.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33
* THE POSSIBILITY OF SUCH DAMAGE.
34
*/
35
43
#ifndef TOTEMRRP_H_DEFINED
44
#define TOTEMRRP_H_DEFINED
45
46
#include <sys/types.h>
47
#include <sys/socket.h>
48
#include <qb/qbloop.h>
49
#include <
corosync/totem/totem.h
>
50
51
#define TOTEMRRP_NOFLUSH 0
52
#define TOTEMRRP_FLUSH 1
53
54
/*
55
* SRP address. Used mainly in totemsrp.c, but we need it here to inform RRP about
56
* membership change.
57
*/
58
struct
srp_addr
{
59
uint8_t
no_addrs
;
60
struct
totem_ip_address
addr
[
INTERFACE_MAX
];
61
};
62
66
extern
int
totemrrp_initialize
(
67
qb_loop_t *poll_handle,
68
void
**rrp_context,
69
struct
totem_config
*
totem_config
,
70
totemsrp_stats_t
*stats,
71
void
*context,
72
73
void
(*deliver_fn) (
74
void
*context,
75
const
void
*msg,
76
unsigned
int
msg_len),
77
78
void
(*iface_change_fn) (
79
void
*context,
80
const
struct
totem_ip_address
*iface_addr,
81
unsigned
int
iface_no),
82
83
void
(*token_seqid_get) (
84
const
void
*msg,
85
unsigned
int
*seqid,
86
unsigned
int
*token_is),
87
88
unsigned
int
(*msgs_missing) (
void
),
89
90
void
(*target_set_completed) (
91
void
*context)
92
);
93
94
extern
void
*
totemrrp_buffer_alloc
(
95
void
*rrp_context);
96
97
extern
void
totemrrp_buffer_release
(
98
void
*rrp_context,
99
void
*ptr);
100
101
extern
int
totemrrp_processor_count_set
(
102
void
*rrp_context,
103
unsigned
int
processor_count);
104
105
extern
int
totemrrp_token_send
(
106
void
*rrp_context,
107
const
void
*msg,
108
unsigned
int
msg_len);
109
110
extern
int
totemrrp_mcast_noflush_send
(
111
void
*rrp_context,
112
const
void
*msg,
113
unsigned
int
msg_len);
114
115
extern
int
totemrrp_mcast_flush_send
(
116
void
*rrp_context,
117
const
void
*msg,
118
unsigned
int
msg_len);
119
120
extern
int
totemrrp_recv_flush
(
121
void
*rrp_context);
122
123
extern
int
totemrrp_send_flush
(
124
void
*rrp_context);
125
126
extern
int
totemrrp_token_target_set
(
127
void
*rrp_context,
128
struct
totem_ip_address
*target,
129
unsigned
int
iface_no);
130
131
extern
int
totemrrp_iface_check
(
void
*rrp_context);
132
133
extern
int
totemrrp_finalize
(
void
*rrp_context);
134
135
extern
int
totemrrp_ifaces_get
(
136
void
*rrp_context,
137
char
***status,
138
unsigned
int
*iface_count);
139
140
extern
int
totemrrp_crypto_set
(
141
void
*rrp_context,
142
const
char
*cipher_type,
143
const
char
*hash_type);
144
145
extern
int
totemrrp_ring_reenable
(
146
void
*rrp_context,
147
unsigned
int
iface_no);
148
149
extern
int
totemrrp_mcast_recv_empty
(
150
void
*rrp_context);
151
152
extern
int
totemrrp_member_add
(
153
void
*net_context,
154
const
struct
totem_ip_address
*member,
155
int
iface_no);
156
157
extern
int
totemrrp_member_remove
(
158
void
*net_context,
159
const
struct
totem_ip_address
*member,
160
int
iface_no);
161
162
extern
void
totemrrp_membership_changed
(
163
void
*rrp_context,
164
enum
totem_configuration_type
configuration_type,
165
const
struct
srp_addr
*member_list,
size_t
member_list_entries,
166
const
struct
srp_addr
*left_list,
size_t
left_list_entries,
167
const
struct
srp_addr
*joined_list,
size_t
joined_list_entries,
168
const
struct
memb_ring_id
*
ring_id
);
169
170
#endif
/* TOTEMRRP_H_DEFINED */
Generated on Sun Apr 5 2020 18:06:22 for corosync by
1.8.3.1