pacemaker  2.0.5-ba59be712
Scalable High-Availability cluster resource manager
Functions
messages.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <sys/types.h>
#include <glib.h>
#include <libxml/tree.h>
#include <crm/msg_xml.h>
#include <crm/common/xml_internal.h>
Include dependency graph for messages.c:

Go to the source code of this file.

Functions

xmlNode * create_request_adv (const char *task, xmlNode *msg_data, const char *host_to, const char *sys_to, const char *sys_from, const char *uuid_from, const char *origin)
 Create a Pacemaker request (for IPC or cluster layer) More...
 
xmlNode * create_reply_adv (xmlNode *original_request, xmlNode *xml_response_data, const char *origin)
 Create a Pacemaker reply (for IPC or cluster layer) More...
 
xmlNode * get_message_xml (xmlNode *msg, const char *field)
 
gboolean add_message_xml (xmlNode *msg, const char *field, xmlNode *xml)
 
const char * pcmk__message_name (const char *name)
 Get name to be used as identifier for cluster messages. More...
 

Function Documentation

◆ add_message_xml()

gboolean add_message_xml ( xmlNode *  msg,
const char *  field,
xmlNode *  xml 
)

Definition at line 162 of file messages.c.

◆ create_reply_adv()

xmlNode* create_reply_adv ( xmlNode *  original_request,
xmlNode *  xml_response_data,
const char *  origin 
)

Create a Pacemaker reply (for IPC or cluster layer)

Parameters
[in]original_requestXML of request this is a reply to
[in]xml_response_dataXML to copy as data section of reply
[in]originName of function that called this one
Returns
XML of new reply
Note
This function should not be called directly, but via the create_reply() wrapper.
The caller is responsible for freeing the result using free_xml().

Definition at line 102 of file messages.c.

◆ create_request_adv()

xmlNode* create_request_adv ( const char *  task,
xmlNode *  msg_data,
const char *  host_to,
const char *  sys_to,
const char *  sys_from,
const char *  uuid_from,
const char *  origin 
)

Create a Pacemaker request (for IPC or cluster layer)

Parameters
[in]taskWhat to set as the request's task
[in]msg_dataWhat to add as the request's data contents
[in]host_toWhat to set as the request's destination host
[in]sys_toWhat to set as the request's destination system
[in]sys_fromIf not NULL, set as request's origin system
[in]uuid_fromIf not NULL, use in request's origin system
[in]originName of function that called this one
Returns
XML of new request
Note
One of sys_from or uuid_from must be non-NULL
This function should not be called directly, but via the create_request() wrapper.
The caller is responsible for freeing the result using free_xml().

Definition at line 40 of file messages.c.

◆ get_message_xml()

xmlNode* get_message_xml ( xmlNode *  msg,
const char *  field 
)

Definition at line 154 of file messages.c.

◆ pcmk__message_name()

const char* pcmk__message_name ( const char *  name)

Get name to be used as identifier for cluster messages.

Parameters
[in]nameActual system name to check
Returns
Non-NULL cluster message identifier corresponding to name
Note
The Pacemaker daemons were renamed in version 2.0.0, but the old names must continue to be used as the identifier for cluster messages, so that mixed-version clusters are possible during a rolling upgrade.

Definition at line 182 of file messages.c.