1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef LRMD_PVT__H
21 # define LRMD_PVT__H
22
23 # include <glib.h>
24 # include <crm/common/ipcs.h>
25 # include <crm/lrmd.h>
26 # include <crm/stonith-ng.h>
27
28 # ifdef HAVE_GNUTLS_GNUTLS_H
29 # undef KEYFILE
30 # include <gnutls/gnutls.h>
31 # endif
32
33 #define LRMD_ISOLATION_PROVIDER ".isolation"
34
35 GHashTable *rsc_list;
36
37 typedef struct lrmd_rsc_s {
38 char *rsc_id;
39 char *class;
40 char *provider;
41 char *type;
42
43 int call_opts;
44
45
46
47
48 void *active;
49
50
51
52 GList *pending_ops;
53
54
55 GList *recurring_ops;
56
57 int stonith_started;
58
59 crm_trigger_t *work;
60 } lrmd_rsc_t;
61
62 # ifdef HAVE_GNUTLS_GNUTLS_H
63
64 int lrmd_init_remote_tls_server(void);
65 void lrmd_tls_server_destroy(void);
66
67
68 extern int lrmd_tls_send_msg(crm_remote_t * session, xmlNode * msg, uint32_t id,
69 const char *msg_type);
70 extern int lrmd_tls_set_key(gnutls_datum_t * key);
71 # endif
72
73 int lrmd_server_send_reply(crm_client_t * client, uint32_t id, xmlNode * reply);
74
75 int lrmd_server_send_notify(crm_client_t * client, xmlNode * msg);
76
77 void notify_of_new_client(crm_client_t *new_client);
78
79 void process_lrmd_message(crm_client_t * client, uint32_t id, xmlNode * request);
80
81 void free_rsc(gpointer data);
82
83 void handle_shutdown_ack(void);
84
85 void handle_shutdown_nack(void);
86
87 void lrmd_client_destroy(crm_client_t *client);
88
89 void client_disconnect_cleanup(const char *client_id);
90
91
92
93
94
95 stonith_t *get_stonith_connection(void);
96
97
98
99
100
101
102 void stonith_connection_failed(void);
103
104 #ifdef SUPPORT_REMOTE
105 void ipc_proxy_init(void);
106 void ipc_proxy_cleanup(void);
107 void ipc_proxy_add_provider(crm_client_t *client);
108 void ipc_proxy_remove_provider(crm_client_t *client);
109 void ipc_proxy_forward_client(crm_client_t *client, xmlNode *xml);
110 crm_client_t *ipc_proxy_get_provider(void);
111 int ipc_proxy_shutdown_req(crm_client_t *ipc_proxy);
112 #endif
113
114 int process_lrmd_alert_exec(crm_client_t *client, uint32_t id, xmlNode *request);
115 void lrmd_drain_alerts(GMainContext *ctx);
116 #endif