45#include <sys/socket.h>
81 if (service_id == servicenames[
i].
c_val) {
82 return (servicenames[
i].
c_name);
96 name1->length)) == 0);
134 "Corosync Cluster Engine exiting normally");
153 return ((
char *)name->
value);
158 ((
char *)name->
value)[
sizeof (name->
value) - 1] =
'\0';
169 str1->length)) == 0);
181 if (
path[0] ==
'\0') {
206static int safe_strcat(
char *
dst,
size_t dst_len,
const char *
src)
218#define UTILS_IS_VALID_KNET_LIST_MAX_ITEMS 256
229static int util_is_valid_knet_list_helper(
const char *
val,
230 const char **items,
size_t no_items,
296 *
error_string =
"internal error - cannot get knet crypto list";
301 *
error_string =
"internal error - too many knet crypto list entries";
306 *
error_string =
"internal error - cannot get knet crypto list";
310 for (
zi = 0;
zi < entries;
zi++) {
314 return (util_is_valid_knet_list_helper(
val, items, entries,
list_str,
331 *
error_string =
"internal error - cannot get knet compress list";
336 *
error_string =
"internal error - too many knet compress list entries";
341 *
error_string =
"internal error - cannot get knet compress list";
345 for (
zi = 0;
zi < entries;
zi++) {
349 return (util_is_valid_knet_list_helper(
val, items, entries,
list_str,
362#ifdef HAVE_KNET_GET_CRYPTO_CIPHER_LIST
368#ifdef ENABLE_UNENCRYPTED
372#ifdef HAVE_KNET_GET_CRYPTO_CIPHER_LIST
374 *
error_string =
"internal error - cannot get crypto cipher list";
379 *
error_string =
"internal error - too many knet crypto cipher list entries";
384 *
error_string =
"internal error - cannot get knet crypto cipher list";
388 for (
zi = 0;
zi < entries;
zi++) {
410#ifdef HAVE_KNET_GET_CRYPTO_HASH_LIST
416#ifdef ENABLE_UNENCRYPTED
420#ifdef HAVE_KNET_GET_CRYPTO_HASH_LIST
422 *
error_string =
"internal error - cannot get crypto hash list";
427 *
error_string =
"internal error - too many knet crypto hash list entries";
432 *
error_string =
"internal error - cannot get knet crypto hash list";
436 for (
zi = 0;
zi < entries;
zi++) {
unsigned int nodeid
the ID of the node whose info needs updating
int64_t cs_time_t
cs_time_t
#define CS_MAX_NAME_LENGTH
cs_error_t icmap_get_string(const char *key_name, char **str)
Shortcut for icmap_get for string type.
#define LOGSYS_LEVEL_ERROR
#define log_printf(level, format, args...)
void logsys_system_fini(void)
logsys_system_fini
#define LOGSYS_LEVEL_NOTICE
#define LOGSYS_DECLARE_SUBSYS(subsys)
The LOGSYS_DECLARE_SUBSYS macro.
uint8_t value[CS_MAX_NAME_LENGTH]
int util_is_valid_knet_crypto_model(const char *val, const char **list_str, int machine_parseable_str, const char *error_string_prefix, const char **error_string)
char * getcs_name_t(cs_name_t *name)
const char * get_state_dir(void)
cs_time_t clust_time_now(void)
Get the time of day and convert to nanoseconds.
int util_is_valid_knet_crypto_cipher(const char *val, const char **list_str, int machine_parseable_str, const char *error_string_prefix, const char **error_string)
int util_is_valid_knet_crypto_hash(const char *val, const char **list_str, int machine_parseable_str, const char *error_string_prefix, const char **error_string)
const char * short_service_name_get(uint32_t service_id, char *buf, size_t buf_size)
Get the short name of a service from the service_id.
int util_is_valid_knet_compress_model(const char *val, const char **list_str, int machine_parseable_str, const char *error_string_prefix, const char **error_string)
#define UTILS_IS_VALID_KNET_LIST_MAX_ITEMS
int name_match(cs_name_t *name1, cs_name_t *name2)
Compare two names.
void setcs_name_t(cs_name_t *name, char *str)
int set_socket_dscp(int socket, unsigned char dscp)
void _corosync_out_of_memory_error(void)
void _corosync_exit_error(enum e_corosync_done err, const char *file, unsigned int line) __attribute__((noreturn))
int cs_name_tisEqual(cs_name_t *str1, char *str2)