44 #include <sys/socket.h> 45 #include <sys/types.h> 48 #include <netinet/in.h> 49 #include <arpa/inet.h> 50 #include <sys/param.h> 54 #include <qb/qbdefs.h> 63 #define TOKEN_RETRANSMITS_BEFORE_LOSS_CONST 4 64 #define TOKEN_TIMEOUT 1000 65 #define TOKEN_COEFFICIENT 650 66 #define JOIN_TIMEOUT 50 67 #define MERGE_TIMEOUT 200 68 #define DOWNCHECK_TIMEOUT 1000 69 #define FAIL_TO_RECV_CONST 2500 70 #define SEQNO_UNCHANGED_CONST 30 71 #define MINIMUM_TIMEOUT (int)(1000/HZ)*3 72 #define MAX_NETWORK_DELAY 50 73 #define WINDOW_SIZE 50 74 #define MAX_MESSAGES 17 75 #define MISS_COUNT_CONST 5 76 #define RRP_PROBLEM_COUNT_TIMEOUT 2000 77 #define RRP_PROBLEM_COUNT_THRESHOLD_DEFAULT 10 78 #define RRP_PROBLEM_COUNT_THRESHOLD_MIN 2 79 #define RRP_AUTORECOVERY_CHECK_TIMEOUT 1000 81 #define DEFAULT_PORT 5405 83 static char error_string_response[512];
91 if (strcmp(param_name,
"totem.token") == 0)
93 if (strcmp(param_name,
"totem.token_retransmit") == 0)
95 if (strcmp(param_name,
"totem.hold") == 0)
97 if (strcmp(param_name,
"totem.token_retransmits_before_loss_const") == 0)
99 if (strcmp(param_name,
"totem.join") == 0)
101 if (strcmp(param_name,
"totem.send_join") == 0)
103 if (strcmp(param_name,
"totem.consensus") == 0)
105 if (strcmp(param_name,
"totem.merge") == 0)
107 if (strcmp(param_name,
"totem.downcheck") == 0)
109 if (strcmp(param_name,
"totem.fail_recv_const") == 0)
111 if (strcmp(param_name,
"totem.seqno_unchanged_const") == 0)
113 if (strcmp(param_name,
"totem.rrp_token_expired_timeout") == 0)
115 if (strcmp(param_name,
"totem.rrp_problem_count_timeout") == 0)
117 if (strcmp(param_name,
"totem.rrp_problem_count_threshold") == 0)
119 if (strcmp(param_name,
"totem.rrp_problem_count_mcast_threshold") == 0)
121 if (strcmp(param_name,
"totem.rrp_autorecovery_check_timeout") == 0)
123 if (strcmp(param_name,
"totem.heartbeat_failures_allowed") == 0)
125 if (strcmp(param_name,
"totem.max_network_delay") == 0)
127 if (strcmp(param_name,
"totem.window_size") == 0)
129 if (strcmp(param_name,
"totem.max_messages") == 0)
131 if (strcmp(param_name,
"totem.miss_count_const") == 0)
141 static void totem_volatile_config_set_value (
struct totem_config *totem_config,
142 const char *key_name,
const char *deleted_key,
unsigned int default_value,
143 int allow_zero_value)
148 (deleted_key != NULL && strcmp(deleted_key, key_name) == 0) ||
149 (!allow_zero_value && *totem_get_param_by_name(totem_config, key_name) == 0)) {
150 *totem_get_param_by_name(totem_config, key_name) = default_value;
156 strcpy(runtime_key_name,
"runtime.config.");
157 strcat(runtime_key_name, key_name);
159 icmap_set_uint32(runtime_key_name, *totem_get_param_by_name(totem_config, key_name));
168 static void totem_volatile_config_read (
struct totem_config *totem_config,
const char *deleted_key)
172 totem_volatile_config_set_value(totem_config,
"totem.token_retransmits_before_loss_const", deleted_key,
175 totem_volatile_config_set_value(totem_config,
"totem.token", deleted_key,
TOKEN_TIMEOUT, 0);
188 totem_volatile_config_set_value(totem_config,
"totem.max_network_delay", deleted_key,
MAX_NETWORK_DELAY, 0);
190 totem_volatile_config_set_value(totem_config,
"totem.window_size", deleted_key,
WINDOW_SIZE, 0);
192 totem_volatile_config_set_value(totem_config,
"totem.max_messages", deleted_key,
MAX_MESSAGES, 0);
194 totem_volatile_config_set_value(totem_config,
"totem.miss_count_const", deleted_key,
MISS_COUNT_CONST, 0);
196 totem_volatile_config_set_value(totem_config,
"totem.token_retransmit", deleted_key,
199 totem_volatile_config_set_value(totem_config,
"totem.hold", deleted_key,
202 totem_volatile_config_set_value(totem_config,
"totem.join", deleted_key,
JOIN_TIMEOUT, 0);
204 totem_volatile_config_set_value(totem_config,
"totem.consensus", deleted_key,
207 totem_volatile_config_set_value(totem_config,
"totem.merge", deleted_key,
MERGE_TIMEOUT, 0);
209 totem_volatile_config_set_value(totem_config,
"totem.downcheck", deleted_key,
DOWNCHECK_TIMEOUT, 0);
211 totem_volatile_config_set_value(totem_config,
"totem.fail_recv_const", deleted_key,
FAIL_TO_RECV_CONST, 0);
213 totem_volatile_config_set_value(totem_config,
"totem.seqno_unchanged_const", deleted_key,
216 totem_volatile_config_set_value(totem_config,
"totem.send_join", deleted_key, 0, 1);
218 totem_volatile_config_set_value(totem_config,
"totem.rrp_problem_count_timeout", deleted_key,
221 totem_volatile_config_set_value(totem_config,
"totem.rrp_problem_count_threshold", deleted_key,
224 totem_volatile_config_set_value(totem_config,
"totem.rrp_problem_count_mcast_threshold", deleted_key,
227 totem_volatile_config_set_value(totem_config,
"totem.rrp_token_expired_timeout", deleted_key,
230 totem_volatile_config_set_value(totem_config,
"totem.rrp_autorecovery_check_timeout", deleted_key,
233 totem_volatile_config_set_value(totem_config,
"totem.heartbeat_failures_allowed", deleted_key, 0, 1);
236 static int totem_volatile_config_validate (
237 struct totem_config *totem_config,
238 const char **error_string)
240 static char local_error_reason[512];
241 const char *error_reason = local_error_reason;
244 snprintf (local_error_reason,
sizeof(local_error_reason),
245 "The max_network_delay parameter (%d ms) may not be less than (%d ms).",
251 snprintf (local_error_reason,
sizeof(local_error_reason),
252 "The token timeout parameter (%d ms) may not be less than (%d ms).",
258 snprintf (local_error_reason,
sizeof(local_error_reason),
259 "The token retransmit timeout parameter (%d ms) may not be less than (%d ms).",
265 snprintf (local_error_reason,
sizeof(local_error_reason),
266 "The token hold timeout parameter (%d ms) may not be less than (%d ms).",
272 snprintf (local_error_reason,
sizeof(local_error_reason),
273 "The join timeout parameter (%d ms) may not be less than (%d ms).",
279 snprintf (local_error_reason,
sizeof(local_error_reason),
280 "The consensus timeout parameter (%d ms) may not be less than (%d ms).",
286 snprintf (local_error_reason,
sizeof(local_error_reason),
287 "The consensus timeout parameter (%d ms) may not be less than join timeout (%d ms).",
293 snprintf (local_error_reason,
sizeof(local_error_reason),
294 "The merge timeout parameter (%d ms) may not be less than (%d ms).",
300 snprintf (local_error_reason,
sizeof(local_error_reason),
301 "The downcheck timeout parameter (%d ms) may not be less than (%d ms).",
307 snprintf (local_error_reason,
sizeof(local_error_reason),
308 "The RRP problem count timeout parameter (%d ms) may not be less than (%d ms).",
314 snprintf (local_error_reason,
sizeof(local_error_reason),
315 "The RRP problem count threshold (%d problem count) may not be less than (%d problem count).",
320 snprintf (local_error_reason,
sizeof(local_error_reason),
321 "The RRP multicast problem count threshold (%d problem count) may not be less than (%d problem count).",
327 snprintf (local_error_reason,
sizeof(local_error_reason),
328 "The RRP token expired timeout parameter (%d ms) may not be less than (%d ms).",
336 snprintf (error_string_response,
sizeof(error_string_response),
337 "parse error in config: %s\n", error_reason);
338 *error_string = error_string_response;
343 static int totem_get_crypto(
struct totem_config *totem_config)
346 const char *tmp_cipher;
347 const char *tmp_hash;
350 tmp_cipher =
"aes256";
353 if (strcmp (str,
"off") == 0) {
361 if (strcmp(str,
"none") == 0) {
364 if (strcmp(str,
"aes256") == 0) {
365 tmp_cipher =
"aes256";
367 if (strcmp(str,
"aes192") == 0) {
368 tmp_cipher =
"aes192";
370 if (strcmp(str,
"aes128") == 0) {
371 tmp_cipher =
"aes128";
373 if (strcmp(str,
"3des") == 0) {
380 if (strcmp(str,
"none") == 0) {
383 if (strcmp(str,
"md5") == 0) {
386 if (strcmp(str,
"sha1") == 0) {
389 if (strcmp(str,
"sha256") == 0) {
392 if (strcmp(str,
"sha384") == 0) {
395 if (strcmp(str,
"sha512") == 0) {
401 if ((strcmp(tmp_cipher,
"none") != 0) &&
402 (strcmp(tmp_hash,
"none") == 0)) {
415 static int totem_config_get_ip_version(
void)
422 if (strcmp(str,
"ipv4") == 0) {
425 if (strcmp(str,
"ipv6") == 0) {
434 static uint16_t generate_cluster_id (
const char *cluster_name)
439 for (i = 0; i < strlen(cluster_name); i++) {
441 value += cluster_name[i];
444 return (value & 0xFFFF);
447 static int get_cluster_mcast_addr (
448 const char *cluster_name,
450 unsigned int ringnumber,
455 char addr[INET6_ADDRSTRLEN + 1];
458 if (cluster_name == NULL) {
462 clusterid = generate_cluster_id(cluster_name) + ringnumber;
463 memset (res, 0,
sizeof(*res));
465 switch (bindnet->
family) {
467 snprintf(addr,
sizeof(addr),
"239.192.%d.%d", clusterid >> 8, clusterid % 0xFF);
470 snprintf(addr,
sizeof(addr),
"ff15::%x", clusterid);
484 static unsigned int generate_nodeid_for_duplicate_test(
485 struct totem_config *totem_config,
496 memcpy (&nodeid, &totemip.addr, sizeof (
unsigned int));
498 #if __BYTE_ORDER == __LITTLE_ENDIAN 503 nodeid &= 0x7FFFFFFF;
508 static int check_for_duplicate_nodeids(
509 struct totem_config *totem_config,
510 const char **error_string)
514 const char *iter_key;
518 char *ring0_addr=NULL;
519 char *ring0_addr1=NULL;
520 unsigned int node_pos;
521 unsigned int node_pos1;
523 unsigned int nodeid1;
528 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos, tmp_key);
533 if (strcmp(tmp_key,
"ring0_addr") != 0) {
547 nodeid = generate_nodeid_for_duplicate_test(totem_config, ring0_addr);
556 while (((iter_key =
icmap_iter_next(subiter, NULL, NULL)) != NULL) && (node_pos1 < node_pos)) {
557 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos1, tmp_key);
558 if ((res != 2) || (node_pos1 >= node_pos)) {
562 if (strcmp(tmp_key,
"ring0_addr") != 0) {
573 nodeid1 = generate_nodeid_for_duplicate_test(totem_config, ring0_addr1);
579 if (nodeid == nodeid1) {
581 snprintf (error_string_response,
sizeof(error_string_response),
582 "Nodeid %u%s%s%s appears twice in corosync.conf", nodeid,
583 autogenerated?
"(autogenerated from ":
"",
584 autogenerated?ring0_addr:
"",
585 autogenerated?
")":
"");
587 *error_string = error_string_response;
598 static int find_local_node_in_nodelist(
struct totem_config *totem_config)
601 const char *iter_key;
603 unsigned int node_pos;
604 int local_node_pos = -1;
606 int interface_up, interface_num;
612 &bind_addr, &interface_up, &interface_num,
620 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos, tmp_key);
625 if (strcmp(tmp_key,
"ring0_addr") != 0) {
641 local_node_pos = node_pos;
646 return (local_node_pos);
655 static void compute_interfaces_diff(
int interface_count,
659 int ring_no, set1_pos, set2_pos;
662 memset(&empty_ip_address, 0,
sizeof(empty_ip_address));
664 for (ring_no = 0; ring_no < interface_count; ring_no++) {
665 for (set1_pos = 0; set1_pos < set1[ring_no].
member_count; set1_pos++) {
666 for (set2_pos = 0; set2_pos < set2[ring_no].
member_count; set2_pos++) {
671 if (memcmp(&set1[ring_no].member_list[set1_pos],
672 &set2[ring_no].member_list[set2_pos],
674 memset(&set1[ring_no].member_list[set1_pos], 0,
676 memset(&set2[ring_no].member_list[set2_pos], 0,
683 for (ring_no = 0; ring_no < interface_count; ring_no++) {
684 for (set1_pos = 0; set1_pos < set1[ring_no].
member_count; set1_pos++) {
689 if (memcmp(&set1[ring_no].member_list[set1_pos], &empty_ip_address,
sizeof(empty_ip_address)) != 0) {
691 "removing dynamic member %s for ring %u",
698 for (set2_pos = 0; set2_pos < set2[ring_no].
member_count; set2_pos++) {
703 if (memcmp(&set2[ring_no].member_list[set2_pos], &empty_ip_address,
sizeof(empty_ip_address)) != 0) {
705 "adding dynamic member %s for ring %u",
715 static void put_nodelist_members_to_config(
struct totem_config *totem_config,
int reload)
718 const char *iter_key, *iter_key2;
720 unsigned int node_pos;
725 unsigned int ringnumber = 0;
737 assert(orig_interfaces != NULL);
739 assert(new_interfaces != NULL);
754 res = sscanf(iter_key,
"nodelist.node.%u.%s", &node_pos, tmp_key);
759 if (strcmp(tmp_key,
"ring0_addr") != 0) {
766 res = sscanf(iter_key2,
"nodelist.node.%u.ring%u%s", &node_pos, &ringnumber, tmp_key2);
767 if (res != 3 || strcmp(tmp_key2,
"_addr") != 0) {
793 compute_interfaces_diff(totem_config->
interface_count, orig_interfaces, new_interfaces);
795 free(new_interfaces);
796 free(orig_interfaces);
800 static void nodelist_dynamic_notify(
802 const char *key_name,
808 unsigned int ring_no;
809 unsigned int member_no;
812 struct totem_config *totem_config = (
struct totem_config *)user_data;
818 if (
icmap_get_uint8(
"config.totemconfig_reload_in_progress", &reloading) ==
CS_OK && reloading) {
822 res = sscanf(key_name,
"nodelist.node.%u.ring%u%s", &member_no, &ring_no, tmp_str);
826 if (strcmp(tmp_str,
"_addr") != 0) {
830 put_nodelist_members_to_config(totem_config, 1);
849 const char *iter_key, *iter_key2;
851 const char *ipaddr_key;
863 ip_version = totem_config_get_ip_version();
868 res = sscanf(iter_key,
"nodelist.node.%u.%s", node_pos, tmp_key);
873 if (strcmp(tmp_key,
"ring0_addr") != 0) {
886 snprintf(tmp_key,
sizeof(tmp_key),
"nodelist.node.%u.%s", *node_pos,
887 (ipaddr_key_prefix != NULL ? ipaddr_key_prefix :
"ring0_addr"));
894 ipaddr_key = (ipaddr_key_prefix != NULL ? iter_key2 : tmp_key);
899 if (
totemip_parse(&node_addr, node_addr_str, ip_version) == -1) {
909 for (list = addrs.
next; list != &addrs; list = list->
next) {
936 static void config_convert_nodelist_to_interface(
struct totem_config *totem_config)
939 unsigned int node_pos;
943 unsigned int ringnumber = 0;
945 const char *iter_key;
954 res = sscanf(iter_key,
"nodelist.node.%u.ring%u%s", &node_pos, &ringnumber, tmp_key2);
955 if (res != 3 || strcmp(tmp_key2,
"_addr") != 0) {
973 struct totem_config *totem_config,
974 const char **error_string,
979 unsigned int ringnumber = 0;
980 int member_count = 0;
982 const char *iter_key;
983 const char *member_iter_key;
988 char *cluster_name = NULL;
995 memset (totem_config, 0,
sizeof (
struct totem_config));
998 *error_string =
"Out of memory trying to allocate ethernet interface storage area";
1005 strcpy (totem_config->
rrp_mode,
"none");
1009 if (totem_get_crypto(totem_config) != 0) {
1010 *error_string =
"crypto_cipher requires crypto_hash with value other than none";
1016 *error_string =
"totem.rrp_mode is too long";
1021 strcpy (totem_config->
rrp_mode, str);
1029 if (strcmp (str,
"yes") == 0) {
1040 cluster_name = NULL;
1043 totem_config->
ip_version = totem_config_get_ip_version();
1049 config_convert_nodelist_to_interface(totem_config);
1062 res = sscanf(iter_key,
"totem.interface.%[^.].%s", ringnumber_key, tmp_key);
1067 if (strcmp(tmp_key,
"bindnetaddr") != 0) {
1073 ringnumber = atoi(ringnumber_key);
1075 if (ringnumber >= INTERFACE_MAX) {
1078 snprintf (error_string_response,
sizeof(error_string_response),
1079 "parse error in config: interface ring number %u is bigger than allowed maximum %u\n",
1080 ringnumber, INTERFACE_MAX - 1);
1082 *error_string = error_string_response;
1107 res = get_cluster_mcast_addr (cluster_name,
1116 if (strcmp (str,
"yes") == 0) {
1147 while ((member_iter_key =
icmap_iter_next(member_iter, NULL, NULL)) != NULL) {
1148 if (member_count == 0) {
1174 for (ringnumber = 0; ringnumber < totem_config->
interface_count; ringnumber++) {
1176 "255.255.255.255", 0);
1200 if (strcmp (str,
"udpu") == 0) {
1204 if (strcmp (str,
"iba") == 0) {
1220 local_node_pos = find_local_node_in_nodelist(totem_config);
1221 if (local_node_pos != -1) {
1226 nodeid_set = (totem_config->
node_id != 0);
1241 put_nodelist_members_to_config(totem_config, 0);
1247 totem_volatile_config_read(totem_config, NULL);
1251 add_totem_config_notification(totem_config);
1258 struct totem_config *totem_config,
1259 const char **error_string)
1261 static char local_error_reason[512];
1262 char parse_error[512];
1263 const char *error_reason = local_error_reason;
1266 unsigned int port1, port2;
1269 error_reason =
"No interfaces defined";
1284 error_reason =
"No multicast address specified";
1289 error_reason =
"No multicast port specified";
1294 error_reason =
"Invalid TTL (should be 0..255)";
1299 error_reason =
"Can only set ttl on multicast transport types";
1306 error_reason =
"An IPV6 network requires that a node ID be specified.";
1312 error_reason =
"Multicast address family does not match bind address family";
1317 error_reason =
"mcastaddr is not a correct multicast address.";
1323 error_reason =
"Not all bind address belong to the same IP family";
1336 (((port1 > port2 ? port1 : port2) - (port1 < port2 ? port1 : port2)) <= 1)) {
1337 error_reason =
"Interfaces multicast address/port pair must differ";
1344 if (totem_config->
version != 2) {
1345 error_reason =
"This totem parser can only parse version 2 configurations.";
1349 if (totem_volatile_config_validate(totem_config, error_string) == -1) {
1353 if (check_for_duplicate_nodeids(totem_config, error_string) == -1) {
1360 if (strcmp (totem_config->
rrp_mode,
"none") &&
1361 strcmp (totem_config->
rrp_mode,
"active") &&
1362 strcmp (totem_config->
rrp_mode,
"passive")) {
1363 snprintf (local_error_reason,
sizeof(local_error_reason),
1364 "The RRP mode \"%s\" specified is invalid. It must be none, active, or passive.\n", totem_config->
rrp_mode);
1368 if (strcmp (totem_config->
rrp_mode,
"none") == 0) {
1371 if (interface_max < totem_config->interface_count) {
1372 snprintf (parse_error,
sizeof(parse_error),
1373 "%d is too many configured interfaces for the rrp_mode setting %s.",
1376 error_reason = parse_error;
1380 if (totem_config->
net_mtu == 0) {
1387 snprintf (error_string_response,
sizeof(error_string_response),
1388 "parse error in config: %s\n", error_reason);
1389 *error_string = error_string_response;
1394 static int read_keyfile (
1395 const char *key_location,
1396 struct totem_config *totem_config,
1397 const char **error_string)
1401 ssize_t expected_key_len =
sizeof (totem_config->
private_key);
1403 char error_str[100];
1404 const char *error_ptr;
1406 fd = open (key_location, O_RDONLY);
1408 error_ptr = qb_strerror_r(errno, error_str,
sizeof(error_str));
1409 snprintf (error_string_response,
sizeof(error_string_response),
1410 "Could not open %s: %s\n",
1411 key_location, error_ptr);
1415 res = read (fd, totem_config->
private_key, expected_key_len);
1416 saved_errno = errno;
1420 error_ptr = qb_strerror_r (saved_errno, error_str,
sizeof(error_str));
1421 snprintf (error_string_response,
sizeof(error_string_response),
1422 "Could not read %s: %s\n",
1423 key_location, error_ptr);
1429 if (res != expected_key_len) {
1430 snprintf (error_string_response,
sizeof(error_string_response),
1431 "Could only read %d bits of 1024 bits from %s.\n",
1432 res * 8, key_location);
1439 *error_string = error_string_response;
1444 struct totem_config *totem_config,
1445 const char **error_string)
1448 char *key_location = NULL;
1462 res = read_keyfile(key_location, totem_config, error_string);
1470 if (key_len >
sizeof (totem_config->
private_key)) {
1471 sprintf(error_string_response,
"key is too long");
1478 sprintf(error_string_response,
"can't store private key");
1486 const char *filename = getenv(
"COROSYNC_TOTEM_AUTHKEY_FILE");
1489 res = read_keyfile(filename, totem_config, error_string);
1498 *error_string = error_string_response;
1503 static void debug_dump_totem_config(
const struct totem_config *totem_config)
1516 "seqno unchanged const (%d rotations) Maximum network MTU %d",
1519 "window size per rotation (%d messages) maximum messages per rotation (%d messages)",
1539 static void totem_change_notify(
1541 const char *key_name,
1546 struct totem_config *totem_config = (
struct totem_config *)user_data;
1549 const char *deleted_key = NULL;
1550 const char *error_string;
1559 param = totem_get_param_by_name((
struct totem_config *)user_data, key_name);
1565 if (!param && strcmp(key_name,
"totem.token_coefficient") != 0)
1573 deleted_key = key_name;
1583 totem_volatile_config_read (totem_config, deleted_key);
1585 debug_dump_totem_config(totem_config);
1586 if (totem_volatile_config_validate(totem_config, &error_string) == -1) {
1595 static void totem_reload_notify(
1597 const char *key_name,
1602 struct totem_config *totem_config = (
struct totem_config *)user_data;
1603 uint32_t local_node_pos;
1604 const char *error_string;
1607 if (*(uint8_t *)new_val.
data == 0) {
1608 put_nodelist_members_to_config (totem_config, 1);
1609 totem_volatile_config_read (totem_config, NULL);
1611 debug_dump_totem_config(totem_config);
1612 if (totem_volatile_config_validate(totem_config, &error_string) == -1) {
1621 local_node_pos = find_local_node_in_nodelist(totem_config);
1622 if (local_node_pos != -1) {
1632 static void add_totem_config_notification(
struct totem_config *totem_config)
1638 totem_change_notify,
1644 totem_reload_notify,
1650 nodelist_dynamic_notify,
1651 (
void *)totem_config,
unsigned int clear_node_high_bit
const char * icmap_iter_next(icmap_iter_t iter, size_t *value_len, icmap_value_types_t *type)
#define RRP_PROBLEM_COUNT_TIMEOUT
struct totem_interface * interfaces
unsigned int interface_count
const char * totemip_print(const struct totem_ip_address *addr)
void icmap_iter_finalize(icmap_iter_t iter)
totem_transport_t transport_number
int totemip_parse(struct totem_ip_address *totemip, const char *addr, int family)
#define DOWNCHECK_TIMEOUT
unsigned int token_hold_timeout
struct totem_ip_address member_list[PROCESSOR_COUNT_MAX]
unsigned char private_key[TOTEM_PRIVATE_KEY_LEN]
char rrp_mode[TOTEM_RRP_MODE_BYTES]
unsigned char addr[TOTEMIP_ADDRLEN]
unsigned int rrp_problem_count_timeout
cs_error_t icmap_set_string(const char *key_name, const char *value)
int totemip_is_mcast(struct totem_ip_address *addr)
#define RRP_AUTORECOVERY_CHECK_TIMEOUT
unsigned int downcheck_timeout
unsigned int private_key_len
#define SEQNO_UNCHANGED_CONST
unsigned int max_network_delay
#define log_printf(level, format, args...)
unsigned int heartbeat_failures_allowed
unsigned int send_join_timeout
unsigned int rrp_problem_count_threshold
#define ICMAP_TRACK_DELETE
#define RRP_PROBLEM_COUNT_THRESHOLD_MIN
#define ICMAP_KEYNAME_MAXLEN
cs_error_t icmap_get_uint8(const char *key_name, uint8_t *u8)
int totem_config_keyread(struct totem_config *totem_config, const char **error_string)
#define ICMAP_TRACK_MODIFY
unsigned int token_retransmits_before_loss_const
int totemip_iface_check(struct totem_ip_address *bindnet, struct totem_ip_address *boundto, int *interface_up, int *interface_num, int mask_high_bit)
#define FAIL_TO_RECV_CONST
cs_error_t icmap_set_uint32(const char *key_name, uint32_t value)
unsigned int seqno_unchanged_const
unsigned int miss_count_const
unsigned int join_timeout
int totem_config_validate(struct totem_config *totem_config, const char **error_string)
int totem_config_find_local_addr_in_nodelist(const char *ipaddr_key_prefix, unsigned int *node_pos)
struct totem_ip_address mcast_addr
#define LOGSYS_LEVEL_ERROR
unsigned int rrp_autorecovery_check_timeout
cs_error_t icmap_get(const char *key_name, void *value, size_t *value_len, icmap_value_types_t *type)
#define LOGSYS_LEVEL_DEBUG
cs_error_t icmap_set_uint16(const char *key_name, uint16_t value)
unsigned int fail_to_recv_const
#define TOKEN_COEFFICIENT
int totempg_member_remove(const struct totem_ip_address *member, int ring_no)
#define TOTEM_CONFIG_WARNING_MEMBERS_DEPRECATED
cs_error_t icmap_get_uint32(const char *key_name, uint32_t *u32)
#define TOTEM_CONFIG_WARNING_MEMBERS_IGNORED
void totemip_freeifaddrs(struct list_head *addrs)
#define MAX_NETWORK_DELAY
unsigned int token_timeout
unsigned int consensus_timeout
int totemip_getifaddrs(struct list_head *addrs)
#define PROCESSOR_COUNT_MAX
#define TOKEN_RETRANSMITS_BEFORE_LOSS_CONST
unsigned int broadcast_use
unsigned int rrp_problem_count_mcast_threshold
cs_error_t icmap_get_string(const char *key_name, char **str)
#define list_entry(ptr, type, member)
cs_error_t icmap_set_uint8(const char *key_name, uint8_t value)
unsigned int max_messages
char * crypto_cipher_type
cs_error_t icmap_set_ro_access(const char *key_name, int prefix, int ro_access)
unsigned int merge_timeout
unsigned int token_retransmit_timeout
struct totem_ip_address bindnet
icmap_iter_t icmap_iter_init(const char *prefix)
int totemip_equal(const struct totem_ip_address *addr1, const struct totem_ip_address *addr2)
struct totem_ip_address ip_addr
cs_error_t icmap_get_uint16(const char *key_name, uint16_t *u16)
#define TOTEM_CONFIG_WARNING_TOTEM_NODEID_IGNORED
unsigned int rrp_token_expired_timeout
qb_map_iter_t * icmap_iter_t
cs_error_t icmap_track_add(const char *key_name, int32_t track_type, icmap_notify_fn_t notify_fn, void *user_data, icmap_track_t *icmap_track)
int totem_config_read(struct totem_config *totem_config, const char **error_string, uint64_t *warnings)
#define ICMAP_TRACK_PREFIX
#define RRP_PROBLEM_COUNT_THRESHOLD_DEFAULT
int totempg_member_add(const struct totem_ip_address *member, int ring_no)