]>
Commit | Line | Data |
---|---|---|
7b2ddfa4 SD |
1 | /* |
2 | * Copyright (c) 2005 MontaVista Software, Inc. | |
2514fc59 | 3 | * Copyright (c) 2009-2012 Red Hat, Inc. |
7b2ddfa4 SD |
4 | * |
5 | * All rights reserved. | |
6 | * | |
46b01638 | 7 | * Author: Steven Dake (sdake@redhat.com) |
7b2ddfa4 SD |
8 | * |
9 | * This software licensed under BSD license, the text of which follows: | |
904a10ed | 10 | * |
7b2ddfa4 SD |
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 | */ | |
8126cf74 SD |
35 | #ifndef IPC_CFG_H_DEFINED |
36 | #define IPC_CFG_H_DEFINED | |
7b2ddfa4 SD |
37 | |
38 | #include <netinet/in.h> | |
56eaee95 | 39 | #include <corosync/corotypes.h> |
51ef3b5c | 40 | #include <corosync/mar_gen.h> |
7b2ddfa4 SD |
41 | |
42 | enum req_lib_cfg_types { | |
640cfba2 SD |
43 | MESSAGE_REQ_CFG_RINGSTATUSGET = 0, |
44 | MESSAGE_REQ_CFG_RINGREENABLE = 1, | |
81537541 SD |
45 | MESSAGE_REQ_CFG_KILLNODE = 2, |
46 | MESSAGE_REQ_CFG_TRYSHUTDOWN = 3, | |
47 | MESSAGE_REQ_CFG_REPLYTOSHUTDOWN = 4, | |
48 | MESSAGE_REQ_CFG_GET_NODE_ADDRS = 5, | |
49 | MESSAGE_REQ_CFG_LOCAL_GET = 6, | |
50 | MESSAGE_REQ_CFG_CRYPTO_SET = 7 | |
7b2ddfa4 SD |
51 | }; |
52 | ||
53 | enum res_lib_cfg_types { | |
640cfba2 SD |
54 | MESSAGE_RES_CFG_RINGSTATUSGET = 0, |
55 | MESSAGE_RES_CFG_RINGREENABLE = 1, | |
56 | MESSAGE_RES_CFG_STATETRACKSTART = 2, | |
57 | MESSAGE_RES_CFG_STATETRACKSTOP = 3, | |
58 | MESSAGE_RES_CFG_ADMINISTRATIVESTATESET = 4, | |
59 | MESSAGE_RES_CFG_ADMINISTRATIVESTATEGET = 5, | |
4ad44b9c | 60 | MESSAGE_RES_CFG_SERVICELOAD = 6, |
39b50568 CC |
61 | MESSAGE_RES_CFG_SERVICEUNLOAD = 7, |
62 | MESSAGE_RES_CFG_KILLNODE = 8, | |
63 | MESSAGE_RES_CFG_TRYSHUTDOWN = 9, | |
bcbc007e | 64 | MESSAGE_RES_CFG_TESTSHUTDOWN = 10, |
7e5a3e4c | 65 | MESSAGE_RES_CFG_GET_NODE_ADDRS = 11, |
9ff50d8e | 66 | MESSAGE_RES_CFG_LOCAL_GET = 12, |
e9660ee6 CC |
67 | MESSAGE_RES_CFG_REPLYTOSHUTDOWN = 13, |
68 | MESSAGE_RES_CFG_CRYPTO_SET = 14, | |
7b2ddfa4 SD |
69 | }; |
70 | ||
640cfba2 | 71 | struct req_lib_cfg_ringstatusget { |
c6895faa | 72 | struct qb_ipc_request_header header __attribute__((aligned(8))); |
640cfba2 SD |
73 | }; |
74 | ||
75 | struct res_lib_cfg_ringstatusget { | |
c6895faa | 76 | struct qb_ipc_response_header header __attribute__((aligned(8))); |
640cfba2 SD |
77 | mar_uint32_t interface_count __attribute__((aligned(8))); |
78 | char interface_name[16][128] __attribute__((aligned(8))); | |
79 | char interface_status[16][512] __attribute__((aligned(8))); | |
80 | }; | |
81 | ||
82 | struct req_lib_cfg_ringreenable { | |
c6895faa | 83 | struct qb_ipc_request_header header __attribute__((aligned(8))); |
640cfba2 SD |
84 | }; |
85 | ||
86 | struct res_lib_cfg_ringreenable { | |
c6895faa | 87 | struct qb_ipc_response_header header __attribute__((aligned(8))); |
7b2ddfa4 SD |
88 | }; |
89 | ||
39b50568 | 90 | struct req_lib_cfg_killnode { |
c6895faa | 91 | struct qb_ipc_request_header header __attribute__((aligned(8))); |
39b50568 | 92 | unsigned int nodeid __attribute__((aligned(8))); |
56eaee95 | 93 | cs_name_t reason __attribute__((aligned(8))); |
39b50568 CC |
94 | }; |
95 | ||
96 | struct res_lib_cfg_killnode { | |
c6895faa | 97 | struct qb_ipc_response_header header __attribute__((aligned(8))); |
39b50568 CC |
98 | }; |
99 | ||
100 | struct req_lib_cfg_tryshutdown { | |
c6895faa | 101 | struct qb_ipc_request_header header __attribute__((aligned(8))); |
39b50568 CC |
102 | unsigned int flags; |
103 | }; | |
104 | ||
105 | struct res_lib_cfg_tryshutdown { | |
c6895faa | 106 | struct qb_ipc_response_header header __attribute__((aligned(8))); |
39b50568 CC |
107 | }; |
108 | ||
109 | struct req_lib_cfg_replytoshutdown { | |
c6895faa | 110 | struct qb_ipc_request_header header __attribute__((aligned(8))); |
39b50568 CC |
111 | unsigned int response; |
112 | }; | |
113 | ||
c0772557 | 114 | struct res_lib_cfg_replytoshutdown { |
c6895faa | 115 | struct qb_ipc_response_header header __attribute__((aligned(8))); |
c0772557 SD |
116 | }; |
117 | ||
39b50568 | 118 | struct res_lib_cfg_testshutdown { |
c6895faa | 119 | struct qb_ipc_response_header header __attribute__((aligned(8))); |
39b50568 CC |
120 | unsigned int flags; |
121 | }; | |
122 | ||
bcbc007e | 123 | struct req_lib_cfg_get_node_addrs { |
c6895faa | 124 | struct qb_ipc_request_header header __attribute__((aligned(8))); |
bcbc007e CC |
125 | unsigned int nodeid; |
126 | }; | |
127 | ||
128 | struct res_lib_cfg_get_node_addrs { | |
c6895faa | 129 | struct qb_ipc_response_header header __attribute__((aligned(8))); |
bcbc007e CC |
130 | unsigned int family; |
131 | unsigned int num_addrs; | |
8b02049e JF |
132 | /* array of TOTEMIP_ADDRLEN items */ |
133 | char addrs[]; | |
bcbc007e CC |
134 | }; |
135 | ||
7e5a3e4c | 136 | struct req_lib_cfg_local_get { |
c6895faa | 137 | struct qb_ipc_request_header header __attribute__((aligned(8))); |
7e5a3e4c CC |
138 | }; |
139 | ||
140 | struct res_lib_cfg_local_get { | |
c6895faa | 141 | struct qb_ipc_response_header header __attribute__((aligned(8))); |
7e5a3e4c CC |
142 | mar_uint32_t local_nodeid __attribute__((aligned(8))); |
143 | }; | |
144 | ||
7b2ddfa4 SD |
145 | typedef enum { |
146 | AIS_AMF_ADMINISTRATIVETARGET_SERVICEUNIT = 0, | |
147 | AIS_AMF_ADMINISTRATIVETARGET_SERVICEGROUP = 1, | |
148 | AIS_AMF_ADMINISTRATIVETARGET_COMPONENTSERVICEINSTANCE = 2, | |
149 | AIS_AMF_ADMINISTRATIVETARGET_NODE = 3 | |
98847496 | 150 | } corosync_administrative_target_t; |
7b2ddfa4 SD |
151 | |
152 | typedef enum { | |
153 | AIS_AMF_ADMINISTRATIVESTATE_UNLOCKED = 0, | |
154 | AIS_AMF_ADMINISTRATIVESTATE_LOCKED = 1, | |
155 | AIS_AMF_ADMINISTRATIVESTATE_STOPPING = 2 | |
98847496 | 156 | } corosync_administrative_state_t; |
7b2ddfa4 | 157 | |
39b50568 CC |
158 | typedef enum { |
159 | CFG_SHUTDOWN_FLAG_REQUEST = 0, | |
160 | CFG_SHUTDOWN_FLAG_REGARDLESS = 1, | |
161 | CFG_SHUTDOWN_FLAG_IMMEDIATE = 2, | |
98847496 | 162 | } corosync_shutdown_flags_t; |
39b50568 CC |
163 | |
164 | ||
8126cf74 | 165 | #endif /* IPC_CFG_H_DEFINED */ |