corosync
2.4.5
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
exec
main.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2002-2006 MontaVista Software, Inc.
3
* Copyright (c) 2006-2012 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
42
#ifndef MAIN_H_DEFINED
43
#define MAIN_H_DEFINED
44
45
#define TRUE 1
46
#define FALSE 0
47
#include <
corosync/corotypes.h
>
48
#include <
corosync/hdb.h
>
49
#include <qb/qbloop.h>
50
#include <
corosync/totem/totempg.h
>
51
#include <
corosync/icmap.h
>
52
#include <
corosync/coroapi.h
>
53
54
extern
unsigned
long
long
*(*main_clm_get_by_nodeid) (
unsigned
int
node_id
);
55
56
extern
int
main_mcast
(
57
const
struct
iovec *iovec,
58
unsigned
int
iov_len,
59
unsigned
int
guarantee
);
60
61
extern
void
message_source_set
(
mar_message_source_t
*source,
void
*conn);
62
63
extern
int
message_source_is_local
(
const
mar_message_source_t
*source);
64
65
extern
void
corosync_shutdown_request
(
void
);
66
67
extern
void
corosync_state_dump
(
void
);
68
69
extern
qb_loop_t *
cs_poll_handle_get
(
void
);
70
71
extern
int
cs_poll_dispatch_add
(qb_loop_t *
handle
,
72
int
fd,
73
int
events,
74
void
*data,
75
76
int
(*dispatch_fn) (
int
fd,
77
int
revents,
78
void
*data));
79
80
extern
int
cs_poll_dispatch_delete
(
81
qb_loop_t * handle,
82
int
fd);
83
84
85
extern
int
corosync_sending_allowed
(
86
unsigned
int
service,
87
unsigned
int
id
,
88
const
void
*msg,
89
void
*sending_allowed_private_data);
90
91
extern
void
corosync_sending_allowed_release
(
void
*sending_allowed_private_data);
92
93
extern
void
corosync_recheck_the_q_level
(
void
*data);
94
95
extern
void
cs_ipcs_init
(
void
);
96
97
extern
const
char
*
cs_ipcs_service_init
(
struct
corosync_service_engine
*service);
98
99
extern
void
cs_ipcs_stats_update
(
void
);
100
101
extern
int32_t
cs_ipcs_service_destroy
(int32_t service_id);
102
103
extern
int32_t
cs_ipcs_q_level_get
(
void
);
104
105
extern
int
cs_ipcs_dispatch_send
(
void
*conn,
const
void
*msg,
size_t
mlen);
106
extern
int
cs_ipcs_dispatch_iov_send
(
void
*conn,
107
const
struct
iovec *iov,
108
unsigned
int
iov_len);
109
110
extern
int
cs_ipcs_response_send
(
void
*conn,
const
void
*msg,
size_t
mlen);
111
extern
int
cs_ipcs_response_iov_send
(
void
*conn,
112
const
struct
iovec *iov,
113
unsigned
int
iov_len);
114
115
extern
void
cs_ipcs_sync_state_changed
(int32_t sync_in_process);
116
117
extern
void
*
cs_ipcs_private_data_get
(
void
*conn);
118
119
extern
void
cs_ipc_refcnt_inc
(
void
*conn);
120
121
extern
void
cs_ipc_refcnt_dec
(
void
*conn);
122
123
extern
void
cs_ipc_allow_connections
(int32_t allow);
124
125
int
coroparse_configparse
(
icmap_map_t
config_map,
const
char
**error_string);
126
127
#endif
/* MAIN_H_DEFINED */
Generated on Sun Apr 5 2020 18:06:22 for corosync by
1.8.3.1