corosync  3.1.0
ipc_cfg.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005 MontaVista Software, Inc.
3  * Copyright (c) 2009-2013 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 #ifndef IPC_CFG_H_DEFINED
36 #define IPC_CFG_H_DEFINED
37 
38 #include <netinet/in.h>
39 #include <corosync/corotypes.h>
40 #include <corosync/mar_gen.h>
41 
42 #define CFG_INTERFACE_NAME_MAX_LEN 128
43 #define CFG_INTERFACE_STATUS_MAX_LEN 512
44 /*
45  * Too keep future ABI compatibility, this value
46  * is intentionaly bigger then INTERFACE_MAX
47  */
48 #define CFG_MAX_INTERFACES 16
49 
63 };
64 
85 };
86 
91  struct qb_ipc_request_header header __attribute__((aligned(8)));
92 };
93 
98  struct qb_ipc_response_header header __attribute__((aligned(8)));
99  mar_uint32_t interface_count __attribute__((aligned(8)));
100  char interface_name[CFG_MAX_INTERFACES][CFG_INTERFACE_NAME_MAX_LEN] __attribute__((aligned(8)));
101  char interface_status[CFG_MAX_INTERFACES][CFG_INTERFACE_STATUS_MAX_LEN] __attribute__((aligned(8)));
102 };
103 
108  struct qb_ipc_request_header header __attribute__((aligned(8)));
109 };
110 
115  struct qb_ipc_response_header header __attribute__((aligned(8)));
116 };
117 
122  struct qb_ipc_request_header header __attribute__((aligned(8)));
123  unsigned int nodeid __attribute__((aligned(8)));
124  cs_name_t reason __attribute__((aligned(8)));
125 };
126 
131  struct qb_ipc_response_header header __attribute__((aligned(8)));
132 };
133 
138  struct qb_ipc_request_header header __attribute__((aligned(8)));
139  unsigned int flags;
140 };
141 
146  struct qb_ipc_response_header header __attribute__((aligned(8)));
147 };
148 
153  struct qb_ipc_request_header header __attribute__((aligned(8)));
154  unsigned int response;
155 };
156 
161  struct qb_ipc_response_header header __attribute__((aligned(8)));
162 };
163 
168  struct qb_ipc_response_header header __attribute__((aligned(8)));
169  unsigned int flags;
170 };
171 
176  struct qb_ipc_request_header header __attribute__((aligned(8)));
177  unsigned int nodeid;
178 };
179 
184  struct qb_ipc_response_header header __attribute__((aligned(8)));
185  unsigned int family;
186  unsigned int num_addrs;
187  /* array of TOTEMIP_ADDRLEN items */
188  char addrs[];
189 };
190 
195  struct qb_ipc_request_header header __attribute__((aligned(8)));
196 };
197 
202  struct qb_ipc_response_header header __attribute__((aligned(8)));
203  mar_uint32_t local_nodeid __attribute__((aligned(8)));
204 };
205 
210  struct qb_ipc_request_header header __attribute__((aligned(8)));
211 };
212 
217  struct qb_ipc_response_header header __attribute__((aligned(8)));
218 };
219 
224  struct qb_ipc_request_header header __attribute__((aligned(8)));
225 };
226 
231  struct qb_ipc_response_header header __attribute__((aligned(8)));
232 };
233 
237 typedef enum {
243 
247 typedef enum {
252 
256 typedef enum {
261 
262 
263 #endif /* IPC_CFG_H_DEFINED */
req_lib_cfg_replytoshutdown
The req_lib_cfg_replytoshutdown struct.
Definition: ipc_cfg.h:152
res_lib_cfg_tryshutdown
The res_lib_cfg_tryshutdown struct.
Definition: ipc_cfg.h:145
AIS_AMF_ADMINISTRATIVETARGET_SERVICEUNIT
@ AIS_AMF_ADMINISTRATIVETARGET_SERVICEUNIT
Definition: ipc_cfg.h:238
res_lib_cfg_ringstatusget::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
MESSAGE_RES_CFG_KILLNODE
@ MESSAGE_RES_CFG_KILLNODE
Definition: ipc_cfg.h:77
AIS_AMF_ADMINISTRATIVESTATE_UNLOCKED
@ AIS_AMF_ADMINISTRATIVESTATE_UNLOCKED
Definition: ipc_cfg.h:248
MESSAGE_REQ_CFG_REPLYTOSHUTDOWN
@ MESSAGE_REQ_CFG_REPLYTOSHUTDOWN
Definition: ipc_cfg.h:58
MESSAGE_RES_CFG_GET_NODE_ADDRS
@ MESSAGE_RES_CFG_GET_NODE_ADDRS
Definition: ipc_cfg.h:80
req_lib_cfg_ringstatusget::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
MESSAGE_RES_CFG_RINGSTATUSGET
@ MESSAGE_RES_CFG_RINGSTATUSGET
Definition: ipc_cfg.h:69
req_lib_cfg_replytoshutdown::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
AIS_AMF_ADMINISTRATIVETARGET_COMPONENTSERVICEINSTANCE
@ AIS_AMF_ADMINISTRATIVETARGET_COMPONENTSERVICEINSTANCE
Definition: ipc_cfg.h:240
req_lib_cfg_reopen_log_files::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
MESSAGE_RES_CFG_RINGREENABLE
@ MESSAGE_RES_CFG_RINGREENABLE
Definition: ipc_cfg.h:70
MESSAGE_RES_CFG_STATETRACKSTART
@ MESSAGE_RES_CFG_STATETRACKSTART
Definition: ipc_cfg.h:71
cs_name_t
The cs_name_t struct.
Definition: corotypes.h:65
res_lib_cfg_get_node_addrs::num_addrs
unsigned int num_addrs
Definition: ipc_cfg.h:186
res_lib_cfg_ringreenable::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
mar_uint32_t
uint32_t mar_uint32_t
Definition: mar_gen.h:53
MESSAGE_RES_CFG_REPLYTOSHUTDOWN
@ MESSAGE_RES_CFG_REPLYTOSHUTDOWN
Definition: ipc_cfg.h:82
CFG_INTERFACE_NAME_MAX_LEN
#define CFG_INTERFACE_NAME_MAX_LEN
Definition: ipc_cfg.h:42
res_lib_cfg_get_node_addrs::family
unsigned int family
Definition: ipc_cfg.h:185
res_lib_cfg_reload_config::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
res_lib_cfg_replytoshutdown::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
res_lib_cfg_get_node_addrs::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
res_lib_cfg_killnode
The res_lib_cfg_killnode struct.
Definition: ipc_cfg.h:130
req_lib_cfg_local_get::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
MESSAGE_RES_CFG_STATETRACKSTOP
@ MESSAGE_RES_CFG_STATETRACKSTOP
Definition: ipc_cfg.h:72
MESSAGE_RES_CFG_TRYSHUTDOWN
@ MESSAGE_RES_CFG_TRYSHUTDOWN
Definition: ipc_cfg.h:78
res_lib_cfg_ringstatusget::__attribute__
mar_uint32_t interface_count __attribute__((aligned(8)))
header
struct totem_message_header header
Definition: totemsrp.c:0
req_lib_cfg_replytoshutdown::response
unsigned int response
Definition: ipc_cfg.h:154
res_lib_cfg_testshutdown::flags
unsigned int flags
Definition: ipc_cfg.h:169
corosync_administrative_target_t
corosync_administrative_target_t
corosync_administrative_target_t enum
Definition: ipc_cfg.h:237
req_lib_cfg_types
req_lib_cfg_types
The req_lib_cfg_types enum.
Definition: ipc_cfg.h:53
AIS_AMF_ADMINISTRATIVESTATE_LOCKED
@ AIS_AMF_ADMINISTRATIVESTATE_LOCKED
Definition: ipc_cfg.h:249
mar_gen.h
MESSAGE_RES_CFG_RELOAD_CONFIG
@ MESSAGE_RES_CFG_RELOAD_CONFIG
Definition: ipc_cfg.h:83
req_lib_cfg_reload_config::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
res_lib_cfg_reload_config
The res_lib_cfg_reload_config struct.
Definition: ipc_cfg.h:216
req_lib_cfg_get_node_addrs::nodeid
unsigned int nodeid
Definition: ipc_cfg.h:177
MESSAGE_RES_CFG_TESTSHUTDOWN
@ MESSAGE_RES_CFG_TESTSHUTDOWN
Definition: ipc_cfg.h:79
res_lib_cfg_local_get::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
req_lib_cfg_ringreenable
The req_lib_cfg_ringreenable struct.
Definition: ipc_cfg.h:107
res_lib_cfg_replytoshutdown
The res_lib_cfg_replytoshutdown struct.
Definition: ipc_cfg.h:160
res_lib_cfg_get_node_addrs
The res_lib_cfg_get_node_addrs struct.
Definition: ipc_cfg.h:183
MESSAGE_REQ_CFG_REOPEN_LOG_FILES
@ MESSAGE_REQ_CFG_REOPEN_LOG_FILES
Definition: ipc_cfg.h:62
req_lib_cfg_local_get
The req_lib_cfg_local_get struct.
Definition: ipc_cfg.h:194
res_lib_cfg_testshutdown
The res_lib_cfg_testshutdown struct.
Definition: ipc_cfg.h:167
req_lib_cfg_killnode::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
MESSAGE_REQ_CFG_RINGREENABLE
@ MESSAGE_REQ_CFG_RINGREENABLE
Definition: ipc_cfg.h:55
req_lib_cfg_tryshutdown::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
req_lib_cfg_get_node_addrs
The req_lib_cfg_get_node_addrs struct.
Definition: ipc_cfg.h:175
CFG_SHUTDOWN_FLAG_IMMEDIATE
@ CFG_SHUTDOWN_FLAG_IMMEDIATE
Definition: ipc_cfg.h:259
CFG_SHUTDOWN_FLAG_REQUEST
@ CFG_SHUTDOWN_FLAG_REQUEST
Definition: ipc_cfg.h:257
req_lib_cfg_killnode::__attribute__
unsigned int nodeid __attribute__((aligned(8)))
req_lib_cfg_ringstatusget
The req_lib_cfg_ringstatusget struct.
Definition: ipc_cfg.h:90
req_lib_cfg_tryshutdown::flags
unsigned int flags
Definition: ipc_cfg.h:139
AIS_AMF_ADMINISTRATIVETARGET_SERVICEGROUP
@ AIS_AMF_ADMINISTRATIVETARGET_SERVICEGROUP
Definition: ipc_cfg.h:239
MESSAGE_RES_CFG_SERVICEUNLOAD
@ MESSAGE_RES_CFG_SERVICEUNLOAD
Definition: ipc_cfg.h:76
req_lib_cfg_ringreenable::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
MESSAGE_REQ_CFG_TRYSHUTDOWN
@ MESSAGE_REQ_CFG_TRYSHUTDOWN
Definition: ipc_cfg.h:57
res_lib_cfg_testshutdown::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
MESSAGE_RES_CFG_SERVICELOAD
@ MESSAGE_RES_CFG_SERVICELOAD
Definition: ipc_cfg.h:75
corosync_administrative_state_t
corosync_administrative_state_t
corosync_administrative_state_t enum
Definition: ipc_cfg.h:247
res_lib_cfg_ringstatusget::__attribute__
char interface_name[CFG_MAX_INTERFACES][CFG_INTERFACE_NAME_MAX_LEN] __attribute__((aligned(8)))
AIS_AMF_ADMINISTRATIVESTATE_STOPPING
@ AIS_AMF_ADMINISTRATIVESTATE_STOPPING
Definition: ipc_cfg.h:250
MESSAGE_REQ_CFG_GET_NODE_ADDRS
@ MESSAGE_REQ_CFG_GET_NODE_ADDRS
Definition: ipc_cfg.h:59
AIS_AMF_ADMINISTRATIVETARGET_NODE
@ AIS_AMF_ADMINISTRATIVETARGET_NODE
Definition: ipc_cfg.h:241
res_lib_cfg_ringstatusget
The res_lib_cfg_ringstatusget struct.
Definition: ipc_cfg.h:97
req_lib_cfg_get_node_addrs::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
MESSAGE_REQ_CFG_RINGSTATUSGET
@ MESSAGE_REQ_CFG_RINGSTATUSGET
Definition: ipc_cfg.h:54
CFG_SHUTDOWN_FLAG_REGARDLESS
@ CFG_SHUTDOWN_FLAG_REGARDLESS
Definition: ipc_cfg.h:258
nodeid
unsigned int nodeid
Definition: coroapi.h:0
res_lib_cfg_types
res_lib_cfg_types
The res_lib_cfg_types enum.
Definition: ipc_cfg.h:68
corosync_shutdown_flags_t
corosync_shutdown_flags_t
corosync_shutdown_flags_t enum
Definition: ipc_cfg.h:256
req_lib_cfg_reopen_log_files
The req_lib_cfg_reopen_log_files struct.
Definition: ipc_cfg.h:223
CFG_INTERFACE_STATUS_MAX_LEN
#define CFG_INTERFACE_STATUS_MAX_LEN
Definition: ipc_cfg.h:43
res_lib_cfg_ringreenable
The res_lib_cfg_ringreenable struct.
Definition: ipc_cfg.h:114
MESSAGE_RES_CFG_ADMINISTRATIVESTATESET
@ MESSAGE_RES_CFG_ADMINISTRATIVESTATESET
Definition: ipc_cfg.h:73
res_lib_cfg_reopen_log_files::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
MESSAGE_REQ_CFG_LOCAL_GET
@ MESSAGE_REQ_CFG_LOCAL_GET
Definition: ipc_cfg.h:60
corotypes.h
res_lib_cfg_get_node_addrs::addrs
char addrs[]
Definition: ipc_cfg.h:188
MESSAGE_RES_CFG_LOCAL_GET
@ MESSAGE_RES_CFG_LOCAL_GET
Definition: ipc_cfg.h:81
req_lib_cfg_killnode
The req_lib_cfg_killnode struct.
Definition: ipc_cfg.h:121
res_lib_cfg_killnode::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
res_lib_cfg_reopen_log_files
The res_lib_cfg_reopen_log_files struct.
Definition: ipc_cfg.h:230
req_lib_cfg_tryshutdown
The req_lib_cfg_tryshutdown struct.
Definition: ipc_cfg.h:137
res_lib_cfg_local_get
The res_lib_cfg_local_get struct.
Definition: ipc_cfg.h:201
res_lib_cfg_tryshutdown::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
MESSAGE_RES_CFG_REOPEN_LOG_FILES
@ MESSAGE_RES_CFG_REOPEN_LOG_FILES
Definition: ipc_cfg.h:84
req_lib_cfg_reload_config
The req_lib_cfg_reload_config struct.
Definition: ipc_cfg.h:209
MESSAGE_REQ_CFG_KILLNODE
@ MESSAGE_REQ_CFG_KILLNODE
Definition: ipc_cfg.h:56
MESSAGE_RES_CFG_ADMINISTRATIVESTATEGET
@ MESSAGE_RES_CFG_ADMINISTRATIVESTATEGET
Definition: ipc_cfg.h:74
CFG_MAX_INTERFACES
#define CFG_MAX_INTERFACES
Definition: ipc_cfg.h:48
MESSAGE_REQ_CFG_RELOAD_CONFIG
@ MESSAGE_REQ_CFG_RELOAD_CONFIG
Definition: ipc_cfg.h:61