10 #ifndef PCMK__CRM_COMMON_UTIL__H 11 # define PCMK__CRM_COMMON_UTIL__H 13 # include <sys/types.h> 37 # define ONLINESTATUS "online" // Status of an online client 38 # define OFFLINESTATUS "offline" // Status of an offline client 63 void crm_abort(const
char *file, const
char *function,
int line,
64 const
char *condition, gboolean do_core, gboolean do_fork);
76 pcmk_any_flags_set(uint64_t flag_group, uint64_t flags_to_check)
78 return (flag_group & flags_to_check) != 0;
91 pcmk_all_flags_set(uint64_t flag_group, uint64_t flags_to_check)
93 return (flag_group & flags_to_check) == flags_to_check;
99 #define pcmk_is_set(g, f) pcmk_all_flags_set((g), (f)) 114 #ifdef HAVE_GNUTLS_GNUTLS_H 115 void crm_gnutls_global_init(
void);
123 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) API related to resource agents.
bool crm_is_daemon_name(const char *name)
Check whether string represents a client name used by cluster daemons.
char * crm_generate_uuid(void)
const char * pcmk_readable_score(int score)
Return a displayable static string for a score value.
int char2score(const char *score)
Get the integer value of a score string.
long long crm_get_msec(const char *input)
Parse a time+units string and return milliseconds equivalent.
const char * crm_meta_value(GHashTable *hash, const char *field)
char * pcmk_promotion_score_name(const char *rsc_id)
Return the name of the node attribute used as a promotion score.
int crm_user_lookup(const char *name, uid_t *uid, gid_t *gid)
int pcmk_daemon_user(uid_t *uid, gid_t *gid)
Get user and group IDs of pacemaker daemon user.
char * crm_meta_name(const char *field)
Low-level API for XML Access Control Lists (ACLs)
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
bool pcmk_str_is_infinity(const char *s)
Function and executable result codes.
int crm_str_to_boolean(const char *s, int *ret)
bool pcmk_str_is_minus_infinity(const char *s)
char guint crm_parse_interval_spec(const char *input)
Parse milliseconds from a Pacemaker interval specification.
Deprecated Pacemaker utilities.
int compare_version(const char *version1, const char *version2)
int pcmk__add_scores(int score1, int score2)
char * crm_md5sum(const char *buffer)
gboolean crm_is_true(const char *s)
char * pcmk_hostname(void)
Get the local hostname.
char * crm_strip_trailing_newline(char *str)
void crm_abort(const char *file, const char *function, int line, const char *condition, gboolean do_core, gboolean do_fork)
int crm_default_remote_port(void)
Get the default remote connection TCP port on this host.