This source file includes following definitions.
- cib_config_lookup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <stdio.h>
20 #include <sys/types.h>
21 #include <unistd.h>
22 #include <glib.h>
23
24 #include <crm/crm.h>
25 #include <crm/cib.h>
26 #include <crm/common/xml.h>
27 #include <crm/cluster.h>
28 #include <crm/common/ipcs.h>
29 #include <crm/common/mainloop.h>
30 #ifdef HAVE_GNUTLS_GNUTLS_H
31 # undef KEYFILE
32 # include <gnutls/gnutls.h>
33 #endif
34
35 extern gboolean cib_is_master;
36 extern GHashTable *peer_hash;
37 extern GHashTable *config_hash;
38
39
40 enum cib_notifications
41 {
42 cib_notify_pre = 0x0001,
43 cib_notify_post = 0x0002,
44 cib_notify_replace = 0x0004,
45 cib_notify_confirm = 0x0008,
46 cib_notify_diff = 0x0010,
47
48
49 cib_is_daemon = 0x1000,
50 };
51
52
53 typedef struct cib_operation_s {
54 const char *operation;
55 gboolean modifies_cib;
56 gboolean needs_privileges;
57 gboolean needs_quorum;
58 int (*prepare) (xmlNode *, xmlNode **, const char **);
59 int (*cleanup) (int, xmlNode **, xmlNode **);
60 int (*fn) (const char *, int, const char *, xmlNode *,
61 xmlNode *, xmlNode *, xmlNode **, xmlNode **);
62 } cib_operation_t;
63
64 extern struct qb_ipcs_service_handlers ipc_ro_callbacks;
65 extern struct qb_ipcs_service_handlers ipc_rw_callbacks;
66 extern qb_ipcs_service_t *ipcs_ro;
67 extern qb_ipcs_service_t *ipcs_rw;
68 extern qb_ipcs_service_t *ipcs_shm;
69
70 extern void cib_peer_callback(xmlNode * msg, void *private_data);
71 extern void cib_client_status_callback(const char *node, const char *client,
72 const char *status, void *private);
73 extern void cib_common_callback_worker(uint32_t id, uint32_t flags, xmlNode * op_request,
74 crm_client_t * cib_client, gboolean privileged);
75
76 void cib_shutdown(int nsig);
77 void initiate_exit(void);
78 void terminate_cib(const char *caller, int fast);
79
80 extern gboolean cib_legacy_mode(void);
81
82 #if SUPPORT_HEARTBEAT
83 extern void cib_ha_peer_callback(HA_Message * msg, void *private_data);
84 extern int cib_ccm_dispatch(gpointer user_data);
85 extern void cib_ccm_msg_callback(oc_ed_t event, void *cookie, size_t size, const void *data);
86 #endif
87
88 static inline const char *
89 cib_config_lookup(const char *opt)
90 {
91 return g_hash_table_lookup(config_hash, opt);
92 }