1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <attrd_common.h>
20
21 typedef struct attribute_s {
22 char *uuid;
23 char *id;
24 char *set;
25 GHashTable *values;
26 int update;
27 int timeout_ms;
28
29
30 bool changed;
31 bool unknown_peer_uuids;
32 gboolean is_private;
33
34 mainloop_timer_t *timer;
35
36 char *user;
37
38 } attribute_t;
39
40 typedef struct attribute_value_s {
41 uint32_t nodeid;
42 gboolean is_remote;
43 char *nodename;
44 char *current;
45 char *requested;
46 } attribute_value_t;
47
48 crm_cluster_t *attrd_cluster;
49 GHashTable *attributes;
50 election_t *writer;
51
52 #define attrd_send_ack(client, id, flags) \
53 crm_ipcs_send_ack((client), (id), (flags), "ack", __FUNCTION__, __LINE__)
54
55 void write_attributes(bool all);
56 void attrd_peer_message(crm_node_t *client, xmlNode *msg);
57 void attrd_client_peer_remove(const char *client_name, xmlNode *xml);
58 void attrd_client_clear_failure(xmlNode *xml);
59 void attrd_client_update(xmlNode *xml);
60 void attrd_client_refresh(void);
61 void attrd_client_query(crm_client_t *client, uint32_t id, uint32_t flags, xmlNode *query);
62
63 void free_attribute(gpointer data);
64
65 gboolean attrd_election_cb(gpointer user_data);
66 void attrd_peer_change_cb(enum crm_status_type type, crm_node_t *peer, const void *data);