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