pacemaker  2.0.5-ba59be712
Scalable High-Availability cluster resource manager
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
crmcommon_private.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
#include <glib.h>
#include <libxml/tree.h>
#include <qb/qbipcc.h>
Include dependency graph for crmcommon_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pcmk__deleted_xml_s
 
struct  xml_private_s
 
struct  pcmk__ipc_methods_s
 
struct  pcmk_ipc_api_s
 
struct  pcmk__ipc_header_s
 

Macros

#define PCMK__BUFFER_SIZE   4096
 
#define pcmk__set_xml_flags(xml_priv, flags_to_set)
 
#define pcmk__clear_xml_flags(xml_priv, flags_to_clear)
 
#define PCMK__IPC_VERSION   1
 
#define PCMK__CONTROLD_API_MAJOR   "1"
 
#define PCMK__CONTROLD_API_MINOR   "0"
 

Typedefs

typedef struct pcmk__deleted_xml_s pcmk__deleted_xml_t
 
typedef struct xml_private_s xml_private_t
 
typedef struct pcmk__ipc_methods_s pcmk__ipc_methods_t
 
typedef struct pcmk__ipc_header_s pcmk__ipc_header_t
 

Enumerations

enum  xml_private_flags {
  xpf_none = 0x0000, xpf_dirty = 0x0001, xpf_deleted = 0x0002, xpf_created = 0x0004,
  xpf_modified = 0x0008, xpf_tracking = 0x0010, xpf_processed = 0x0020, xpf_skip = 0x0040,
  xpf_moved = 0x0080, xpf_acl_enabled = 0x0100, xpf_acl_read = 0x0200, xpf_acl_write = 0x0400,
  xpf_acl_deny = 0x0800, xpf_acl_create = 0x1000, xpf_acl_denied = 0x2000, xpf_lazy = 0x4000
}
 

Functions

G_GNUC_INTERNAL void pcmk__xml2text (xmlNode *data, int options, char **buffer, int *offset, int *max, int depth)
 
G_GNUC_INTERNAL void pcmk__buffer_add_char (char **buffer, int *offset, int *max, char c)
 
G_GNUC_INTERNAL void pcmk__set_xml_doc_flag (xmlNode *xml, enum xml_private_flags flag)
 
G_GNUC_INTERNAL bool pcmk__tracking_xml_changes (xmlNode *xml, bool lazy)
 
G_GNUC_INTERNAL int pcmk__element_xpath (const char *prefix, xmlNode *xml, char *buffer, int offset, size_t buffer_size)
 
G_GNUC_INTERNAL void pcmk__mark_xml_created (xmlNode *xml)
 
G_GNUC_INTERNAL int pcmk__xml_position (xmlNode *xml, enum xml_private_flags ignore_if_set)
 
G_GNUC_INTERNAL xmlNode * pcmk__xml_match (xmlNode *haystack, xmlNode *needle, bool exact)
 
G_GNUC_INTERNAL void pcmk__xe_log (int log_level, const char *file, const char *function, int line, const char *prefix, xmlNode *data, int depth, int options)
 
G_GNUC_INTERNAL void pcmk__xml_update (xmlNode *parent, xmlNode *target, xmlNode *update, bool as_diff)
 
G_GNUC_INTERNAL xmlNode * pcmk__xc_match (xmlNode *root, xmlNode *search_comment, bool exact)
 
G_GNUC_INTERNAL void pcmk__xc_update (xmlNode *parent, xmlNode *target, xmlNode *update)
 
G_GNUC_INTERNAL void pcmk__free_acls (GList *acls)
 
G_GNUC_INTERNAL void pcmk__unpack_acl (xmlNode *source, xmlNode *target, const char *user)
 
G_GNUC_INTERNAL bool pcmk__check_acl (xmlNode *xml, const char *name, enum xml_private_flags mode)
 
G_GNUC_INTERNAL void pcmk__apply_acl (xmlNode *xml)
 
G_GNUC_INTERNAL void pcmk__apply_creation_acl (xmlNode *xml, bool check_top)
 
G_GNUC_INTERNAL void pcmk__mark_xml_attr_dirty (xmlAttr *a)
 
G_GNUC_INTERNAL bool pcmk__xa_filterable (const char *name)
 
G_GNUC_INTERNAL int pcmk__send_ipc_request (pcmk_ipc_api_t *api, xmlNode *request)
 
G_GNUC_INTERNAL void pcmk__call_ipc_callback (pcmk_ipc_api_t *api, enum pcmk_ipc_event event_type, crm_exit_t status, void *event_data)
 
G_GNUC_INTERNAL unsigned int pcmk__ipc_buffer_size (unsigned int max)
 
G_GNUC_INTERNAL bool pcmk__valid_ipc_header (const pcmk__ipc_header_t *header)
 
G_GNUC_INTERNAL pcmk__ipc_methods_tpcmk__controld_api_methods (void)
 
G_GNUC_INTERNAL pcmk__ipc_methods_tpcmk__pacemakerd_api_methods (void)
 

Variables

G_GNUC_INTERNAL bool pcmk__is_daemon
 

Macro Definition Documentation

◆ PCMK__BUFFER_SIZE

#define PCMK__BUFFER_SIZE   4096

Definition at line 25 of file crmcommon_private.h.

◆ pcmk__clear_xml_flags

#define pcmk__clear_xml_flags (   xml_priv,
  flags_to_clear 
)
Value:
do { \
(xml_priv)->flags = pcmk__clear_flags_as(__func__, __LINE__, \
LOG_NEVER, "XML", "XML node", (xml_priv)->flags, \
(flags_to_clear), #flags_to_clear); \
} while (0)
#define LOG_NEVER
Definition: logging.h:46
uint64_t flags
Definition: remote.c:149

Definition at line 75 of file crmcommon_private.h.

◆ PCMK__CONTROLD_API_MAJOR

#define PCMK__CONTROLD_API_MAJOR   "1"

Definition at line 163 of file crmcommon_private.h.

◆ PCMK__CONTROLD_API_MINOR

#define PCMK__CONTROLD_API_MINOR   "0"

Definition at line 164 of file crmcommon_private.h.

◆ PCMK__IPC_VERSION

#define PCMK__IPC_VERSION   1

Definition at line 161 of file crmcommon_private.h.

◆ pcmk__set_xml_flags

#define pcmk__set_xml_flags (   xml_priv,
  flags_to_set 
)
Value:
do { \
(xml_priv)->flags = pcmk__set_flags_as(__func__, __LINE__, \
LOG_NEVER, "XML", "XML node", (xml_priv)->flags, \
(flags_to_set), #flags_to_set); \
} while (0)
#define LOG_NEVER
Definition: logging.h:46
uint64_t flags
Definition: remote.c:149

Definition at line 69 of file crmcommon_private.h.

Typedef Documentation

◆ pcmk__deleted_xml_t

◆ pcmk__ipc_header_t

◆ pcmk__ipc_methods_t

◆ xml_private_t

typedef struct xml_private_s xml_private_t

Enumeration Type Documentation

◆ xml_private_flags

Enumerator
xpf_none 
xpf_dirty 
xpf_deleted 
xpf_created 
xpf_modified 
xpf_tracking 
xpf_processed 
xpf_skip 
xpf_moved 
xpf_acl_enabled 
xpf_acl_read 
xpf_acl_write 
xpf_acl_deny 
xpf_acl_create 
xpf_acl_denied 
xpf_lazy 

Definition at line 31 of file crmcommon_private.h.

Function Documentation

◆ pcmk__apply_acl()

G_GNUC_INTERNAL void pcmk__apply_acl ( xmlNode *  xml)

Definition at line 243 of file acl.c.

◆ pcmk__apply_creation_acl()

G_GNUC_INTERNAL void pcmk__apply_creation_acl ( xmlNode *  xml,
bool  check_top 
)

Definition at line 545 of file acl.c.

◆ pcmk__buffer_add_char()

G_GNUC_INTERNAL void pcmk__buffer_add_char ( char **  buffer,
int *  offset,
int *  max,
char  c 
)

Definition at line 1971 of file xml.c.

◆ pcmk__call_ipc_callback()

G_GNUC_INTERNAL void pcmk__call_ipc_callback ( pcmk_ipc_api_t api,
enum pcmk_ipc_event  event_type,
crm_exit_t  status,
void *  event_data 
)

Definition at line 144 of file ipc_client.c.

◆ pcmk__check_acl()

G_GNUC_INTERNAL bool pcmk__check_acl ( xmlNode *  xml,
const char *  name,
enum xml_private_flags  mode 
)

Definition at line 615 of file acl.c.

◆ pcmk__controld_api_methods()

G_GNUC_INTERNAL pcmk__ipc_methods_t* pcmk__controld_api_methods ( void  )

Definition at line 244 of file ipc_controld.c.

◆ pcmk__element_xpath()

G_GNUC_INTERNAL int pcmk__element_xpath ( const char *  prefix,
xmlNode *  xml,
char *  buffer,
int  offset,
size_t  buffer_size 
)

Definition at line 268 of file xpath.c.

◆ pcmk__free_acls()

G_GNUC_INTERNAL void pcmk__free_acls ( GList *  acls)

Definition at line 46 of file acl.c.

◆ pcmk__ipc_buffer_size()

G_GNUC_INTERNAL unsigned int pcmk__ipc_buffer_size ( unsigned int  max)

Definition at line 31 of file ipc_common.c.

◆ pcmk__mark_xml_attr_dirty()

G_GNUC_INTERNAL void pcmk__mark_xml_attr_dirty ( xmlAttr *  a)

Definition at line 174 of file xml.c.

◆ pcmk__mark_xml_created()

G_GNUC_INTERNAL void pcmk__mark_xml_created ( xmlNode *  xml)

Definition at line 156 of file xml.c.

◆ pcmk__pacemakerd_api_methods()

G_GNUC_INTERNAL pcmk__ipc_methods_t* pcmk__pacemakerd_api_methods ( void  )

Definition at line 189 of file ipc_pacemakerd.c.

◆ pcmk__send_ipc_request()

G_GNUC_INTERNAL int pcmk__send_ipc_request ( pcmk_ipc_api_t api,
xmlNode *  request 
)

Definition at line 584 of file ipc_client.c.

◆ pcmk__set_xml_doc_flag()

G_GNUC_INTERNAL void pcmk__set_xml_doc_flag ( xmlNode *  xml,
enum xml_private_flags  flag 
)

Definition at line 118 of file xml.c.

◆ pcmk__tracking_xml_changes()

G_GNUC_INTERNAL bool pcmk__tracking_xml_changes ( xmlNode *  xml,
bool  lazy 
)

Definition at line 52 of file xml.c.

◆ pcmk__unpack_acl()

G_GNUC_INTERNAL void pcmk__unpack_acl ( xmlNode *  source,
xmlNode *  target,
const char *  user 
)

Definition at line 302 of file acl.c.

◆ pcmk__valid_ipc_header()

G_GNUC_INTERNAL bool pcmk__valid_ipc_header ( const pcmk__ipc_header_t header)

Definition at line 75 of file ipc_common.c.

◆ pcmk__xa_filterable()

G_GNUC_INTERNAL bool pcmk__xa_filterable ( const char *  name)

Definition at line 252 of file digest.c.

◆ pcmk__xc_match()

G_GNUC_INTERNAL xmlNode* pcmk__xc_match ( xmlNode *  root,
xmlNode *  search_comment,
bool  exact 
)

Definition at line 2415 of file xml.c.

◆ pcmk__xc_update()

G_GNUC_INTERNAL void pcmk__xc_update ( xmlNode *  parent,
xmlNode *  target,
xmlNode *  update 
)

Definition at line 2464 of file xml.c.

◆ pcmk__xe_log()

G_GNUC_INTERNAL void pcmk__xe_log ( int  log_level,
const char *  file,
const char *  function,
int  line,
const char *  prefix,
xmlNode *  data,
int  depth,
int  options 
)

Definition at line 1423 of file xml.c.

◆ pcmk__xml2text()

G_GNUC_INTERNAL void pcmk__xml2text ( xmlNode *  data,
int  options,
char **  buffer,
int *  offset,
int *  max,
int  depth 
)

Definition at line 1854 of file xml.c.

◆ pcmk__xml_match()

G_GNUC_INTERNAL xmlNode* pcmk__xml_match ( xmlNode *  haystack,
xmlNode *  needle,
bool  exact 
)

Definition at line 371 of file xml.c.

◆ pcmk__xml_position()

G_GNUC_INTERNAL int pcmk__xml_position ( xmlNode *  xml,
enum xml_private_flags  ignore_if_set 
)

Definition at line 315 of file xml.c.

◆ pcmk__xml_update()

G_GNUC_INTERNAL void pcmk__xml_update ( xmlNode *  parent,
xmlNode *  target,
xmlNode *  update,
bool  as_diff 
)

Definition at line 2495 of file xml.c.

Variable Documentation

◆ pcmk__is_daemon

G_GNUC_INTERNAL bool pcmk__is_daemon

Definition at line 38 of file logging.c.