corosync  3.0.1
ipc_cmap.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2017 Red Hat, Inc.
3  *
4  * All rights reserved.
5  *
6  * Author: Jan Friesse (jfriesse@redhat.com)
7  *
8  * This software licensed under BSD license, the text of which follows:
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are met:
12  *
13  * - Redistributions of source code must retain the above copyright notice,
14  * this list of conditions and the following disclaimer.
15  * - Redistributions in binary form must reproduce the above copyright notice,
16  * this list of conditions and the following disclaimer in the documentation
17  * and/or other materials provided with the distribution.
18  * - Neither the name of the Red Hat, Inc. nor the names of its
19  * contributors may be used to endorse or promote products derived from this
20  * software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32  * THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 #ifndef IPC_CMAP_H_DEFINED
36 #define IPC_CMAP_H_DEFINED
37 
38 #include <netinet/in.h>
39 #include <corosync/corotypes.h>
40 #include <corosync/mar_gen.h>
41 
56 };
57 
73 };
74 
75 enum {
78 };
79 
84  struct qb_ipc_request_header header __attribute__((aligned(8)));
85  mar_name_t key_name __attribute__((aligned(8)));
86  mar_size_t value_len __attribute__((aligned(8)));
88  mar_uint8_t value[] __attribute__((aligned(8)));
89 };
90 
95  struct qb_ipc_response_header header __attribute__((aligned(8)));
96 };
97 
102  struct qb_ipc_request_header header __attribute__((aligned(8)));
103  mar_name_t key_name __attribute__((aligned(8)));
104 };
105 
110  struct qb_ipc_response_header header __attribute__((aligned(8)));
111 };
112 
117  struct qb_ipc_request_header header __attribute__((aligned(8)));
118  mar_name_t key_name __attribute__((aligned(8)));
119  mar_size_t value_len __attribute__((aligned(8)));
120 };
121 
126  struct qb_ipc_response_header header __attribute__((aligned(8)));
127  mar_size_t value_len __attribute__((aligned(8)));
129  mar_uint8_t value[] __attribute__((aligned(8)));
130 };
131 
136  struct qb_ipc_request_header header __attribute__((aligned(8)));
137  mar_name_t key_name __attribute__((aligned(8)));
138  mar_int32_t step __attribute__((aligned(8)));
139 };
140 
145  struct qb_ipc_response_header header __attribute__((aligned(8)));
146 };
147 
152  struct qb_ipc_request_header header __attribute__((aligned(8)));
153  mar_name_t prefix __attribute__((aligned(8)));
154 };
155 
160  struct qb_ipc_response_header header __attribute__((aligned(8)));
161  mar_uint64_t iter_handle __attribute__((aligned(8)));
162 };
163 
168  struct qb_ipc_request_header header __attribute__((aligned(8)));
169  mar_uint64_t iter_handle __attribute__((aligned(8)));
170 };
171 
176  struct qb_ipc_response_header header __attribute__((aligned(8)));
177  mar_name_t key_name __attribute__((aligned(8)));
178  mar_size_t value_len __attribute__((aligned(8)));
180 };
181 
186  struct qb_ipc_request_header header __attribute__((aligned(8)));
187  mar_uint64_t iter_handle __attribute__((aligned(8)));
188 };
189 
194  struct qb_ipc_response_header header __attribute__((aligned(8)));
195 };
196 
201  struct qb_ipc_request_header header __attribute__((aligned(8)));
202  mar_name_t key_name __attribute__((aligned(8)));
203  mar_int32_t track_type __attribute__((aligned(8)));
204  mar_uint64_t track_inst_handle __attribute__((aligned(8)));
205 };
206 
211  struct qb_ipc_response_header header __attribute__((aligned(8)));
212  mar_uint64_t track_handle __attribute__((aligned(8)));
213 };
214 
219  struct qb_ipc_request_header header __attribute__((aligned(8)));
220  mar_uint64_t track_handle __attribute__((aligned(8)));
221 };
222 
227  struct qb_ipc_response_header header __attribute__((aligned(8)));
228  mar_uint64_t track_inst_handle __attribute__((aligned(8)));
229 };
230 
235  struct qb_ipc_response_header header __attribute__((aligned(8)));
236  mar_uint64_t track_inst_handle __attribute__((aligned(8)));
237  mar_name_t key_name __attribute__((aligned(8)));
238  mar_int32_t event __attribute__((aligned(8)));
239  mar_uint8_t new_value_type __attribute__((aligned(8)));
240  mar_uint8_t old_value_type __attribute__((aligned(8)));
241  mar_size_t new_value_len __attribute__((aligned(8)));
242  mar_size_t old_value_len __attribute__((aligned(8)));
243  /*
244  * After old_vale_len, there are two items with length of new_value_len
245  * and old_value_len, only first (as a pointer) is defined
246  *
247  * mar_uint8_t *new_value;
248  * mar_uint8_t *old_value;
249  */
251 };
252 
258  struct qb_ipc_request_header header __attribute__((aligned(8)));
259  mar_int32_t map __attribute__((aligned(8)));
260 };
261 
262 
263 #endif /* IPC_CMAP_H_DEFINED */
req_lib_cmap_track_add::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
req_lib_cmap_iter_next::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
res_lib_cmap_get::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
res_lib_cmap_set::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
req_lib_cmap_delete
The req_lib_cmap_delete struct.
Definition: ipc_cmap.h:101
req_lib_cmap_set
The req_lib_cmap_set struct.
Definition: ipc_cmap.h:83
value
uint32_t value
Definition: exec/votequorum.c:2
req_lib_cmap_adjust_int::__attribute__
mar_name_t key_name __attribute__((aligned(8)))
req_lib_cmap_get
The req_lib_cmap_get struct.
Definition: ipc_cmap.h:116
req_lib_cmap_adjust_int::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
MESSAGE_REQ_CMAP_ADJUST_INT
@ MESSAGE_REQ_CMAP_ADJUST_INT
Definition: ipc_cmap.h:49
MESSAGE_RES_CMAP_ITER_NEXT
@ MESSAGE_RES_CMAP_ITER_NEXT
Definition: ipc_cmap.h:67
mar_uint8_t
uint8_t mar_uint8_t
Definition: mar_gen.h:51
mar_int32_t
int32_t mar_int32_t
Definition: mar_gen.h:48
MESSAGE_RES_CMAP_DELETE
@ MESSAGE_RES_CMAP_DELETE
Definition: ipc_cmap.h:63
req_lib_cmap_get::__attribute__
mar_name_t key_name __attribute__((aligned(8)))
CMAP_SETMAP_DEFAULT
@ CMAP_SETMAP_DEFAULT
Definition: ipc_cmap.h:76
mar_name_t
mar_name_t struct
Definition: mar_gen.h:166
CMAP_SETMAP_STATS
@ CMAP_SETMAP_STATS
Definition: ipc_cmap.h:77
MESSAGE_REQ_CMAP_DELETE
@ MESSAGE_REQ_CMAP_DELETE
Definition: ipc_cmap.h:47
type
char type
Definition: totem.h:2
res_lib_cmap_iter_finalize::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
MESSAGE_RES_CMAP_SET_CURRENT_MAP
@ MESSAGE_RES_CMAP_SET_CURRENT_MAP
Definition: ipc_cmap.h:72
req_lib_cmap_set_current_map::__attribute__
mar_int32_t map __attribute__((aligned(8)))
res_lib_cmap_track_add
The res_lib_cmap_track_add struct.
Definition: ipc_cmap.h:210
mar_size_t
mar_uint64_t mar_size_t
mar_size_t
Definition: mar_gen.h:286
res_lib_cmap_iter_init::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
req_lib_cmap_iter_init::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
req_lib_cmap_set::__attribute__
mar_size_t value_len __attribute__((aligned(8)))
req_lib_cmap_adjust_int
The req_lib_cmap_adjust_int struct.
Definition: ipc_cmap.h:135
req_lib_cmap_set_current_map::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
res_lib_cmap_notify_callback::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
MESSAGE_RES_CMAP_SET
@ MESSAGE_RES_CMAP_SET
Definition: ipc_cmap.h:62
res_lib_cmap_notify_callback::__attribute__
mar_int32_t event __attribute__((aligned(8)))
req_lib_cmap_set_current_map
The req_lib_cmap_set_current_map struct used by cmap_initialize_map()
Definition: ipc_cmap.h:257
MESSAGE_REQ_CMAP_GET
@ MESSAGE_REQ_CMAP_GET
Definition: ipc_cmap.h:48
res_lib_cmap_iter_finalize
The res_lib_cmap_iter_finalize struct.
Definition: ipc_cmap.h:193
MESSAGE_REQ_CMAP_ITER_INIT
@ MESSAGE_REQ_CMAP_ITER_INIT
Definition: ipc_cmap.h:50
res_lib_cmap_get::__attribute__
mar_size_t value_len __attribute__((aligned(8)))
MESSAGE_REQ_CMAP_SET_CURRENT_MAP
@ MESSAGE_REQ_CMAP_SET_CURRENT_MAP
Definition: ipc_cmap.h:55
req_lib_cmap_delete::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
header
struct totem_message_header header
Definition: totemsrp.c:0
MESSAGE_RES_CMAP_NOTIFY_CALLBACK
@ MESSAGE_RES_CMAP_NOTIFY_CALLBACK
Definition: ipc_cmap.h:71
MESSAGE_RES_CMAP_TRACK_DELETE
@ MESSAGE_RES_CMAP_TRACK_DELETE
Definition: ipc_cmap.h:70
mar_gen.h
res_lib_cmap_get::__attribute__
mar_uint8_t type __attribute__((aligned(8)))
req_lib_cmap_iter_finalize::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
mar_uint64_t
uint64_t mar_uint64_t
Definition: mar_gen.h:54
res_lib_cmap_notify_callback::__attribute__
mar_size_t old_value_len __attribute__((aligned(8)))
res_cmap_types
res_cmap_types
The res_cmap_types enum.
Definition: ipc_cmap.h:61
res_lib_cmap_track_delete::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
MESSAGE_REQ_CMAP_ITER_FINALIZE
@ MESSAGE_REQ_CMAP_ITER_FINALIZE
Definition: ipc_cmap.h:52
MESSAGE_REQ_CMAP_TRACK_ADD
@ MESSAGE_REQ_CMAP_TRACK_ADD
Definition: ipc_cmap.h:53
res_lib_cmap_iter_init
The res_lib_cmap_iter_init struct.
Definition: ipc_cmap.h:159
req_lib_cmap_set::__attribute__
mar_name_t key_name __attribute__((aligned(8)))
req_lib_cmap_iter_finalize
The req_lib_cmap_iter_finalize struct.
Definition: ipc_cmap.h:185
req_lib_cmap_track_add::__attribute__
mar_int32_t track_type __attribute__((aligned(8)))
req_lib_cmap_track_delete::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
res_lib_cmap_iter_next
The res_lib_cmap_iter_next struct.
Definition: ipc_cmap.h:175
req_lib_cmap_set::__attribute__
mar_uint8_t type __attribute__((aligned(8)))
req_cmap_types
req_cmap_types
The req_cmap_types enum.
Definition: ipc_cmap.h:45
req_lib_cmap_set::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
res_lib_cmap_iter_next::__attribute__
mar_size_t value_len __attribute__((aligned(8)))
res_lib_cmap_adjust_int
The res_lib_cmap_adjust_int struct.
Definition: ipc_cmap.h:144
MESSAGE_RES_CMAP_TRACK_ADD
@ MESSAGE_RES_CMAP_TRACK_ADD
Definition: ipc_cmap.h:69
req_lib_cmap_iter_next
The req_lib_cmap_iter_next struct.
Definition: ipc_cmap.h:167
req_lib_cmap_track_add
The req_lib_cmap_track_add struct.
Definition: ipc_cmap.h:200
res_lib_cmap_delete::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
req_lib_cmap_get::__attribute__
struct qb_ipc_request_header header __attribute__((aligned(8)))
MESSAGE_REQ_CMAP_ITER_NEXT
@ MESSAGE_REQ_CMAP_ITER_NEXT
Definition: ipc_cmap.h:51
MESSAGE_REQ_CMAP_TRACK_DELETE
@ MESSAGE_REQ_CMAP_TRACK_DELETE
Definition: ipc_cmap.h:54
req_lib_cmap_iter_init
The req_lib_cmap_iter_init struct.
Definition: ipc_cmap.h:151
res_lib_cmap_notify_callback::__attribute__
mar_uint8_t new_value_type __attribute__((aligned(8)))
res_lib_cmap_track_add::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
res_lib_cmap_adjust_int::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
res_lib_cmap_notify_callback
The res_lib_cmap_notify_callback struct.
Definition: ipc_cmap.h:234
res_lib_cmap_iter_next::__attribute__
struct qb_ipc_response_header header __attribute__((aligned(8)))
res_lib_cmap_notify_callback::__attribute__
mar_uint8_t old_value_type __attribute__((aligned(8)))
MESSAGE_RES_CMAP_GET
@ MESSAGE_RES_CMAP_GET
Definition: ipc_cmap.h:64
res_lib_cmap_track_delete
The res_lib_cmap_track_delete struct.
Definition: ipc_cmap.h:226
res_lib_cmap_notify_callback::__attribute__
mar_uint64_t track_inst_handle __attribute__((aligned(8)))
res_lib_cmap_notify_callback::__attribute__
mar_size_t new_value_len __attribute__((aligned(8)))
MESSAGE_REQ_CMAP_SET
@ MESSAGE_REQ_CMAP_SET
Definition: ipc_cmap.h:46
req_lib_cmap_track_add::__attribute__
mar_name_t key_name __attribute__((aligned(8)))
corotypes.h
res_lib_cmap_iter_next::__attribute__
mar_name_t key_name __attribute__((aligned(8)))
MESSAGE_RES_CMAP_ADJUST_INT
@ MESSAGE_RES_CMAP_ADJUST_INT
Definition: ipc_cmap.h:65
req_lib_cmap_track_delete
The req_lib_cmap_track_delete struct.
Definition: ipc_cmap.h:218
res_lib_cmap_delete
The res_lib_cmap_delete struct.
Definition: ipc_cmap.h:109
res_lib_cmap_notify_callback::__attribute__
mar_name_t key_name __attribute__((aligned(8)))
MESSAGE_RES_CMAP_ITER_FINALIZE
@ MESSAGE_RES_CMAP_ITER_FINALIZE
Definition: ipc_cmap.h:68
res_lib_cmap_set
The res_lib_cmap_set struct.
Definition: ipc_cmap.h:94
res_lib_cmap_get
The res_lib_cmap_get struct.
Definition: ipc_cmap.h:125
res_lib_cmap_notify_callback::new_value
mar_uint8_t new_value[]
Definition: ipc_cmap.h:250
MESSAGE_RES_CMAP_ITER_INIT
@ MESSAGE_RES_CMAP_ITER_INIT
Definition: ipc_cmap.h:66