10 #ifndef PCMK__CRM_COMMON_UTIL__H 11 #define PCMK__CRM_COMMON_UTIL__H 13 #include <sys/types.h> 71 pcmk_any_flags_set(uint64_t flag_group, uint64_t flags_to_check)
73 return (flag_group & flags_to_check) != 0;
86 pcmk_all_flags_set(uint64_t flag_group, uint64_t flags_to_check)
88 return (flag_group & flags_to_check) == flags_to_check;
94 #define pcmk_is_set(g, f) pcmk_all_flags_set((g), (f)) 106 #ifdef HAVE_GNUTLS_GNUTLS_H 107 void crm_gnutls_global_init(
void);
113 #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)
long long crm_get_msec(const char *input)
Parse a time+units string and return milliseconds equivalent.
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 int pcmk_parse_interval_spec(const char *input, guint *result_ms)
Parse milliseconds from a Pacemaker interval specification.
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.
Functionality for manipulating name/value pairs.
int crm_str_to_boolean(const char *s, int *ret)
bool pcmk_str_is_minus_infinity(const char *s)
Deprecated Pacemaker utilities.
int compare_version(const char *version1, const char *version2)
Pacemaker APIs related to scores.
char * crm_md5sum(const char *buffer)
gboolean crm_is_true(const char *s)
int crm_default_remote_port(void)
Get the default remote connection TCP port on this host.