pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
ipc_pacemakerd.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020-2024 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__CRM_COMMON_IPC_PACEMAKERD__H
11 #define PCMK__CRM_COMMON_IPC_PACEMAKERD__H
12 
13 #include <sys/types.h> // time_t
14 #include <crm/common/ipc.h> // pcmk_ipc_api_t
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
27 // NOTE: sbd (as of at least 1.5.2) uses this enum
33 
34  // NOTE: sbd (as of at least 1.5.2) uses this value
36 
37  // NOTE: sbd (as of at least 1.5.2) uses this value
39 
40  // NOTE: sbd (as of at least 1.5.2) uses this value
42 
45 };
46 
50 
51  // NOTE: sbd (as of at least 1.5.2) uses this value
53 
55 };
56 
57 // NOTE: sbd (as of at least 1.5.2) uses this type and some of its members
61 typedef struct {
62  enum pcmk_pacemakerd_api_reply reply_type;
63 
64  union {
65  // pcmk_pacemakerd_reply_ping
66  struct {
67  const char *sys_from;
69  time_t last_good;
70  int status;
71  } ping;
72  // pcmk_pacemakerd_reply_shutdown
73  struct {
74  int status;
75  } shutdown;
76  } data;
78 
79 // NOTE: sbd (as of at least 1.5.2) uses this
80 int pcmk_pacemakerd_api_ping(pcmk_ipc_api_t *api, const char *ipc_name);
81 
82 int pcmk_pacemakerd_api_shutdown(pcmk_ipc_api_t *api, const char *ipc_name);
83 
86 const char
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif // PCMK__CRM_COMMON_IPC_PACEMAKERD__H
char data[0]
Definition: cpg.c:58
pcmk_pacemakerd_api_reply
Possible types of pacemakerd replies.
enum pcmk_pacemakerd_state pcmk_pacemakerd_api_daemon_state_text2enum(const char *state)
int pcmk_pacemakerd_api_shutdown(pcmk_ipc_api_t *api, const char *ipc_name)
int pcmk_pacemakerd_api_ping(pcmk_ipc_api_t *api, const char *ipc_name)
pcmk_pacemakerd_state
const char * pcmk_pacemakerd_api_daemon_state_enum2text(enum pcmk_pacemakerd_state state)
IPC interface to Pacemaker daemons.